summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2008-04-24 14:06:41 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2008-04-24 14:06:41 +0000
commit850cb10dc27e1c9b60393f207148df95395b9f2e (patch)
tree0b79cda1e42f47dcb0a5be4318cee4689a314e6c
parent0505d4fb6c781b98117f01cc9ac8bf505e390484 (diff)
INTEGRATION: CWS aw055 (1.18.28); FILE MERGED
2008/02/29 04:32:01 aw 1.18.28.2: removed op equal at polygons, added to tooling. Done for 2D and 3D 2008/02/28 08:04:56 aw 1.18.28.1: finetuning for SVG im/export
-rw-r--r--basegfx/source/polygon/b2dpolypolygon.cxx38
1 files changed, 17 insertions, 21 deletions
diff --git a/basegfx/source/polygon/b2dpolypolygon.cxx b/basegfx/source/polygon/b2dpolypolygon.cxx
index 2b507faa1fd9..49a96fdc6125 100644
--- a/basegfx/source/polygon/b2dpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dpolypolygon.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: b2dpolypolygon.cxx,v $
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
* This file is part of OpenOffice.org.
*
@@ -45,7 +45,7 @@
class ImplB2DPolyPolygon
{
- typedef ::std::vector< ::basegfx::B2DPolygon > PolygonVector;
+ typedef ::std::vector< basegfx::B2DPolygon > PolygonVector;
PolygonVector maPolygons;
@@ -54,39 +54,35 @@ public:
{
}
- ImplB2DPolyPolygon(const ::basegfx::B2DPolygon& rToBeCopied) :
+ ImplB2DPolyPolygon(const basegfx::B2DPolygon& rToBeCopied) :
maPolygons(1,rToBeCopied)
{
}
- bool isEqual(const ImplB2DPolyPolygon& rPolygonList) const
+ bool operator==(const ImplB2DPolyPolygon& rPolygonList) const
{
// same polygon count?
if(maPolygons.size() != rPolygonList.maPolygons.size())
return false;
- // if zero polygons the polys are equal
- if(!maPolygons.size())
- return true;
-
// compare polygon content
- if(maPolygons != rPolygonList.maPolygons)
+ if(!(maPolygons == rPolygonList.maPolygons))
return false;
return true;
}
- const ::basegfx::B2DPolygon& getB2DPolygon(sal_uInt32 nIndex) const
+ const basegfx::B2DPolygon& getB2DPolygon(sal_uInt32 nIndex) const
{
return maPolygons[nIndex];
}
- void setB2DPolygon(sal_uInt32 nIndex, const ::basegfx::B2DPolygon& rPolygon)
+ void setB2DPolygon(sal_uInt32 nIndex, const basegfx::B2DPolygon& rPolygon)
{
maPolygons[nIndex] = rPolygon;
}
- void insert(sal_uInt32 nIndex, const ::basegfx::B2DPolygon& rPolygon, sal_uInt32 nCount)
+ void insert(sal_uInt32 nIndex, const basegfx::B2DPolygon& rPolygon, sal_uInt32 nCount)
{
if(nCount)
{
@@ -97,7 +93,7 @@ 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();
@@ -146,17 +142,17 @@ public:
{
std::for_each( maPolygons.begin(),
maPolygons.end(),
- std::mem_fun_ref( &::basegfx::B2DPolygon::flip ));
+ std::mem_fun_ref( &basegfx::B2DPolygon::flip ));
}
void removeDoublePoints()
{
std::for_each( maPolygons.begin(),
maPolygons.end(),
- std::mem_fun_ref( &::basegfx::B2DPolygon::removeDoublePoints ));
+ std::mem_fun_ref( &basegfx::B2DPolygon::removeDoublePoints ));
}
- void transform(const ::basegfx::B2DHomMatrix& rMatrix)
+ void transform(const basegfx::B2DHomMatrix& rMatrix)
{
for(sal_uInt32 a(0L); a < maPolygons.size(); a++)
{
@@ -168,7 +164,7 @@ public:
{
std::for_each( maPolygons.begin(),
maPolygons.end(),
- std::mem_fun_ref( &::basegfx::B2DPolygon::makeUnique ));
+ std::mem_fun_ref( &basegfx::B2DPolygon::makeUnique ));
}
};
@@ -215,12 +211,12 @@ namespace basegfx
if(mpPolyPolygon.same_object(rPolyPolygon.mpPolyPolygon))
return true;
- return mpPolyPolygon->isEqual(*(rPolyPolygon.mpPolyPolygon));
+ return ((*mpPolyPolygon) == (*rPolyPolygon.mpPolyPolygon));
}
bool B2DPolyPolygon::operator!=(const B2DPolyPolygon& rPolyPolygon) const
{
- return !(*this == rPolyPolygon);
+ return !((*this) == rPolyPolygon);
}
sal_uInt32 B2DPolyPolygon::count() const
@@ -247,7 +243,7 @@ namespace basegfx
{
for(sal_uInt32 a(0L); a < mpPolyPolygon->count(); a++)
{
- const ::basegfx::B2DPolygon& rPolygon = mpPolyPolygon->getB2DPolygon(a);
+ const basegfx::B2DPolygon& rPolygon = mpPolyPolygon->getB2DPolygon(a);
if(rPolygon.areControlPointsUsed())
{
@@ -348,7 +344,7 @@ namespace basegfx
mpPolyPolygon->removeDoublePoints();
}
- void B2DPolyPolygon::transform(const ::basegfx::B2DHomMatrix& rMatrix)
+ void B2DPolyPolygon::transform(const basegfx::B2DHomMatrix& rMatrix)
{
if(mpPolyPolygon->count() && !rMatrix.isIdentity())
{