You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by js...@apache.org on 2014/03/28 10:44:44 UTC
svn commit: r1582656 -
/openoffice/branches/AOO410/main/tools/source/generic/poly.cxx
Author: jsc
Date: Fri Mar 28 09:44:44 2014
New Revision: 1582656
URL: http://svn.apache.org/r1582656
Log:
#124453# check if the resulting polygon has already exceeded the number of points (2^16) that can be handled by a tools polygon
Patch By: awf
Modified:
openoffice/branches/AOO410/main/tools/source/generic/poly.cxx
Modified: openoffice/branches/AOO410/main/tools/source/generic/poly.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO410/main/tools/source/generic/poly.cxx?rev=1582656&r1=1582655&r2=1582656&view=diff
==============================================================================
--- openoffice/branches/AOO410/main/tools/source/generic/poly.cxx (original)
+++ openoffice/branches/AOO410/main/tools/source/generic/poly.cxx Fri Mar 28 09:44:44 2014
@@ -1076,6 +1076,19 @@ void Polygon::AdaptiveSubdivide( Polygon
}
*aPointIter++ = mpImplPolygon->mpPointAry[ i++ ];
+
+ if (aPoints.size() >= SAL_MAX_UINT16)
+ {
+ OSL_ENSURE(aPoints.size() < SAL_MAX_UINT16,
+ "Polygon::AdapativeSubdivision created polygon too many points;"
+ " using original polygon instead");
+
+ // The resulting polygon can not hold all the points
+ // that we have created so far. Stop the subdivision
+ // and return a copy of the unmodified polygon.
+ rResult = *this;
+ return;
+ }
}
// fill result polygon