diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-08-16 16:27:55 +0200 |
---|---|---|
committer | Ashod Nakashian <ashod.nakashian@collabora.co.uk> | 2017-12-05 08:19:24 -0500 |
commit | 116fca4a4cb01cfb646f2271daccaac76b90d423 (patch) | |
tree | 389df9824b7b4751395e3ad853df64aa5d98df1b /drawinglayer | |
parent | 6f65e937ff26d1a880e6db55d04d9cf1190bb440 (diff) |
remove UL/L suffixes from integer constants on the RHS of expressions
Reviewed-on: https://gerrit.libreoffice.org/41237
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 2e8acde112e1c6754df26902e79a78346ba45a2d)
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5
Reviewed-on: https://gerrit.libreoffice.org/45452
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
(cherry picked from commit 2887aefa4d4f60ba8b0cd7efd5d3a73ffb209781)
Diffstat (limited to 'drawinglayer')
12 files changed, 55 insertions, 55 deletions
diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx index 713c4bd52bcd..1399e832569c 100644 --- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx @@ -164,7 +164,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; @@ -178,7 +178,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 e0b344a32130..22ed808772c0 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 4c48cf70b815..5813b47573da 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; @@ -405,7 +405,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 2b899afd7b01..af9a1a08aae3 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 c580ffdfd73a..05cebc2ef693 100644 --- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx @@ -363,8 +363,8 @@ namespace drawinglayer for(sal_uInt32 a(0L); 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 4de490ac1e89..b546d8b0c544 100644 --- a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx @@ -91,24 +91,24 @@ namespace drawinglayer if(bObjectSpecificX || bObjectSpecificY) { // object-specific - for(sal_uInt32 a(0L); a < aFill.count(); a++) + for(sal_uInt32 a(0); a < aFill.count(); a++) { basegfx::B3DPolygon aTmpPoly(aFill.getB3DPolygon(a)); - if(aTmpPoly.count() >= 4L) + if(aTmpPoly.count() >= 4) { - for(sal_uInt32 b(0L); 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); @@ -126,9 +126,9 @@ namespace drawinglayer } // build vector of PolyPolygons - ::std::vector< basegfx::B3DPolyPolygon > a3DPolyPolygonVector; + std::vector< basegfx::B3DPolyPolygon > a3DPolyPolygonVector; - for(sal_uInt32 a(0L); a < aFill.count(); a++) + for(sal_uInt32 a(0); a < aFill.count(); a++) { a3DPolyPolygonVector.push_back(basegfx::B3DPolyPolygon(aFill.getB3DPolygon(a))); } diff --git a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx index dba0f54bcbd0..4287f6dbb129 100644 --- a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx +++ b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx @@ -113,7 +113,7 @@ namespace OSL_ENSURE(rPolA.count() == rPolB.count(), "impAddInBetweenFill: unequally sized polygons (!)"); const sal_uInt32 nPolygonCount(::std::min(rPolA.count(), rPolB.count())); - for(sal_uInt32 a(0L); a < nPolygonCount; a++) + for(sal_uInt32 a(0); a < nPolygonCount; a++) { const basegfx::B3DPolygon aSubA(rPolA.getB3DPolygon(a)); const basegfx::B3DPolygon aSubB(rPolB.getB3DPolygon(a)); @@ -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); @@ -135,10 +135,10 @@ namespace fTexHorMultiplicatorB = basegfx::fTools::equalZero(fPolygonLengthB) ? 1.0 : 1.0 / fPolygonLengthB; } - for(sal_uInt32 b(0L); b < nEdgeCount; b++) + 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)); @@ -189,11 +189,11 @@ namespace basegfx::B3DPolyPolygon& rCandidate, const basegfx::B3DVector& rNormal) { - for(sal_uInt32 a(0L); a < rCandidate.count(); a++) + for(sal_uInt32 a(0); a < rCandidate.count(); a++) { basegfx::B3DPolygon aSub(rCandidate.getB3DPolygon(a)); - for(sal_uInt32 b(0L); b < aSub.count(); b++) + for(sal_uInt32 b(0); b < aSub.count(); b++) { aSub.setNormal(b, rNormal); } @@ -210,7 +210,7 @@ namespace OSL_ENSURE(rPolA.count() == rPolB.count(), "sdrExtrudePrimitive3D: unequally sized polygons (!)"); const sal_uInt32 nPolygonCount(::std::min(rPolA.count(), rPolB.count())); - for(sal_uInt32 a(0L); a < nPolygonCount; a++) + for(sal_uInt32 a(0); a < nPolygonCount; a++) { basegfx::B3DPolygon aSubA(rPolA.getB3DPolygon(a)); basegfx::B3DPolygon aSubB(rPolB.getB3DPolygon(a)); @@ -219,13 +219,13 @@ namespace if(nPointCount) { - basegfx::B3DPoint aPrevA(aSubA.getB3DPoint(nPointCount - 1L)); - basegfx::B3DPoint aCurrA(aSubA.getB3DPoint(0L)); + basegfx::B3DPoint aPrevA(aSubA.getB3DPoint(nPointCount - 1)); + basegfx::B3DPoint aCurrA(aSubA.getB3DPoint(0)); const bool bClosed(aSubA.isClosed()); for(sal_uInt32 b(0L); 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())); @@ -427,9 +427,9 @@ namespace drawinglayer // create segments (a + 1 .. nSteps) const double fStepSize(1.0 / (double)nSteps); - for(sal_uInt32 a(0L); a < nSteps; a++) + 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); @@ -563,7 +563,7 @@ namespace drawinglayer basegfx::B3DPolyPolygon aRetval; const sal_uInt32 nNumSlices(rSliceVector.size()); - for(sal_uInt32 a(0L); a < nNumSlices; a++) + for(sal_uInt32 a(0); a < nNumSlices; a++) { aRetval.append(rSliceVector[a].getB3DPolyPolygon()); } @@ -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()); @@ -672,7 +672,7 @@ namespace drawinglayer if(aFront.count()) { - aNormal = -aFront.getB3DPolygon(0L).getNormal(); + aNormal = -aFront.getB3DPolygon(0).getNormal(); } impSetNormal(aFront, aNormal); @@ -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; } @@ -874,7 +874,7 @@ namespace drawinglayer if(aFront.count()) { - aNormal = -aFront.getB3DPolygon(0L).getNormal(); + aNormal = -aFront.getB3DPolygon(0).getNormal(); } impSetNormal(aFront, aNormal); @@ -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 64041d8439df..47f32c4ed1d6 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 42080eed51ca..0c51bb182adb 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 885367d3a78f..172b82bf00e6 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 50830bae4275..02a71ae25dc7 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 4e4d19b6dd5f..bb2553ac789f 100644 --- a/drawinglayer/source/texture/texture3d.cxx +++ b/drawinglayer/source/texture/texture3d.cxx @@ -161,11 +161,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()); } } |