Kaydet (Commit) a9582c05 authored tarafından Jürgen Schmidt's avatar Jürgen Schmidt Kaydeden (comit) Caolán McNamara

Resolves: #i124453# check if the resulting polygon...

has already exceeded the number of points (2^16) that can be handled by a tools
polygon

(cherry picked from commit 804e547d)

Change-Id: I437a84493e264f7b650561599170e831da20c9aa
üst f5adf08a
......@@ -881,6 +881,19 @@ void Polygon::AdaptiveSubdivide( Polygon& rResult, const double d ) const
}
*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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment