4 minutes 27 seconds -> 11 seconds

This commit is contained in:
Caolán McNamara
2011-07-12 08:54:16 +01:00
parent ae5b6a6e5e
commit 4cb993343f

View File

@@ -93,21 +93,10 @@ public:
void insert(sal_uInt32 nIndex, const basegfx::B2DPolyPolygon& rPolyPolygon) void insert(sal_uInt32 nIndex, const basegfx::B2DPolyPolygon& rPolyPolygon)
{ {
const sal_uInt32 nCount = rPolyPolygon.count(); // add all polygons from rPolyPolygon
PolygonVector::iterator aIndex(maPolygons.begin());
if(nCount) aIndex += nIndex;
{ maPolygons.insert(aIndex, rPolyPolygon.begin(), rPolyPolygon.end());
// add nCount polygons from rPolyPolygon
maPolygons.reserve(maPolygons.size() + nCount);
PolygonVector::iterator aIndex(maPolygons.begin());
aIndex += nIndex;
for(sal_uInt32 a(0L); a < nCount; a++)
{
aIndex = maPolygons.insert(aIndex, rPolyPolygon.getB2DPolygon(a));
++aIndex;
}
}
} }
void remove(sal_uInt32 nIndex, sal_uInt32 nCount) void remove(sal_uInt32 nIndex, sal_uInt32 nCount)