summaryrefslogtreecommitdiff
path: root/basegfx/source
diff options
context:
space:
mode:
authorAsela Dasanayaka <rukmal.tb@gmail.com>2016-07-30 12:31:53 +0530
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-07-30 23:28:50 +0000
commitcf0fea5546c9b6b30d18deb084ddaa5e08aad41b (patch)
tree1fb3d3db795f8194d4b22dd8cbb8663b1d107bc9 /basegfx/source
parent91e4949832514e604e29f69ad8f9c70eb612dae2 (diff)
tdf#96505 get rid of "long" integer literals 'L'
Remove L from integer literals in module basegfx all 0L, 1L, and 2L Change-Id: Ia8a0d660033651f6d0a35392b74b67358b639fb3 Reviewed-on: https://gerrit.libreoffice.org/27717 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'basegfx/source')
-rw-r--r--basegfx/source/curve/b2dcubicbezier.cxx8
-rw-r--r--basegfx/source/polygon/b2dlinegeometry.cxx4
-rw-r--r--basegfx/source/polygon/b2dpolygonclipper.cxx10
-rw-r--r--basegfx/source/polygon/b2dpolygoncutandtouch.cxx36
-rw-r--r--basegfx/source/polygon/b2dpolygontools.cxx66
-rw-r--r--basegfx/source/polygon/b2dpolygontriangulator.cxx10
-rw-r--r--basegfx/source/polygon/b2dpolypolygoncutter.cxx10
-rw-r--r--basegfx/source/polygon/b2dpolypolygontools.cxx8
-rw-r--r--basegfx/source/polygon/b3dpolygon.cxx44
-rw-r--r--basegfx/source/polygon/b3dpolygontools.cxx22
-rw-r--r--basegfx/source/polygon/b3dpolypolygontools.cxx10
-rw-r--r--basegfx/source/tools/unopolypolygon.cxx2
-rw-r--r--basegfx/source/tools/unotools.cxx4
13 files changed, 117 insertions, 117 deletions
diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx
index 5b320de7d56f..ed81ea37b194 100644
--- a/basegfx/source/curve/b2dcubicbezier.cxx
+++ b/basegfx/source/curve/b2dcubicbezier.cxx
@@ -670,7 +670,7 @@ namespace basegfx
double B2DCubicBezier::getSmallestDistancePointToBezierSegment(const B2DPoint& rTestPoint, double& rCut) const
{
- const sal_uInt32 nInitialDivisions(3L);
+ const sal_uInt32 nInitialDivisions(3);
B2DPolygon aInitialPolygon;
// as start make a fix division, creates nInitialDivisions + 2L points
@@ -684,7 +684,7 @@ namespace basegfx
double fNewQuadDist;
sal_uInt32 nSmallestIndex(0);
- for(sal_uInt32 a(1L); a < nPointCount; a++)
+ for(sal_uInt32 a(1); a < nPointCount; a++)
{
aVector = B2DVector(rTestPoint - aInitialPolygon.getB2DPoint(a));
fNewQuadDist = aVector.getX() * aVector.getX() + aVector.getY() * aVector.getY();
@@ -697,8 +697,8 @@ namespace basegfx
}
// look right and left for even smaller distances
- double fStepValue(1.0 / (double)((nPointCount - 1L) * 2L)); // half the edge step width
- double fPosition((double)nSmallestIndex / (double)(nPointCount - 1L));
+ double fStepValue(1.0 / (double)((nPointCount - 1) * 2)); // half the edge step width
+ double fPosition((double)nSmallestIndex / (double)(nPointCount - 1));
bool bDone(false);
while(!bDone)
diff --git a/basegfx/source/polygon/b2dlinegeometry.cxx b/basegfx/source/polygon/b2dlinegeometry.cxx
index abf80ccc59ce..574c9c1b31d6 100644
--- a/basegfx/source/polygon/b2dlinegeometry.cxx
+++ b/basegfx/source/polygon/b2dlinegeometry.cxx
@@ -46,7 +46,7 @@ namespace basegfx
double fShift)
{
B2DPolyPolygon aRetval;
- OSL_ENSURE(rCandidate.count() > 1L, "createAreaGeometryForLineStartEnd: Line polygon has too less points (!)");
+ OSL_ENSURE(rCandidate.count() > 1, "createAreaGeometryForLineStartEnd: Line polygon has too less points (!)");
OSL_ENSURE(rArrow.count() > 0, "createAreaGeometryForLineStartEnd: Empty arrow tools::PolyPolygon (!)");
OSL_ENSURE(fWidth > 0.0, "createAreaGeometryForLineStartEnd: Width too small (!)");
OSL_ENSURE(fDockingPosition >= 0.0 && fDockingPosition <= 1.0,
@@ -98,7 +98,7 @@ namespace basegfx
// get the polygon vector we want to plant this arrow on
const double fConsumedLength(fArrowYLength * (1.0 - fDockingPosition) - fShift);
- const B2DVector aHead(rCandidate.getB2DPoint((bStart) ? 0 : rCandidate.count() - 1L));
+ const B2DVector aHead(rCandidate.getB2DPoint((bStart) ? 0 : rCandidate.count() - 1));
const B2DVector aTail(getPositionAbsolute(rCandidate,
(bStart) ? fConsumedLength : fCandidateLength - fConsumedLength, fCandidateLength));
diff --git a/basegfx/source/polygon/b2dpolygonclipper.cxx b/basegfx/source/polygon/b2dpolygonclipper.cxx
index f0e8ede6a27d..2ec349e5b0e6 100644
--- a/basegfx/source/polygon/b2dpolygonclipper.cxx
+++ b/basegfx/source/polygon/b2dpolygonclipper.cxx
@@ -93,7 +93,7 @@ namespace basegfx
bParallelToXAxis ? fValueOnOtherAxis : aCandidateRange.getMaxY() + fSmallExtension);
const B2DPolygon aCandidate(addPointsAtCuts(rCandidate, aStart, aEnd));
const sal_uInt32 nPointCount(aCandidate.count());
- const sal_uInt32 nEdgeCount(aCandidate.isClosed() ? nPointCount : nPointCount - 1L);
+ const sal_uInt32 nEdgeCount(aCandidate.isClosed() ? nPointCount : nPointCount - 1);
B2DCubicBezier aEdge;
B2DPolygon aRun;
@@ -247,7 +247,7 @@ namespace basegfx
if(aRetval.count())
{
// against Y-Axis, lower value
- if(1L == aRetval.count())
+ if(1 == aRetval.count())
{
aRetval = clipPolygonOnParallelAxis(aRetval.getB2DPolygon(0), false, bInside, rRange.getMinX(), bStroke);
}
@@ -259,7 +259,7 @@ namespace basegfx
if(aRetval.count())
{
// against X-Axis, higher value
- if(1L == aRetval.count())
+ if(1 == aRetval.count())
{
aRetval = clipPolygonOnParallelAxis(aRetval.getB2DPolygon(0), true, !bInside, rRange.getMaxY(), bStroke);
}
@@ -271,7 +271,7 @@ namespace basegfx
if(aRetval.count())
{
// against Y-Axis, higher value
- if(1L == aRetval.count())
+ if(1 == aRetval.count())
{
aRetval = clipPolygonOnParallelAxis(aRetval.getB2DPolygon(0), false, !bInside, rRange.getMaxX(), bStroke);
}
@@ -353,7 +353,7 @@ namespace basegfx
// add cuts with clip to polygon, including bezier segments
const B2DPolygon aCandidate(addPointsAtCuts(rCandidate.getB2DPolygon(a), rClip));
const sal_uInt32 nPointCount(aCandidate.count());
- const sal_uInt32 nEdgeCount(aCandidate.isClosed() ? nPointCount : nPointCount - 1L);
+ const sal_uInt32 nEdgeCount(aCandidate.isClosed() ? nPointCount : nPointCount - 1);
B2DCubicBezier aEdge;
B2DPolygon aRun;
diff --git a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
index 22ee49622b78..9b8bf8413158 100644
--- a/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
+++ b/basegfx/source/polygon/b2dpolygoncutandtouch.cxx
@@ -145,7 +145,7 @@ namespace basegfx
const B2DPoint& aNewPoint(rTempPoint.getPoint());
// do not add points double
- if(!aRetval.getB2DPoint(aRetval.count() - 1L).equal(aNewPoint))
+ if(!aRetval.getB2DPoint(aRetval.count() - 1).equal(aNewPoint))
{
aRetval.append(aNewPoint);
}
@@ -180,7 +180,7 @@ namespace basegfx
// cut positions in the polygon to relative cut positions on the original bezier
// segment.
const sal_uInt32 nTempPointCount(rPointVector.size());
- const sal_uInt32 nEdgeCount(rPolygon.count() ? rPolygon.count() - 1L : 0);
+ const sal_uInt32 nEdgeCount(rPolygon.count() ? rPolygon.count() - 1 : 0);
if(nTempPointCount && nEdgeCount)
{
@@ -287,13 +287,13 @@ namespace basegfx
for(sal_uInt32 a(0); a < nEdgeCountA; a++)
{
- const B2DPoint aNextA(rCandidateA.getB2DPoint(a + 1L));
+ const B2DPoint aNextA(rCandidateA.getB2DPoint(a + 1));
const B2DRange aRangeA(aCurrA, aNextA);
B2DPoint aCurrB(rCandidateB.getB2DPoint(0));
for(sal_uInt32 b(0); b < nEdgeCountB; b++)
{
- const B2DPoint aNextB(rCandidateB.getB2DPoint(b + 1L));
+ const B2DPoint aNextB(rCandidateB.getB2DPoint(b + 1));
const B2DRange aRangeB(aCurrB, aNextB);
if(aRangeA.overlaps(aRangeB))
@@ -496,7 +496,7 @@ namespace basegfx
if(nPointCount)
{
- const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1L);
+ const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1);
if(nEdgeCount)
{
@@ -507,7 +507,7 @@ namespace basegfx
B2DCubicBezier aCubicA;
B2DCubicBezier aCubicB;
- for(sal_uInt32 a(0); a < nEdgeCount - 1L; a++)
+ for(sal_uInt32 a(0); a < nEdgeCount - 1; a++)
{
rCandidate.getBezierSegment(a, aCubicA);
aCubicA.testAndSolveTrivialBezier();
@@ -520,7 +520,7 @@ namespace basegfx
findEdgeCutsOneBezier(aCubicA, a, rTempPoints);
}
- for(sal_uInt32 b(a + 1L); b < nEdgeCount; b++)
+ for(sal_uInt32 b(a + 1); b < nEdgeCount; b++)
{
rCandidate.getBezierSegment(b, aCubicB);
aCubicB.testAndSolveTrivialBezier();
@@ -565,15 +565,15 @@ namespace basegfx
{
B2DPoint aCurrA(rCandidate.getB2DPoint(0));
- for(sal_uInt32 a(0); a < nEdgeCount - 1L; a++)
+ for(sal_uInt32 a(0); a < nEdgeCount - 1; a++)
{
- const B2DPoint aNextA(rCandidate.getB2DPoint(a + 1L == nPointCount ? 0 : a + 1L));
+ const B2DPoint aNextA(rCandidate.getB2DPoint(a + 1 == nPointCount ? 0 : a + 1));
const B2DRange aRangeA(aCurrA, aNextA);
- B2DPoint aCurrB(rCandidate.getB2DPoint(a + 1L));
+ B2DPoint aCurrB(rCandidate.getB2DPoint(a + 1));
- for(sal_uInt32 b(a + 1L); b < nEdgeCount; b++)
+ for(sal_uInt32 b(a + 1); b < nEdgeCount; b++)
{
- const B2DPoint aNextB(rCandidate.getB2DPoint(b + 1L == nPointCount ? 0 : b + 1L));
+ const B2DPoint aNextB(rCandidate.getB2DPoint(b + 1 == nPointCount ? 0 : b + 1));
const B2DRange aRangeB(aCurrB, aNextB);
// consecutive segments touch of course
@@ -683,7 +683,7 @@ namespace basegfx
if(nPointCount && nEdgePointCount)
{
- const sal_uInt32 nEdgeCount(rEdgePolygon.isClosed() ? nEdgePointCount : nEdgePointCount - 1L);
+ const sal_uInt32 nEdgeCount(rEdgePolygon.isClosed() ? nEdgePointCount : nEdgePointCount - 1);
B2DPoint aCurr(rEdgePolygon.getB2DPoint(0));
for(sal_uInt32 a(0); a < nEdgeCount; a++)
@@ -738,8 +738,8 @@ namespace basegfx
if(nPointCountA && nPointCountB)
{
- const sal_uInt32 nEdgeCountA(rCandidateA.isClosed() ? nPointCountA : nPointCountA - 1L);
- const sal_uInt32 nEdgeCountB(rCandidateB.isClosed() ? nPointCountB : nPointCountB - 1L);
+ const sal_uInt32 nEdgeCountA(rCandidateA.isClosed() ? nPointCountA : nPointCountA - 1);
+ const sal_uInt32 nEdgeCountB(rCandidateB.isClosed() ? nPointCountB : nPointCountB - 1);
if(nEdgeCountA && nEdgeCountB)
{
@@ -803,13 +803,13 @@ namespace basegfx
for(sal_uInt32 a(0); a < nEdgeCountA; a++)
{
- const B2DPoint aNextA(rCandidateA.getB2DPoint(a + 1L == nPointCountA ? 0 : a + 1L));
+ const B2DPoint aNextA(rCandidateA.getB2DPoint(a + 1 == nPointCountA ? 0 : a + 1));
const B2DRange aRangeA(aCurrA, aNextA);
B2DPoint aCurrB(rCandidateB.getB2DPoint(0));
for(sal_uInt32 b(0); b < nEdgeCountB; b++)
{
- const B2DPoint aNextB(rCandidateB.getB2DPoint(b + 1L == nPointCountB ? 0 : b + 1L));
+ const B2DPoint aNextB(rCandidateB.getB2DPoint(b + 1 == nPointCountB ? 0 : b + 1));
const B2DRange aRangeB(aCurrB, aNextB);
// consecutive segments touch of course
@@ -869,7 +869,7 @@ namespace basegfx
{
B2DPolyPolygon aRetval;
- if(1L == nCount)
+ if(1 == nCount)
{
if(bSelfIntersections)
{
diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 2172fd71e1d1..dac94db082ef 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -40,7 +40,7 @@
// #i37443#
#define ANGLE_BOUND_START_VALUE (2.25)
#define ANGLE_BOUND_MINIMUM_VALUE (0.1)
-#define COUNT_SUBDIVIDE_DEFAULT (4L)
+#define COUNT_SUBDIVIDE_DEFAULT (4)
#ifdef DBG_UTIL
static double fAngleBoundStartValue = ANGLE_BOUND_START_VALUE;
#endif
@@ -106,11 +106,11 @@ namespace basegfx
if(nIndex)
{
- return nIndex - 1L;
+ return nIndex - 1;
}
else if(rCandidate.count())
{
- return rCandidate.count() - 1L;
+ return rCandidate.count() - 1;
}
else
{
@@ -122,11 +122,11 @@ namespace basegfx
{
OSL_ENSURE(nIndex < rCandidate.count(), "getIndexOfPredecessor: Access to polygon out of range (!)");
- if(nIndex + 1L < rCandidate.count())
+ if(nIndex + 1 < rCandidate.count())
{
- return nIndex + 1L;
+ return nIndex + 1;
}
- else if(nIndex + 1L == rCandidate.count())
+ else if(nIndex + 1 == rCandidate.count())
{
return 0;
}
@@ -140,7 +140,7 @@ namespace basegfx
{
B2VectorOrientation eRetval(B2VectorOrientation::Neutral);
- if(rCandidate.count() > 2L || rCandidate.areControlPointsUsed())
+ if(rCandidate.count() > 2 || rCandidate.areControlPointsUsed())
{
const double fSignedArea(getSignedArea(rCandidate));
@@ -402,7 +402,7 @@ namespace basegfx
if(nPointCount)
{
- B2DPoint aCurrentPoint(aCandidate.getB2DPoint(nPointCount - 1L));
+ B2DPoint aCurrentPoint(aCandidate.getB2DPoint(nPointCount - 1));
for(sal_uInt32 a(0); a < nPointCount; a++)
{
@@ -481,7 +481,7 @@ namespace basegfx
{
for(sal_uInt32 a(0); a < nPointCount; a++)
{
- const B2DPoint aPreviousPoint(aCandidate.getB2DPoint((!a) ? nPointCount - 1L : a - 1L));
+ const B2DPoint aPreviousPoint(aCandidate.getB2DPoint((!a) ? nPointCount - 1 : a - 1));
const B2DPoint aCurrentPoint(aCandidate.getB2DPoint(a));
fRetval += aPreviousPoint.getX() * aCurrentPoint.getY();
@@ -558,7 +558,7 @@ namespace basegfx
if(nPointCount)
{
- const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1L);
+ const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1);
if(rCandidate.areControlPointsUsed())
{
@@ -599,12 +599,12 @@ namespace basegfx
B2DPoint aRetval;
const sal_uInt32 nPointCount(rCandidate.count());
- if( 1L == nPointCount )
+ if( 1 == nPointCount )
{
// only one point (i.e. no edge) - simply take that point
aRetval = rCandidate.getB2DPoint(0);
}
- else if(nPointCount > 1L)
+ else if(nPointCount > 1)
{
const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1);
sal_uInt32 nIndex(0);
@@ -623,7 +623,7 @@ namespace basegfx
{
// if fDistance < 0.0 increment with multiple of fLength
sal_uInt32 nCount(sal_uInt32(-fDistance / fLength));
- fDistance += double(nCount + 1L) * fLength;
+ fDistance += double(nCount + 1) * fLength;
}
else
{
@@ -1530,7 +1530,7 @@ namespace basegfx
if(nPointCount)
{
- const sal_uInt32 nEdgeCount(aCandidate.isClosed() ? nPointCount : nPointCount - 1L);
+ const sal_uInt32 nEdgeCount(aCandidate.isClosed() ? nPointCount : nPointCount - 1);
B2DPoint aCurrent(aCandidate.getB2DPoint(0));
if(nEdgeCount)
@@ -1968,9 +1968,9 @@ namespace basegfx
OSL_ENSURE(!rCandidate.areControlPointsUsed(), "hasNeutralPoints: ATM works not for curves (!)");
const sal_uInt32 nPointCount(rCandidate.count());
- if(nPointCount > 2L)
+ if(nPointCount > 2)
{
- B2DPoint aPrevPoint(rCandidate.getB2DPoint(nPointCount - 1L));
+ B2DPoint aPrevPoint(rCandidate.getB2DPoint(nPointCount - 1));
B2DPoint aCurrPoint(rCandidate.getB2DPoint(0));
for(sal_uInt32 a(0); a < nPointCount; a++)
@@ -2003,7 +2003,7 @@ namespace basegfx
{
const sal_uInt32 nPointCount(rCandidate.count());
B2DPolygon aRetval;
- B2DPoint aPrevPoint(rCandidate.getB2DPoint(nPointCount - 1L));
+ B2DPoint aPrevPoint(rCandidate.getB2DPoint(nPointCount - 1));
B2DPoint aCurrPoint(rCandidate.getB2DPoint(0));
for(sal_uInt32 a(0); a < nPointCount; a++)
@@ -2050,9 +2050,9 @@ namespace basegfx
OSL_ENSURE(!rCandidate.areControlPointsUsed(), "isConvex: ATM works not for curves (!)");
const sal_uInt32 nPointCount(rCandidate.count());
- if(nPointCount > 2L)
+ if(nPointCount > 2)
{
- const B2DPoint aPrevPoint(rCandidate.getB2DPoint(nPointCount - 1L));
+ const B2DPoint aPrevPoint(rCandidate.getB2DPoint(nPointCount - 1));
B2DPoint aCurrPoint(rCandidate.getB2DPoint(0));
B2DVector aCurrVec(aPrevPoint - aCurrPoint);
B2VectorOrientation aOrientation(B2VectorOrientation::Neutral);
@@ -2138,14 +2138,14 @@ namespace basegfx
const B2DPolygon aCandidate(rCandidate.areControlPointsUsed() ? rCandidate.getDefaultAdaptiveSubdivision() : rCandidate);
const sal_uInt32 nPointCount(aCandidate.count());
- if(nPointCount > 1L)
+ if(nPointCount > 1)
{
- const sal_uInt32 nLoopCount(aCandidate.isClosed() ? nPointCount : nPointCount - 1L);
+ const sal_uInt32 nLoopCount(aCandidate.isClosed() ? nPointCount : nPointCount - 1);
B2DPoint aCurrentPoint(aCandidate.getB2DPoint(0));
for(sal_uInt32 a(0); a < nLoopCount; a++)
{
- const B2DPoint aNextPoint(aCandidate.getB2DPoint((a + 1L) % nPointCount));
+ const B2DPoint aNextPoint(aCandidate.getB2DPoint((a + 1) % nPointCount));
if(isPointOnLine(aCurrentPoint, aNextPoint, rPoint, bWithPoints))
{
@@ -2211,12 +2211,12 @@ namespace basegfx
{
const sal_uInt32 nCount(rCandidate.count());
- if(nCount > 2L)
+ if(nCount > 2)
{
const B2DPoint aStart(rCandidate.getB2DPoint(0));
- B2DPoint aLast(rCandidate.getB2DPoint(1L));
+ B2DPoint aLast(rCandidate.getB2DPoint(1));
- for(sal_uInt32 a(2L); a < nCount; a++)
+ for(sal_uInt32 a(2); a < nCount; a++)
{
const B2DPoint aCurrent(rCandidate.getB2DPoint(a));
rTarget.append(aStart);
@@ -2433,10 +2433,10 @@ namespace basegfx
double fRetval(DBL_MAX);
const sal_uInt32 nPointCount(rCandidate.count());
- if(nPointCount > 1L)
+ if(nPointCount > 1)
{
const double fZero(0.0);
- const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1L);
+ const sal_uInt32 nEdgeCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1);
B2DCubicBezier aBezier;
aBezier.setStartPoint(rCandidate.getB2DPoint(0));
@@ -2493,7 +2493,7 @@ namespace basegfx
}
else
{
- if(rEdgeIndex != nEdgeCount - 1L)
+ if(rEdgeIndex != nEdgeCount - 1)
{
rEdgeIndex++;
rCut = 0.0;
@@ -2784,12 +2784,12 @@ namespace basegfx
if(nPointCount)
{
- B2DPoint aPrev(rCandidate.getB2DPoint(nPointCount - 1L));
+ B2DPoint aPrev(rCandidate.getB2DPoint(nPointCount - 1));
B2DPoint aCurrent(rCandidate.getB2DPoint(0));
for(sal_uInt32 a(0); a < nPointCount; a++)
{
- const B2DPoint aNext(rCandidate.getB2DPoint(a + 1L == nPointCount ? 0 : a + 1L));
+ const B2DPoint aNext(rCandidate.getB2DPoint(a + 1 == nPointCount ? 0 : a + 1));
const B2DVector aBack(aPrev - aCurrent);
const B2DVector aForw(aNext - aCurrent);
const B2DVector aPerpBack(getNormalizedPerpendicular(aBack));
@@ -2825,7 +2825,7 @@ namespace basegfx
if(nPointCount && nSegments)
{
// get current segment count
- const sal_uInt32 nSegmentCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1L);
+ const sal_uInt32 nSegmentCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1);
if(nSegmentCount == nSegments)
{
@@ -2834,7 +2834,7 @@ namespace basegfx
else
{
const double fLength(getLength(rCandidate));
- const sal_uInt32 nLoopCount(rCandidate.isClosed() ? nSegments : nSegments + 1L);
+ const sal_uInt32 nLoopCount(rCandidate.isClosed() ? nSegments : nSegments + 1);
for(sal_uInt32 a(0); a < nLoopCount; a++)
{
@@ -3548,7 +3548,7 @@ namespace basegfx
else
{
// add last point as closing point
- const B2DPoint aClosingPoint(rPolygon.getB2DPoint(nPointCount - 1L));
+ const B2DPoint aClosingPoint(rPolygon.getB2DPoint(nPointCount - 1));
aCollectPoints.push_back(
css::awt::Point(
fround(aClosingPoint.getX()),
diff --git a/basegfx/source/polygon/b2dpolygontriangulator.cxx b/basegfx/source/polygon/b2dpolygontriangulator.cxx
index 8d1948edaf9a..ccc0680134dc 100644
--- a/basegfx/source/polygon/b2dpolygontriangulator.cxx
+++ b/basegfx/source/polygon/b2dpolygontriangulator.cxx
@@ -228,9 +228,9 @@ namespace basegfx
const B2DPolygon aPolygonCandidate(rCandidate.getB2DPolygon(a));
const sal_uInt32 nCount(aPolygonCandidate.count());
- if(nCount > 2L)
+ if(nCount > 2)
{
- B2DPoint aPrevPnt(aPolygonCandidate.getB2DPoint(nCount - 1L));
+ B2DPoint aPrevPnt(aPolygonCandidate.getB2DPoint(nCount - 1));
for(sal_uInt32 b(0); b < nCount; b++)
{
@@ -396,12 +396,12 @@ namespace basegfx
aCandidate.removeDoublePoints();
aCandidate = tools::removeNeutralPoints(aCandidate);
- if(2L == aCandidate.count())
+ if(2 == aCandidate.count())
{
// candidate IS a triangle, just append
aRetval.append(aCandidate);
}
- else if(aCandidate.count() > 2L)
+ else if(aCandidate.count() > 2)
{
if(tools::isConvex(aCandidate))
{
@@ -427,7 +427,7 @@ namespace basegfx
// subdivide locally (triangulate does not work with beziers)
B2DPolyPolygon aCandidate(rCandidate.areControlPointsUsed() ? tools::adaptiveSubdivideByAngle(rCandidate) : rCandidate);
- if(1L == aCandidate.count())
+ if(1 == aCandidate.count())
{
// single polygon -> single polygon triangulation
const B2DPolygon aSinglePolygon(aCandidate.getB2DPolygon(0));
diff --git a/basegfx/source/polygon/b2dpolypolygoncutter.cxx b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
index e7bf5a0ba246..5cbf3162e3e8 100644
--- a/basegfx/source/polygon/b2dpolypolygoncutter.cxx
+++ b/basegfx/source/polygon/b2dpolypolygoncutter.cxx
@@ -815,7 +815,7 @@ namespace basegfx
if(nCount)
{
- if(nCount == 1L)
+ if(nCount == 1)
{
if(!bKeepAboveZero && B2VectorOrientation::Positive == tools::getOrientation(rCandidate.getB2DPolygon(0)))
{
@@ -834,15 +834,15 @@ namespace basegfx
StripHelper* pNewHelper = &(aHelpers[a]);
pNewHelper->maRange = tools::getRange(aCandidate);
pNewHelper->meOrinetation = tools::getOrientation(aCandidate);
- pNewHelper->mnDepth = (B2VectorOrientation::Negative == pNewHelper->meOrinetation ? -1L : 0);
+ pNewHelper->mnDepth = (B2VectorOrientation::Negative == pNewHelper->meOrinetation ? -1 : 0);
}
- for(a = 0; a < nCount - 1L; a++)
+ for(a = 0; a < nCount - 1; a++)
{
const B2DPolygon aCandA(rCandidate.getB2DPolygon(a));
StripHelper& rHelperA = aHelpers[a];
- for(b = a + 1L; b < nCount; b++)
+ for(b = a + 1; b < nCount; b++)
{
const B2DPolygon aCandB(rCandidate.getB2DPolygon(b));
StripHelper& rHelperB = aHelpers[b];
@@ -897,7 +897,7 @@ namespace basegfx
for(a = 0; a < nCount; a++)
{
const StripHelper& rHelper = aHelpers[a];
- bool bAcceptEntry(bKeepAboveZero ? 1L <= rHelper.mnDepth : 0 == rHelper.mnDepth);
+ bool bAcceptEntry(bKeepAboveZero ? 1 <= rHelper.mnDepth : 0 == rHelper.mnDepth);
if(bAcceptEntry)
{
diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx
index 016eb476aa38..5afd298d3fa5 100644
--- a/basegfx/source/polygon/b2dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolypolygontools.cxx
@@ -54,7 +54,7 @@ namespace basegfx
}
}
- const bool bShallBeHole(1L == (nDepth & 0x00000001));
+ const bool bShallBeHole(1 == (nDepth & 0x00000001));
const bool bIsHole(B2VectorOrientation::Negative == aOrientation);
if(bShallBeHole != bIsHole && B2VectorOrientation::Neutral != aOrientation)
@@ -72,7 +72,7 @@ namespace basegfx
{
const sal_uInt32 nCount(rCandidate.count());
- if(nCount > 1L)
+ if(nCount > 1)
{
for(sal_uInt32 a(0); a < nCount; a++)
{
@@ -174,7 +174,7 @@ namespace basegfx
{
const sal_uInt32 nPolygonCount(rCandidate.count());
- if(1L == nPolygonCount)
+ if(1 == nPolygonCount)
{
return isInside(rCandidate.getB2DPolygon(0), rPoint, bWithBorder);
}
@@ -193,7 +193,7 @@ namespace basegfx
}
}
- return (nInsideCount % 2L);
+ return (nInsideCount % 2);
}
}
diff --git a/basegfx/source/polygon/b3dpolygon.cxx b/basegfx/source/polygon/b3dpolygon.cxx
index d607bd65a288..184194313fd8 100644
--- a/basegfx/source/polygon/b3dpolygon.cxx
+++ b/basegfx/source/polygon/b3dpolygon.cxx
@@ -220,9 +220,9 @@ public:
{
if(maVector.size() > 1)
{
- const sal_uInt32 nHalfSize(maVector.size() >> 1L);
+ const sal_uInt32 nHalfSize(maVector.size() >> 1);
CoordinateData3DVector::iterator aStart(maVector.begin());
- CoordinateData3DVector::iterator aEnd(maVector.end() - 1L);
+ CoordinateData3DVector::iterator aEnd(maVector.end() - 1);
for(sal_uInt32 a(0); a < nHalfSize; a++)
{
@@ -389,9 +389,9 @@ public:
{
if(maVector.size() > 1)
{
- const sal_uInt32 nHalfSize(maVector.size() >> 1L);
+ const sal_uInt32 nHalfSize(maVector.size() >> 1);
BColorDataVector::iterator aStart(maVector.begin());
- BColorDataVector::iterator aEnd(maVector.end() - 1L);
+ BColorDataVector::iterator aEnd(maVector.end() - 1);
for(sal_uInt32 a(0); a < nHalfSize; a++)
{
@@ -546,9 +546,9 @@ public:
{
if(maVector.size() > 1)
{
- const sal_uInt32 nHalfSize(maVector.size() >> 1L);
+ const sal_uInt32 nHalfSize(maVector.size() >> 1);
NormalsData3DVector::iterator aStart(maVector.begin());
- NormalsData3DVector::iterator aEnd(maVector.end() - 1L);
+ NormalsData3DVector::iterator aEnd(maVector.end() - 1);
for(sal_uInt32 a(0); a < nHalfSize; a++)
{
@@ -713,9 +713,9 @@ public:
{
if(maVector.size() > 1)
{
- const sal_uInt32 nHalfSize(maVector.size() >> 1L);
+ const sal_uInt32 nHalfSize(maVector.size() >> 1);
TextureData2DVector::iterator aStart(maVector.begin());
- TextureData2DVector::iterator aEnd(maVector.end() - 1L);
+ TextureData2DVector::iterator aEnd(maVector.end() - 1);
for(sal_uInt32 a(0); a < nHalfSize; a++)
{
@@ -1349,7 +1349,7 @@ public:
if(mbIsClosed)
{
// check for same start and end point
- const sal_uInt32 nIndex(maPoints.count() - 1L);
+ const sal_uInt32 nIndex(maPoints.count() - 1);
if(maPoints.getCoordinate(0) == maPoints.getCoordinate(nIndex))
{
@@ -1373,19 +1373,19 @@ public:
}
// test for range
- for(sal_uInt32 a(0); a < maPoints.count() - 1L; a++)
+ for(sal_uInt32 a(0); a < maPoints.count() - 1; a++)
{
- if(maPoints.getCoordinate(a) == maPoints.getCoordinate(a + 1L))
+ if(maPoints.getCoordinate(a) == maPoints.getCoordinate(a + 1))
{
- const bool bBColorEqual(!mpBColors || (mpBColors->getBColor(a) == mpBColors->getBColor(a + 1L)));
+ const bool bBColorEqual(!mpBColors || (mpBColors->getBColor(a) == mpBColors->getBColor(a + 1)));
if(bBColorEqual)
{
- const bool bNormalsEqual(!mpNormals || (mpNormals->getNormal(a) == mpNormals->getNormal(a + 1L)));
+ const bool bNormalsEqual(!mpNormals || (mpNormals->getNormal(a) == mpNormals->getNormal(a + 1)));
if(bNormalsEqual)
{
- const bool bTextureCoordinatesEqual(!mpTextureCoordinates || (mpTextureCoordinates->getTextureCoordinate(a) == mpTextureCoordinates->getTextureCoordinate(a + 1L)));
+ const bool bTextureCoordinatesEqual(!mpTextureCoordinates || (mpTextureCoordinates->getTextureCoordinate(a) == mpTextureCoordinates->getTextureCoordinate(a + 1)));
if(bTextureCoordinatesEqual)
{
@@ -1410,9 +1410,9 @@ public:
{
bRemove = false;
- if(maPoints.count() > 1L)
+ if(maPoints.count() > 1)
{
- const sal_uInt32 nIndex(maPoints.count() - 1L);
+ const sal_uInt32 nIndex(maPoints.count() - 1);
bRemove = (maPoints.getCoordinate(0) == maPoints.getCoordinate(nIndex));
if(bRemove && mpBColors && !(mpBColors->getBColor(0) == mpBColors->getBColor(nIndex)))
@@ -1433,8 +1433,8 @@ public:
if(bRemove)
{
- const sal_uInt32 nIndex(maPoints.count() - 1L);
- remove(nIndex, 1L);
+ const sal_uInt32 nIndex(maPoints.count() - 1);
+ remove(nIndex, 1);
}
} while(bRemove);
}
@@ -1446,9 +1446,9 @@ public:
// test as long as there are at least two points and as long as the index
// is smaller or equal second last point
- while((maPoints.count() > 1L) && (nIndex <= maPoints.count() - 2L))
+ while((maPoints.count() > 1) && (nIndex <= maPoints.count() - 2))
{
- const sal_uInt32 nNextIndex(nIndex + 1L);
+ const sal_uInt32 nNextIndex(nIndex + 1);
bool bRemove(maPoints.getCoordinate(nIndex) == maPoints.getCoordinate(nNextIndex));
if(bRemove && mpBColors && !(mpBColors->getBColor(nIndex) == mpBColors->getBColor(nNextIndex)))
@@ -1469,7 +1469,7 @@ public:
if(bRemove)
{
// if next is same as index and the control vectors are unused, delete index
- remove(nIndex, 1L);
+ remove(nIndex, 1);
}
else
{
@@ -1706,7 +1706,7 @@ namespace basegfx
bool B3DPolygon::hasDoublePoints() const
{
- return (mpPolygon->count() > 1L && mpPolygon->hasDoublePoints());
+ return (mpPolygon->count() > 1 && mpPolygon->hasDoublePoints());
}
void B3DPolygon::removeDoublePoints()
diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx
index 1e739fc4aefe..95b0bef4e046 100644
--- a/basegfx/source/polygon/b3dpolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolygontools.cxx
@@ -36,11 +36,11 @@ namespace basegfx
// B3DPolygon tools
void checkClosed(B3DPolygon& rCandidate)
{
- while(rCandidate.count() > 1L
- && rCandidate.getB3DPoint(0).equal(rCandidate.getB3DPoint(rCandidate.count() - 1L)))
+ while(rCandidate.count() > 1
+ && rCandidate.getB3DPoint(0).equal(rCandidate.getB3DPoint(rCandidate.count() - 1)))
{
rCandidate.setClosed(true);
- rCandidate.remove(rCandidate.count() - 1L);
+ rCandidate.remove(rCandidate.count() - 1);
}
}
@@ -48,9 +48,9 @@ namespace basegfx
{
OSL_ENSURE(nIndex < rCandidate.count(), "getIndexOfPredecessor: Access to polygon out of range (!)");
- if(nIndex + 1L < rCandidate.count())
+ if(nIndex + 1 < rCandidate.count())
{
- return nIndex + 1L;
+ return nIndex + 1;
}
else
{
@@ -77,9 +77,9 @@ namespace basegfx
double fRetval(0.0);
const sal_uInt32 nPointCount(rCandidate.count());
- if(nPointCount > 1L)
+ if(nPointCount > 1)
{
- const sal_uInt32 nLoopCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1L);
+ const sal_uInt32 nLoopCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1);
for(sal_uInt32 a(0); a < nLoopCount; a++)
{
@@ -436,8 +436,8 @@ namespace basegfx
if(fTools::equalZero(aTexCoor.getY()) || fTools::equal(aTexCoor.getY(), fOne))
{
// get prev, next TexCoor and test for pole
- const B2DPoint aPrevTexCoor(aRetval.getTextureCoordinate(a ? a - 1L : nPointCount - 1L));
- const B2DPoint aNextTexCoor(aRetval.getTextureCoordinate((a + 1L) % nPointCount));
+ const B2DPoint aPrevTexCoor(aRetval.getTextureCoordinate(a ? a - 1 : nPointCount - 1));
+ const B2DPoint aNextTexCoor(aRetval.getTextureCoordinate((a + 1) % nPointCount));
const bool bPrevPole(fTools::equalZero(aPrevTexCoor.getY()) || fTools::equal(aPrevTexCoor.getY(), fOne));
const bool bNextPole(fTools::equalZero(aNextTexCoor.getY()) || fTools::equal(aNextTexCoor.getY(), fOne));
@@ -680,9 +680,9 @@ namespace basegfx
{
const sal_uInt32 nPointCount(rCandidate.count());
- if(nPointCount > 1L)
+ if(nPointCount > 1)
{
- const sal_uInt32 nLoopCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1L);
+ const sal_uInt32 nLoopCount(rCandidate.isClosed() ? nPointCount : nPointCount - 1);
B3DPoint aCurrentPoint(rCandidate.getB3DPoint(0));
for(sal_uInt32 a(0); a < nLoopCount; a++)
diff --git a/basegfx/source/polygon/b3dpolypolygontools.cxx b/basegfx/source/polygon/b3dpolypolygontools.cxx
index bcb0ba5cc58d..79ff6e91d6a1 100644
--- a/basegfx/source/polygon/b3dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolypolygontools.cxx
@@ -261,9 +261,9 @@ namespace basegfx
bool bVerToBottom(fTools::equal(fVerStop, -F_PI2));
// create horizontal rings
- const sal_uInt32 nLoopVerInit(bVerFromTop ? 1L : 0);
- const sal_uInt32 nLoopVerLimit(bVerToBottom ? nVerSeg : nVerSeg + 1L);
- const sal_uInt32 nLoopHorLimit(bHorClosed ? nHorSeg : nHorSeg + 1L);
+ const sal_uInt32 nLoopVerInit(bVerFromTop ? 1 : 0);
+ const sal_uInt32 nLoopVerLimit(bVerToBottom ? nVerSeg : nVerSeg + 1);
+ const sal_uInt32 nLoopHorLimit(bHorClosed ? nHorSeg : nHorSeg + 1);
for(a = nLoopVerInit; a < nLoopVerLimit; a++)
{
@@ -459,7 +459,7 @@ namespace basegfx
{
const sal_uInt32 nPolygonCount(rCandidate.count());
- if(1L == nPolygonCount)
+ if(1 == nPolygonCount)
{
return isInside(rCandidate.getB3DPolygon(0), rPoint, bWithBorder);
}
@@ -478,7 +478,7 @@ namespace basegfx
}
}
- return (nInsideCount % 2L);
+ return (nInsideCount % 2);
}
}
diff --git a/basegfx/source/tools/unopolypolygon.cxx b/basegfx/source/tools/unopolypolygon.cxx
index 3639dee57d73..2e12a9e82ae6 100644
--- a/basegfx/source/tools/unopolypolygon.cxx
+++ b/basegfx/source/tools/unopolypolygon.cxx
@@ -175,7 +175,7 @@ namespace unotools
osl::MutexGuard const guard( m_aMutex );
modifying();
- if( index == -1L )
+ if( index == -1 )
{
// set all
maPolyPoly.setClosed( closedState );
diff --git a/basegfx/source/tools/unotools.cxx b/basegfx/source/tools/unotools.cxx
index 8fe38a743bb8..b1666c3d149a 100644
--- a/basegfx/source/tools/unotools.cxx
+++ b/basegfx/source/tools/unotools.cxx
@@ -171,7 +171,7 @@ namespace unotools
const bool bClosed(rPoly.isClosed());
// calculate input vertex count
- const sal_uInt32 nLoopCount(bClosed ? nCount : (nCount ? nCount - 1L : 0 ));
+ const sal_uInt32 nLoopCount(bClosed ? nCount : (nCount ? nCount - 1 : 0 ));
std::vector<awt::Point> aPoints; aPoints.reserve(nLoopCount);
std::vector<drawing::PolygonFlags> aFlags; aFlags.reserve(nLoopCount);
@@ -237,7 +237,7 @@ namespace unotools
else
{
// add last point as closing point
- const basegfx::B2DPoint aClosingPoint(rPoly.getB2DPoint(nCount - 1L));
+ const basegfx::B2DPoint aClosingPoint(rPoly.getB2DPoint(nCount - 1));
const awt::Point aEnd(fround(aClosingPoint.getX()),
fround(aClosingPoint.getY()));
aPoints.push_back(aEnd);