summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/poly.h5
-rw-r--r--tools/source/generic/poly2.cxx18
2 files changed, 11 insertions, 12 deletions
diff --git a/tools/inc/poly.h b/tools/inc/poly.h
index d677bcd8b0ac..0a202bca1615 100644
--- a/tools/inc/poly.h
+++ b/tools/inc/poly.h
@@ -48,13 +48,12 @@ public:
#define MAX_POLYGONS ((sal_uInt16)0x3FF0)
class Polygon;
-typedef Polygon* SVPPOLYGON;
class SAL_WARN_UNUSED ImplPolyPolygon
{
public:
- SVPPOLYGON* mpPolyAry;
- sal_uIntPtr mnRefCount;
+ Polygon** mpPolyAry;
+ sal_uIntPtr mnRefCount;
sal_uInt16 mnCount;
sal_uInt16 mnSize;
sal_uInt16 mnResize;
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index d390a6e862db..d1dddb17733a 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -41,7 +41,7 @@ ImplPolyPolygon::ImplPolyPolygon( sal_uInt16 nInitSize )
mnCount = nInitSize;
mnSize = nInitSize;
mnResize = 16;
- mpPolyAry = new SVPPOLYGON[ nInitSize ];
+ mpPolyAry = new Polygon*[ nInitSize ];
}
ImplPolyPolygon::ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly )
@@ -53,7 +53,7 @@ ImplPolyPolygon::ImplPolyPolygon( const ImplPolyPolygon& rImplPolyPoly )
if ( rImplPolyPoly.mpPolyAry )
{
- mpPolyAry = new SVPPOLYGON[mnSize];
+ mpPolyAry = new Polygon*[mnSize];
for ( sal_uInt16 i = 0; i < mnCount; i++ )
mpPolyAry[i] = new Polygon( *rImplPolyPoly.mpPolyAry[i] );
}
@@ -128,19 +128,19 @@ void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos )
nPos = mpImplPolyPolygon->mnCount;
if ( !mpImplPolyPolygon->mpPolyAry )
- mpImplPolyPolygon->mpPolyAry = new SVPPOLYGON[mpImplPolyPolygon->mnSize];
+ mpImplPolyPolygon->mpPolyAry = new Polygon*[mpImplPolyPolygon->mnSize];
else if ( mpImplPolyPolygon->mnCount == mpImplPolyPolygon->mnSize )
{
sal_uInt16 nOldSize = mpImplPolyPolygon->mnSize;
sal_uInt16 nNewSize = nOldSize + mpImplPolyPolygon->mnResize;
- SVPPOLYGON* pNewAry;
+ Polygon** pNewAry;
if ( nNewSize >= MAX_POLYGONS )
nNewSize = MAX_POLYGONS;
- pNewAry = new SVPPOLYGON[nNewSize];
- memcpy( pNewAry, mpImplPolyPolygon->mpPolyAry, nPos*sizeof(SVPPOLYGON) );
+ pNewAry = new Polygon*[nNewSize];
+ memcpy( pNewAry, mpImplPolyPolygon->mpPolyAry, nPos*sizeof(Polygon*) );
memcpy( pNewAry+nPos+1, mpImplPolyPolygon->mpPolyAry+nPos,
- (nOldSize-nPos)*sizeof(SVPPOLYGON) );
+ (nOldSize-nPos)*sizeof(Polygon*) );
delete[] mpImplPolyPolygon->mpPolyAry;
mpImplPolyPolygon->mpPolyAry = pNewAry;
mpImplPolyPolygon->mnSize = nNewSize;
@@ -149,7 +149,7 @@ void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos )
{
memmove( mpImplPolyPolygon->mpPolyAry+nPos+1,
mpImplPolyPolygon->mpPolyAry+nPos,
- (mpImplPolyPolygon->mnCount-nPos)*sizeof(SVPPOLYGON) );
+ (mpImplPolyPolygon->mnCount-nPos)*sizeof(Polygon*) );
}
mpImplPolyPolygon->mpPolyAry[nPos] = new Polygon( rPoly );
@@ -170,7 +170,7 @@ void PolyPolygon::Remove( sal_uInt16 nPos )
mpImplPolyPolygon->mnCount--;
memmove( mpImplPolyPolygon->mpPolyAry+nPos,
mpImplPolyPolygon->mpPolyAry+nPos+1,
- (mpImplPolyPolygon->mnCount-nPos)*sizeof(SVPPOLYGON) );
+ (mpImplPolyPolygon->mnCount-nPos)*sizeof(Polygon*) );
}
void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos )