summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-08-16 16:27:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-17 11:25:21 +0200
commit2e8acde112e1c6754df26902e79a78346ba45a2d (patch)
tree2d836747a7aafdd0b64ab9aabf01be59e94745d4 /drawinglayer
parent006a7b50546c57e260245d4630de565705f2fc38 (diff)
remove UL/L suffixes from integer constants on the RHS of expressions
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5 Reviewed-on: https://gerrit.libreoffice.org/41237 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/animatedprimitive2d.cxx4
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitive2d.cxx2
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx6
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx2
-rw-r--r--drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx4
-rw-r--r--drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx8
-rw-r--r--drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx42
-rw-r--r--drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx2
-rw-r--r--drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx2
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx2
-rw-r--r--drawinglayer/source/processor3d/defaultprocessor3d.cxx6
-rw-r--r--drawinglayer/source/texture/texture3d.cxx4
12 files changed, 42 insertions, 42 deletions
diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
index 509ef9c6039e..6110013366e3 100644
--- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx
@@ -158,7 +158,7 @@ namespace drawinglayer
fState = 1.0;
}
- const double fIndex(fState * (double)(nSize - 1L));
+ const double fIndex(fState * (double)(nSize - 1));
const sal_uInt32 nIndA(sal_uInt32(floor(fIndex)));
const double fOffset(fIndex - (double)nIndA);
basegfx::B2DHomMatrix aTargetTransform;
@@ -172,7 +172,7 @@ namespace drawinglayer
else
{
// interpolate. Get involved buffered decomposed matrices
- const sal_uInt32 nIndB((nIndA + 1L) % nSize);
+ const sal_uInt32 nIndB((nIndA + 1) % nSize);
std::vector< basegfx::tools::B2DHomMatrixBufferedDecompose >::const_iterator aMatB(maMatrixStack.begin() + nIndB);
// interpolate for fOffset [0.0 .. 1.0[
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index fc4629b4ee21..35ec935ab9a7 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -34,7 +34,7 @@ namespace drawinglayer
{
void GraphicPrimitive2D::create2DDecomposition(Primitive2DContainer& rContainer, const geometry::ViewInformation2D& ) const
{
- if(255L == getGraphicAttr().GetTransparency())
+ if(255 == getGraphicAttr().GetTransparency())
{
// content is invisible, done
return;
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index f78b53b101be..f557a5f7226d 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -121,9 +121,9 @@ namespace drawinglayer
// Bad trap: There are animated gifs with no set WaitTime (!).
// In that case use a default value.
- if (0L == nWaitTime)
+ if (0 == nWaitTime)
{
- nWaitTime = 100L;
+ nWaitTime = 100;
}
return nWaitTime;
@@ -409,7 +409,7 @@ namespace drawinglayer
// create frame representation in VirtualDevices
if (nIndex >= nLen)
{
- nIndex = nLen - 1L;
+ nIndex = nLen - 1;
}
// check buffering shortcuts, may already be created
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index 2b1d09a70709..f3f95c7d82d1 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -84,7 +84,7 @@ namespace
ImpTimedRefDev::~ImpTimedRefDev()
{
- OSL_ENSURE(0L == mnUseCount, "destruction of a still used ImpTimedRefDev (!)");
+ OSL_ENSURE(0 == mnUseCount, "destruction of a still used ImpTimedRefDev (!)");
const SolarMutexGuard aSolarGuard;
mpVirDev.disposeAndClear();
}
diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
index 5551694e41db..f89e10858449 100644
--- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
@@ -362,8 +362,8 @@ namespace drawinglayer
for(sal_uInt32 a(0); a < nVerSeg; a++)
{
- const bool bFirst(0L == a);
- const bool bLast(a + 1L == nVerSeg);
+ const bool bFirst(0 == a);
+ const bool bLast(a + 1 == nVerSeg);
if(bFirst || !bLast)
{
diff --git a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx
index 2ad004a69676..b546d8b0c544 100644
--- a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx
@@ -95,20 +95,20 @@ namespace drawinglayer
{
basegfx::B3DPolygon aTmpPoly(aFill.getB3DPolygon(a));
- if(aTmpPoly.count() >= 4L)
+ if(aTmpPoly.count() >= 4)
{
- for(sal_uInt32 b(0); b < 4L; b++)
+ for(sal_uInt32 b(0); b < 4; b++)
{
basegfx::B2DPoint aPoint(aTmpPoly.getTextureCoordinate(b));
if(bObjectSpecificX)
{
- aPoint.setX((1L == b || 2L == b) ? 1.0 : 0.0);
+ aPoint.setX((1 == b || 2 == b) ? 1.0 : 0.0);
}
if(bObjectSpecificY)
{
- aPoint.setY((2L == b || 3L == b) ? 1.0 : 0.0);
+ aPoint.setY((2 == b || 3 == b) ? 1.0 : 0.0);
}
aTmpPoly.setTextureCoordinate(b, aPoint);
diff --git a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
index f3a6d3dc9a74..e8d75ee49879 100644
--- a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
@@ -122,7 +122,7 @@ namespace
if(nPointCount)
{
- const sal_uInt32 nEdgeCount(aSubA.isClosed() ? nPointCount : nPointCount - 1L);
+ const sal_uInt32 nEdgeCount(aSubA.isClosed() ? nPointCount : nPointCount - 1);
double fTexHorMultiplicatorA(0.0), fTexHorMultiplicatorB(0.0);
double fPolygonPosA(0.0), fPolygonPosB(0.0);
@@ -138,7 +138,7 @@ namespace
for(sal_uInt32 b(0); b < nEdgeCount; b++)
{
const sal_uInt32 nIndexA(b);
- const sal_uInt32 nIndexB((b + 1L) % nPointCount);
+ const sal_uInt32 nIndexB((b + 1) % nPointCount);
const basegfx::B3DPoint aStartA(aSubA.getB3DPoint(nIndexA));
const basegfx::B3DPoint aEndA(aSubA.getB3DPoint(nIndexB));
@@ -219,13 +219,13 @@ namespace
if(nPointCount)
{
- basegfx::B3DPoint aPrevA(aSubA.getB3DPoint(nPointCount - 1L));
+ basegfx::B3DPoint aPrevA(aSubA.getB3DPoint(nPointCount - 1));
basegfx::B3DPoint aCurrA(aSubA.getB3DPoint(0));
const bool bClosed(aSubA.isClosed());
for(sal_uInt32 b(0); b < nPointCount; b++)
{
- const sal_uInt32 nIndNext((b + 1L) % nPointCount);
+ const sal_uInt32 nIndNext((b + 1) % nPointCount);
const basegfx::B3DPoint aNextA(aSubA.getB3DPoint(nIndNext));
const basegfx::B3DPoint aCurrB(aSubB.getB3DPoint(b));
@@ -242,7 +242,7 @@ namespace
}
// vector to left (correct for non-closed lines)
- const bool bFirstAndNotClosed(!bClosed && 0L == b);
+ const bool bFirstAndNotClosed(!bClosed && 0 == b);
basegfx::B3DVector aLeft(bFirstAndNotClosed ? aCurrA - aNextA : aPrevA - aCurrA);
aLeft.normalize();
@@ -252,7 +252,7 @@ namespace
if(bSmoothHorizontalNormals)
{
// vector to right (correct for non-closed lines)
- const bool bLastAndNotClosed(!bClosed && b + 1L == nPointCount);
+ const bool bLastAndNotClosed(!bClosed && b + 1 == nPointCount);
basegfx::B3DVector aRight(bLastAndNotClosed ? aCurrA - aPrevA : aNextA - aCurrA);
aRight.normalize();
@@ -361,7 +361,7 @@ namespace drawinglayer
bool bCloseFront,
bool bCloseBack)
{
- if(basegfx::fTools::equalZero(fRotation) || 0L == nSteps)
+ if(basegfx::fTools::equalZero(fRotation) || 0 == nSteps)
{
// no rotation or no steps, just one plane
rSliceVector.push_back(Slice3D(rSource, basegfx::B3DHomMatrix()));
@@ -418,7 +418,7 @@ namespace drawinglayer
}
}
- // add start polygon (a = 0L)
+ // add start polygon (a = 0)
if(!bClosedRotation)
{
rSliceVector.push_back(Slice3D(aFront, basegfx::B3DHomMatrix()));
@@ -429,7 +429,7 @@ namespace drawinglayer
for(sal_uInt32 a(0); a < nSteps; a++)
{
- const double fStep((double)(a + 1L) * fStepSize);
+ const double fStep((double)(a + 1) * fStepSize);
basegfx::B2DPolyPolygon aNewPoly(bBackScale ? basegfx::tools::interpolate(aFront, aBack, fStep) : aFront);
basegfx::B3DHomMatrix aNewMat;
aNewMat.rotate(0.0, fRotation * fStep, 0.0);
@@ -589,7 +589,7 @@ namespace drawinglayer
if(nNumSlices)
{
// common parameters
- const sal_uInt32 nLoopCount(bClosed ? nNumSlices : nNumSlices - 1L);
+ const sal_uInt32 nLoopCount(bClosed ? nNumSlices : nNumSlices - 1);
basegfx::B3DPolyPolygon aEdgeRounding;
sal_uInt32 a;
@@ -602,7 +602,7 @@ namespace drawinglayer
if(bCreateTextureCoordinates)
{
aTexRangeFront = basegfx::tools::getRange(rSliceVector[0L].getB3DPolyPolygon());
- aTexRangeBack = basegfx::tools::getRange(rSliceVector[nNumSlices - 1L].getB3DPolyPolygon());
+ aTexRangeBack = basegfx::tools::getRange(rSliceVector[nNumSlices - 1].getB3DPolyPolygon());
if(aTexRangeBack.getDepth() > aTexRangeBack.getWidth())
{
@@ -616,9 +616,9 @@ namespace drawinglayer
basegfx::B3DPoint aCenter(basegfx::tools::getRange(rSliceVector[0L].getB3DPolyPolygon()).getCenter());
- for(a = 0L; a < nLoopCount; a++)
+ for(a = 0; a < nLoopCount; a++)
{
- const basegfx::B3DPoint aNextCenter(basegfx::tools::getRange(rSliceVector[(a + 1L) % nNumSlices].getB3DPolyPolygon()).getCenter());
+ const basegfx::B3DPoint aNextCenter(basegfx::tools::getRange(rSliceVector[(a + 1) % nNumSlices].getB3DPolyPolygon()).getCenter());
const double fLength(basegfx::B3DVector(aNextCenter - aCenter).getLength());
aTexHeightArray.push_back(fLength);
aCenter = aNextCenter;
@@ -635,10 +635,10 @@ namespace drawinglayer
if(nLoopCount)
{
double fTexHeightPos(0.0);
- for(a = 0L; a < nLoopCount; a++)
+ for(a = 0; a < nLoopCount; a++)
{
const Slice3D& rSliceA(rSliceVector[a]);
- const Slice3D& rSliceB(rSliceVector[(a + 1L) % nNumSlices]);
+ const Slice3D& rSliceB(rSliceVector[(a + 1) % nNumSlices]);
const bool bAcceptPair(SLICETYPE3D_REGULAR == rSliceA.getSliceType() && SLICETYPE3D_REGULAR == rSliceB.getSliceType());
basegfx::B3DPolyPolygon aPolA(rSliceA.getB3DPolyPolygon());
basegfx::B3DPolyPolygon aPolB(rSliceB.getB3DPolyPolygon());
@@ -651,7 +651,7 @@ namespace drawinglayer
}
{
- const sal_uInt32 nIndPrev((a + nNumSlices - 1L) % nNumSlices);
+ const sal_uInt32 nIndPrev((a + nNumSlices - 1) % nNumSlices);
const Slice3D& rSlicePrev(rSliceVector[nIndPrev]);
basegfx::B3DPolyPolygon aPrev(rSlicePrev.getB3DPolyPolygon());
basegfx::B3DPolyPolygon aPolAA(rSliceA.getB3DPolyPolygon());
@@ -729,7 +729,7 @@ namespace drawinglayer
if(bCreateTextureCoordinates)
{
fTexStart = fTexHeightPos * fInvTexHeight;
- fTexStop = (fTexHeightPos - aTexHeightArray[(a + nLoopCount - 1L) % nLoopCount]) * fInvTexHeight;
+ fTexStop = (fTexHeightPos - aTexHeightArray[(a + nLoopCount - 1) % nLoopCount]) * fInvTexHeight;
}
impAddInBetweenFill(aEdgeRounding, aPolAA, aPrev, fTexStart, fTexStop, bCreateNormals, bCreateTextureCoordinates);
@@ -740,7 +740,7 @@ namespace drawinglayer
}
else
{
- if(bCreateNormals && bSmoothNormals && (nIndPrev != a + 1L))
+ if(bCreateNormals && bSmoothNormals && (nIndPrev != a + 1))
{
impCreateInBetweenNormals(aPolAA, aPrev, bSmoothHorizontalNormals);
impMixNormals(aPolA, aPolAA, 0.5);
@@ -749,7 +749,7 @@ namespace drawinglayer
}
{
- const sal_uInt32 nIndNext((a + 2L) % nNumSlices);
+ const sal_uInt32 nIndNext((a + 2) % nNumSlices);
const Slice3D& rSliceNext(rSliceVector[nIndNext]);
basegfx::B3DPolyPolygon aNext(rSliceNext.getB3DPolyPolygon());
basegfx::B3DPolyPolygon aPolBB(rSliceB.getB3DPolyPolygon());
@@ -820,7 +820,7 @@ namespace drawinglayer
double fTexStop{};
if(bCreateTextureCoordinates)
{
- fTexStart = (fTexHeightPos + aTexHeightArray[a] + aTexHeightArray[(a + 1L) % nLoopCount]) * fInvTexHeight;
+ fTexStart = (fTexHeightPos + aTexHeightArray[a] + aTexHeightArray[(a + 1) % nLoopCount]) * fInvTexHeight;
fTexStop = (fTexHeightPos + aTexHeightArray[a]) * fInvTexHeight;
}
@@ -889,7 +889,7 @@ namespace drawinglayer
aEdgeRounding.transformTextureCoordinates(rTexTransform);
}
- for(a = 0L; a < aEdgeRounding.count(); a++)
+ for(a = 0; a < aEdgeRounding.count(); a++)
{
rFill.push_back(basegfx::B3DPolyPolygon(aEdgeRounding.getB3DPolygon(a)));
}
diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
index a84aa999dcad..b592c74b0d90 100644
--- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx
@@ -214,7 +214,7 @@ namespace drawinglayer
// that for polyPolygons, the subPolys 1..n only get reSegmented when polygon 0L is different
// at all (and not always)
const basegfx::B2DPolygon aSubCandidate(maCorrectedPolyPolygon.getB2DPolygon(0));
- const sal_uInt32 nSubEdgeCount(aSubCandidate.isClosed() ? aSubCandidate.count() : (aSubCandidate.count() ? aSubCandidate.count() - 1L : 0L));
+ const sal_uInt32 nSubEdgeCount(aSubCandidate.isClosed() ? aSubCandidate.count() : (aSubCandidate.count() ? aSubCandidate.count() - 1 : 0L));
if(nSubEdgeCount != getVerticalSegments())
{
diff --git a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx
index 2b3cbdd4ad0a..ee3b419ef146 100644
--- a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx
@@ -87,7 +87,7 @@ namespace drawinglayer
// different from forced to sphere texture coordinates,
// create a old version from it by rotating to old state before applying
// the texture coordinates to emulate old behaviour
- fRelativeAngle = F_2PI * ((double)((getHorizontalSegments() >> 1) - 1L) / (double)getHorizontalSegments());
+ fRelativeAngle = F_2PI * ((double)((getHorizontalSegments() >> 1) - 1) / (double)getHorizontalSegments());
basegfx::B3DHomMatrix aRot;
aRot.rotate(0.0, fRelativeAngle, 0.0);
aFill.transform(aRot);
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index c8ec56088085..3c554bb8f05e 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -135,7 +135,7 @@ namespace
if(aCandidate.areControlPointsUsed())
{
// compare with the maximum for bezier curved polygons
- bNeedToSplit = nPointCount > ((MAX_POLYGON_POINT_COUNT_METAFILE / 3L) - 1L);
+ bNeedToSplit = nPointCount > ((MAX_POLYGON_POINT_COUNT_METAFILE / 3L) - 1);
}
else
{
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
index 7e1dff308ee3..bd584eae9a93 100644
--- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
@@ -70,14 +70,14 @@ namespace drawinglayer
if(nMaxSteps)
{
// there IS a color distance
- if(nSteps == 0L)
+ if(nSteps == 0)
{
nSteps = nMaxSteps;
}
- if(nSteps < 2L)
+ if(nSteps < 2)
{
- nSteps = 2L;
+ nSteps = 2;
}
if(nSteps > nMaxSteps)
diff --git a/drawinglayer/source/texture/texture3d.cxx b/drawinglayer/source/texture/texture3d.cxx
index a1ba4cb39ce0..dda8e6b73d87 100644
--- a/drawinglayer/source/texture/texture3d.cxx
+++ b/drawinglayer/source/texture/texture3d.cxx
@@ -158,11 +158,11 @@ namespace drawinglayer
{
rX = (sal_Int32)((rUV.getX() - maTopLeft.getX()) * mfMulX);
- if(rX >= 0L && rX < mpReadBitmap->Width())
+ if(rX >= 0 && rX < mpReadBitmap->Width())
{
rY = (sal_Int32)((rUV.getY() - maTopLeft.getY()) * mfMulY);
- return (rY >= 0L && rY < mpReadBitmap->Height());
+ return (rY >= 0 && rY < mpReadBitmap->Height());
}
}