summaryrefslogtreecommitdiff
path: root/basegfx/source/inc
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2003-11-05 11:25:58 +0000
committerArmin Weiss <aw@openoffice.org>2003-11-05 11:25:58 +0000
commitc3663a687ccc9365b2b4eb4a3950b8d94c2d6ea7 (patch)
treec47ce5e59d718d5f772121000a356ef523662b17 /basegfx/source/inc
parent571971699571e0baf9710ddf076ebf27aebb548d (diff)
Added PolyPolygonTools, Added PolygonTool functionality, changed bool to sal_Bool
Diffstat (limited to 'basegfx/source/inc')
-rw-r--r--basegfx/source/inc/PolygonPoint.hxx50
-rw-r--r--basegfx/source/inc/hommatrixtemplate.hxx48
-rw-r--r--basegfx/source/inc/polygontemplate.hxx50
3 files changed, 74 insertions, 74 deletions
diff --git a/basegfx/source/inc/PolygonPoint.hxx b/basegfx/source/inc/PolygonPoint.hxx
index 37a228c1a2a6..5e38fb0dca73 100644
--- a/basegfx/source/inc/PolygonPoint.hxx
+++ b/basegfx/source/inc/PolygonPoint.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: PolygonPoint.hxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: thb $ $Date: 2003-08-20 16:56:48 $
+ * last change: $Author: aw $ $Date: 2003-11-05 12:25:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,7 +91,7 @@ public:
maPoint = rValue;
}
- bool operator==(const SimplePointEntry& rEntry) const
+ sal_Bool operator==(const SimplePointEntry& rEntry) const
{
return (maPoint == rEntry.maPoint);
}
@@ -137,14 +137,14 @@ public:
maForward = rValue;
}
- bool isBezierNeeded()
+ sal_Bool isBezierNeeded()
{
if(maBackward != Vector::getEmptyVector() || maForward != Vector::getEmptyVector())
- return true;
- return false;
+ return sal_True;
+ return sal_False;
}
- bool operator==(const SimpleBezierEntry& rEntry) const
+ sal_Bool operator==(const SimpleBezierEntry& rEntry) const
{
return ((maBackward == rEntry.maBackward) && (maForward == rEntry.maForward));
}
@@ -181,17 +181,17 @@ template < class Point, class Vector > class PolygonPointList
}
public:
- bool isBezier() const
+ sal_Bool isBezier() const
{
- return bool(mnBezierCount);
+ return sal_Bool(mnBezierCount);
}
- bool isClosed() const
+ sal_Bool isClosed() const
{
- return bool(mbIsClosed);
+ return sal_Bool(mbIsClosed);
}
- void setClosed(bool bNew)
+ void setClosed(sal_Bool bNew)
{
mbIsClosed = bNew;
}
@@ -204,7 +204,7 @@ public:
PolygonPointList()
: mnBezierCount(0L),
mpVectors(0L),
- mbIsClosed(false)
+ mbIsClosed(sal_False)
{
// complete initialization with defaults
}
@@ -276,27 +276,27 @@ public:
}
}
- bool isEqual(const PolygonPointList& rPointList) const
+ sal_Bool isEqual(const PolygonPointList& rPointList) const
{
// same point count?
if(maPoints.size() != rPointList.maPoints.size())
- return false;
+ return sal_False;
// if zero points the polys are equal
if(!maPoints.size())
- return true;
+ return sal_True;
// if bezier count used it needs to be equal
if(mnBezierCount != rPointList.mnBezierCount)
- return false;
+ return sal_False;
// compare point content
if(maPoints != rPointList.maPoints)
- return false;
+ return sal_False;
// beziercounts are equal: if it's zero, we are done
if(!mnBezierCount)
- return true;
+ return sal_True;
// beziercounts are equal and not zero; compare them
DBG_ASSERT(0L != mpVectors, "Error: Bezier list needs to exist here(!)");
@@ -328,9 +328,9 @@ public:
if(mpVectors)
{
LocalSimpleBezierEntry& rDest = (*mpVectors)[nIndex];
- bool bBezierNeededBefore(rDest.isBezierNeeded());
+ sal_Bool bBezierNeededBefore(rDest.isBezierNeeded());
((*mpVectors)[nIndex]).setBackwardVector(rValue);
- bool bBezierNeededAfter(rDest.isBezierNeeded());
+ sal_Bool bBezierNeededAfter(rDest.isBezierNeeded());
if(bBezierNeededBefore != bBezierNeededAfter)
{
@@ -342,7 +342,7 @@ public:
}
else
{
- bool bEmptyVector(rValue == Vector::getEmptyVector());
+ sal_Bool bEmptyVector(rValue == Vector::getEmptyVector());
if(bEmptyVector)
return;
@@ -366,9 +366,9 @@ public:
if(mpVectors)
{
LocalSimpleBezierEntry& rDest = (*mpVectors)[nIndex];
- bool bBezierNeededBefore(rDest.isBezierNeeded());
+ sal_Bool bBezierNeededBefore(rDest.isBezierNeeded());
((*mpVectors)[nIndex]).setForwardVector(rValue);
- bool bBezierNeededAfter(rDest.isBezierNeeded());
+ sal_Bool bBezierNeededAfter(rDest.isBezierNeeded());
if(bBezierNeededBefore != bBezierNeededAfter)
{
@@ -380,7 +380,7 @@ public:
}
else
{
- bool bEmptyVector(rValue == Vector::getEmptyVector());
+ sal_Bool bEmptyVector(rValue == Vector::getEmptyVector());
if(bEmptyVector)
return;
diff --git a/basegfx/source/inc/hommatrixtemplate.hxx b/basegfx/source/inc/hommatrixtemplate.hxx
index 4b4f4416cab1..c1c81288c04e 100644
--- a/basegfx/source/inc/hommatrixtemplate.hxx
+++ b/basegfx/source/inc/hommatrixtemplate.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: hommatrixtemplate.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: aw $ $Date: 2003-10-31 10:13:55 $
+ * last change: $Author: aw $ $Date: 2003-11-05 12:25:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -124,10 +124,10 @@ template < int _RowSize > class ImplHomMatrixTemplate
public:
// Is last line used?
- bool isLastLineDefault() const
+ sal_Bool isLastLineDefault() const
{
if(!mpLine)
- return true;
+ return sal_True;
for(sal_uInt16 a(0); a < RowSize; a++)
{
@@ -136,7 +136,7 @@ public:
if(!::basegfx::numeric::fTools::equal(fDefault, fLineValue))
{
- return false;
+ return sal_False;
}
}
@@ -144,7 +144,7 @@ public:
delete ((ImplHomMatrixTemplate< RowSize >*)this)->mpLine;
((ImplHomMatrixTemplate< RowSize >*)this)->mpLine = 0L;
- return true;
+ return sal_True;
}
// This constructor is only used form the static identity matrix, thus
@@ -233,7 +233,7 @@ public:
{
if(mpLine)
{
- bool bNecessary(false);
+ sal_Bool bNecessary(sal_False);
for(sal_uInt16 a(0);!bNecessary && a < RowSize; a++)
{
@@ -242,7 +242,7 @@ public:
if(!::basegfx::numeric::fTools::equal(fDefault, fLineValue))
{
- bNecessary = true;
+ bNecessary = sal_True;
}
}
@@ -255,7 +255,7 @@ public:
}
// Left-upper decompositon
- bool ludcmp(sal_uInt16 nIndex[], sal_Int16& nParity)
+ sal_Bool ludcmp(sal_uInt16 nIndex[], sal_Int16& nParity)
{
double fBig, fSum, fDum;
double fStorage[RowSize];
@@ -281,7 +281,7 @@ public:
if(::basegfx::numeric::fTools::equalZero(fBig))
{
- return false;
+ return sal_False;
}
fStorage[a] = 1.0 / fBig;
@@ -343,7 +343,7 @@ public:
if(::basegfx::numeric::fTools::equalZero(fValBB))
{
- return false;
+ return sal_False;
}
if(b != (RowSize - 1))
@@ -357,7 +357,7 @@ public:
}
}
- return true;
+ return sal_True;
}
void lubksb(const sal_uInt16 nIndex[], double fRow[]) const
@@ -405,7 +405,7 @@ public:
}
}
- bool isIdentity() const
+ sal_Bool isIdentity() const
{
// last line needs no testing if not existing
const sal_uInt16 nMaxLine = (mpLine) ? RowSize : (RowSize - 1);
@@ -419,15 +419,15 @@ public:
if(!::basegfx::numeric::fTools::equal(fDefault, fValueAB))
{
- return false;
+ return sal_False;
}
}
}
- return true;
+ return sal_True;
}
- bool isInvertible() const
+ sal_Bool isInvertible() const
{
ImplHomMatrixTemplate aWork(*this);
sal_uInt16 nIndex[RowSize];
@@ -436,26 +436,26 @@ public:
return aWork.ludcmp(nIndex, nParity);
}
- bool isNormalized() const
+ sal_Bool isNormalized() const
{
if(!mpLine)
- return true;
+ return sal_True;
const double fHomValue(get((RowSize - 1), (RowSize - 1)));
if(::basegfx::numeric::fTools::equalZero(fHomValue))
{
- return true;
+ return sal_True;
}
const double fOne(1.0);
if(::basegfx::numeric::fTools::equal(fOne, fHomValue))
{
- return true;
+ return sal_True;
}
- return false;
+ return sal_False;
}
void doInvert(const ImplHomMatrixTemplate& rWork, const sal_uInt16 nIndex[])
@@ -618,7 +618,7 @@ public:
testLastLine();
}
- bool isEqual(const ImplHomMatrixTemplate& rMat)
+ sal_Bool isEqual(const ImplHomMatrixTemplate& rMat)
{
const sal_uInt16 nMaxLine = (mpLine || rMat.mpLine) ? RowSize : (RowSize - 1);
@@ -631,12 +631,12 @@ public:
if(!::basegfx::numeric::fTools::equal(fValueA, fValueB))
{
- return false;
+ return sal_False;
}
}
}
- return true;
+ return sal_True;
}
};
diff --git a/basegfx/source/inc/polygontemplate.hxx b/basegfx/source/inc/polygontemplate.hxx
index 27203d952442..c3dda878e052 100644
--- a/basegfx/source/inc/polygontemplate.hxx
+++ b/basegfx/source/inc/polygontemplate.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: polygontemplate.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: thb $ $Date: 2003-08-20 16:56:48 $
+ * last change: $Author: aw $ $Date: 2003-11-05 12:25:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -91,7 +91,7 @@ public:
maPoint = rValue;
}
- bool operator==(const ImplSimplePointEntry& rEntry) const
+ sal_Bool operator==(const ImplSimplePointEntry& rEntry) const
{
return (maPoint == rEntry.maPoint);
}
@@ -137,14 +137,14 @@ public:
maForward = rValue;
}
- bool isBezierNeeded()
+ sal_Bool isBezierNeeded()
{
if(!maBackward.equalZero() || !maForward.equalZero())
- return true;
- return false;
+ return sal_True;
+ return sal_False;
}
- bool operator==(const ImplSimpleBezierEntry& rEntry) const
+ sal_Bool operator==(const ImplSimpleBezierEntry& rEntry) const
{
return ((maBackward == rEntry.maBackward) && (maForward == rEntry.maForward));
}
@@ -181,17 +181,17 @@ template < class Point, class Vector > class ImplPolygonTemplate
}
public:
- bool isBezier() const
+ sal_Bool isBezier() const
{
- return bool(mnBezierCount);
+ return sal_Bool(mnBezierCount);
}
- bool isClosed() const
+ sal_Bool isClosed() const
{
- return bool(mbIsClosed);
+ return sal_Bool(mbIsClosed);
}
- void setClosed(bool bNew)
+ void setClosed(sal_Bool bNew)
{
mbIsClosed = bNew;
}
@@ -204,7 +204,7 @@ public:
ImplPolygonTemplate()
: mnBezierCount(0L),
mpVectors(0L),
- mbIsClosed(false)
+ mbIsClosed(sal_False)
{
// complete initialization with defaults
}
@@ -276,27 +276,27 @@ public:
}
}
- bool isEqual(const ImplPolygonTemplate& rPointList) const
+ sal_Bool isEqual(const ImplPolygonTemplate& rPointList) const
{
// same point count?
if(maPoints.size() != rPointList.maPoints.size())
- return false;
+ return sal_False;
// if zero points the polys are equal
if(!maPoints.size())
- return true;
+ return sal_True;
// if bezier count used it needs to be equal
if(mnBezierCount != rPointList.mnBezierCount)
- return false;
+ return sal_False;
// compare point content
if(maPoints != rPointList.maPoints)
- return false;
+ return sal_False;
// beziercounts are equal: if it's zero, we are done
if(!mnBezierCount)
- return true;
+ return sal_True;
// beziercounts are equal and not zero; compare them
DBG_ASSERT(0L != mpVectors, "Error: Bezier list needs to exist here(!)");
@@ -328,9 +328,9 @@ public:
if(mpVectors)
{
LocalImplSimpleBezierEntry& rDest = (*mpVectors)[nIndex];
- bool bBezierNeededBefore(rDest.isBezierNeeded());
+ sal_Bool bBezierNeededBefore(rDest.isBezierNeeded());
((*mpVectors)[nIndex]).setBackwardVector(rValue);
- bool bBezierNeededAfter(rDest.isBezierNeeded());
+ sal_Bool bBezierNeededAfter(rDest.isBezierNeeded());
if(bBezierNeededBefore != bBezierNeededAfter)
{
@@ -342,7 +342,7 @@ public:
}
else
{
- bool bEmptyVector(rValue.equalZero());
+ sal_Bool bEmptyVector(rValue.equalZero());
if(bEmptyVector)
return;
@@ -366,9 +366,9 @@ public:
if(mpVectors)
{
LocalImplSimpleBezierEntry& rDest = (*mpVectors)[nIndex];
- bool bBezierNeededBefore(rDest.isBezierNeeded());
+ sal_Bool bBezierNeededBefore(rDest.isBezierNeeded());
((*mpVectors)[nIndex]).setForwardVector(rValue);
- bool bBezierNeededAfter(rDest.isBezierNeeded());
+ sal_Bool bBezierNeededAfter(rDest.isBezierNeeded());
if(bBezierNeededBefore != bBezierNeededAfter)
{
@@ -380,7 +380,7 @@ public:
}
else
{
- bool bEmptyVector(rValue.equalZero());
+ sal_Bool bEmptyVector(rValue.equalZero());
if(bEmptyVector)
return;