diff options
218 files changed, 837 insertions, 838 deletions
diff --git a/basegfx/source/curve/b2dcubicbezier.cxx b/basegfx/source/curve/b2dcubicbezier.cxx index ed81ea37b194..85adbcdbcb03 100644 --- a/basegfx/source/curve/b2dcubicbezier.cxx +++ b/basegfx/source/curve/b2dcubicbezier.cxx @@ -673,7 +673,7 @@ namespace basegfx const sal_uInt32 nInitialDivisions(3); B2DPolygon aInitialPolygon; - // as start make a fix division, creates nInitialDivisions + 2L points + // as start make a fix division, creates nInitialDivisions + 2 points aInitialPolygon.append(getStartPoint()); adaptiveSubdivideByCount(aInitialPolygon, nInitialDivisions); diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 5b230e147c73..1cbc5bdd38b7 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -216,7 +216,7 @@ RTLFUNC(Error) else { nCode = rPar.Get( 1 )->GetLong(); - if( nCode > 65535L ) + if( nCode > 65535 ) { StarBASIC::Error( ERRCODE_BASIC_CONVERSION ); } diff --git a/basic/source/runtime/props.cxx b/basic/source/runtime/props.cxx index ce994947389e..f56b914d4272 100644 --- a/basic/source/runtime/props.cxx +++ b/basic/source/runtime/props.cxx @@ -51,7 +51,7 @@ RTLFUNC(Err) if( bWrite ) { sal_Int32 nVal = rPar.Get( 0 )->GetLong(); - if( nVal <= 65535L ) + if( nVal <= 65535 ) StarBASIC::Error( StarBASIC::GetSfxFromVBError( (sal_uInt16) nVal ) ); } else diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx index 4e6375cdd26b..48de7a980d47 100644 --- a/chart2/source/controller/main/SelectionHelper.cxx +++ b/chart2/source/controller/main/SelectionHelper.cxx @@ -596,10 +596,10 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList ) //if th object is a polygon //from each point a handle is generated const ::basegfx::B2DPolyPolygon& rPolyPolygon = static_cast<SdrPathObj*>(m_pMarkObj)->GetPathPoly(); - for( sal_uInt32 nN = 0L; nN < rPolyPolygon.count(); nN++) + for( sal_uInt32 nN = 0; nN < rPolyPolygon.count(); nN++) { const ::basegfx::B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(nN)); - for( sal_uInt32 nM = 0L; nM < aPolygon.count(); nM++) + for( sal_uInt32 nM = 0; nM < aPolygon.count(); nM++) { const ::basegfx::B2DPoint aPoint(aPolygon.getB2DPoint(nM)); SdrHdl* pHdl = new SdrHdl(Point(basegfx::fround(aPoint.getX()), basegfx::fround(aPoint.getY())), SdrHdlKind::Poly); diff --git a/connectivity/source/drivers/firebird/ResultSet.cxx b/connectivity/source/drivers/firebird/ResultSet.cxx index acc486a6a88a..1c6045477035 100644 --- a/connectivity/source/drivers/firebird/ResultSet.cxx +++ b/connectivity/source/drivers/firebird/ResultSet.cxx @@ -136,7 +136,7 @@ sal_Bool SAL_CALL OResultSet::next() throw(SQLException, RuntimeException, std:: { return true; } - else if (fetchStat == 100L) // END OF DATASET + else if (fetchStat == 100) // END OF DATASET { m_bIsAfterLastRow = true; return false; diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx index b4eb31b072d1..f61bceeb9780 100644 --- a/cui/source/options/optchart.cxx +++ b/cui/source/options/optchart.cxx @@ -241,7 +241,7 @@ long SvxDefaultColorOptPage::GetColorIndex( const Color& rCol ) return pColorList->GetIndex( pColorEntry->GetName() ); } } - return -1L; + return -1; } 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()); } } diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 0accd5a69303..8adaeff23d28 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -512,7 +512,7 @@ void EditEngine::SetPolygon(const basegfx::B2DPolyPolygon& rPolyPolygon, const b { bool bSimple(false); - if(pLinePolyPolygon && 1L == rPolyPolygon.count()) + if(pLinePolyPolygon && 1 == rPolyPolygon.count()) { if(rPolyPolygon.getB2DPolygon(0L).isClosed()) { diff --git a/extensions/source/scanner/grid.cxx b/extensions/source/scanner/grid.cxx index 90faba32e8fc..51b3317fa94c 100644 --- a/extensions/source/scanner/grid.cxx +++ b/extensions/source/scanner/grid.cxx @@ -608,7 +608,7 @@ void GridWindow::MouseButtonDown( const MouseEvent& rEvt ) // user wants to add/delete a button if( nMarkerIndex != 0xffffffff ) { - if( nMarkerIndex != 0L && nMarkerIndex != m_aHandles.size() - 1L) + if( nMarkerIndex != 0 && nMarkerIndex != m_aHandles.size() - 1) { // delete marker under mouse if( m_nDragIndex == nMarkerIndex ) diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx index 4b1315fc44ff..e6762f76e6a6 100644 --- a/filter/source/graphicfilter/egif/egif.cxx +++ b/filter/source/graphicfilter/egif/egif.cxx @@ -212,7 +212,7 @@ void GIFWriter::WriteAnimation( const Animation& rAnimation ) { const double fStep = 100. / nCount; - nMinPercent = 0L; + nMinPercent = 0; nMaxPercent = (sal_uLong) fStep; for( sal_uInt16 i = 0; i < nCount; i++ ) @@ -509,7 +509,7 @@ void GIFWriter::WriteAccess() aCompressor.Compress( m_pAcc->GetScanline( nY ), nWidth ); else { - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nX = 0; nX < nWidth; nX++ ) pBuffer[ nX ] = m_pAcc->GetPixelIndex( nY, nX ); aCompressor.Compress( pBuffer.get(), nWidth ); diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx index c78101ebddca..ee69d94f2ae4 100644 --- a/filter/source/graphicfilter/ipcd/ipcd.cxx +++ b/filter/source/graphicfilter/ipcd/ipcd.cxx @@ -305,7 +305,7 @@ void PCDReader::ReadImage() } } // conversion of nL,nCb,nCr in nRed,nGreen,nBlue: - nL *= 89024L; + nL *= 89024; nCb -= 156; nCr -= 137; nRed = ( nL + nCr * 119374L + 0x8000 ) >> 16; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index efbb46db0c89..0c6b0bc78a86 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -5687,9 +5687,9 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T if( pAcc->HasPalette() ) { - for( long nY = 0L; nY < nHeight; nY++ ) + for( long nY = 0; nY < nHeight; nY++ ) { - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nX = 0; nX < nWidth; nX++ ) { const BitmapColor& rCol = pAcc->GetPaletteColor( pAcc->GetPixelIndex( nY, nX ) ); nRt+=rCol.GetRed(); nGn+=rCol.GetGreen(); nBl+=rCol.GetBlue(); @@ -5698,9 +5698,9 @@ void PPTPortionObj::ApplyTo( SfxItemSet& rSet, SdrPowerPointImport& rManager, T } else { - for( long nY = 0L; nY < nHeight; nY++ ) + for( long nY = 0; nY < nHeight; nY++ ) { - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nX = 0; nX < nWidth; nX++ ) { const BitmapColor aCol( pAcc->GetPixel( nY, nX ) ); nRt+=aCol.GetRed(); nGn+=aCol.GetGreen(); nBl+=aCol.GetBlue(); diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index dab9b8f45574..4fc9c335f36c 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -113,7 +113,7 @@ ErrCode ImgProdLockBytes::ReadAt(sal_uInt64 const nPos, *pRead = nCount; } else - *pRead = 0UL; + *pRead = 0; return nErr; } @@ -428,10 +428,10 @@ void ImageProducer::ImplUpdateConsumer( const Graphic& rGraphic ) BitmapReadAccess* pMskAcc = !!aMask ? aMask.AcquireReadAccess() : nullptr; const long nWidth = pBmpAcc->Width(); const long nHeight = pBmpAcc->Height(); - const long nStartX = 0L; - const long nEndX = nWidth - 1L; - const long nStartY = 0L; - const long nEndY = nHeight - 1L; + const long nStartX = 0; + const long nEndX = nWidth - 1; + const long nStartY = 0; + const long nEndY = nHeight - 1; const long nPartWidth = nEndX - nStartX + 1; const long nPartHeight = nEndY - nStartY + 1; diff --git a/include/basegfx/pixel/bpixel.hxx b/include/basegfx/pixel/bpixel.hxx index bce856c27a97..fcf7fcc31c4b 100644 --- a/include/basegfx/pixel/bpixel.hxx +++ b/include/basegfx/pixel/bpixel.hxx @@ -49,7 +49,7 @@ namespace basegfx public: BPixel() { - maPixelUnion.maCombinedRGBO.mnValue = 0L; + maPixelUnion.maCombinedRGBO.mnValue = 0; } // use explicit here to make sure everyone knows what he is doing. Values range from diff --git a/include/basegfx/polygon/b3dpolypolygontools.hxx b/include/basegfx/polygon/b3dpolypolygontools.hxx index f88c28340a31..142058362193 100644 --- a/include/basegfx/polygon/b3dpolypolygontools.hxx +++ b/include/basegfx/polygon/b3dpolypolygontools.hxx @@ -64,7 +64,7 @@ namespace basegfx With VerStart, VerStop and hor range in cartesian may be specified to create a partial sphere only. */ BASEGFX_DLLPUBLIC B3DPolyPolygon createUnitSpherePolyPolygon( - sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L, + sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0, double fVerStart = F_PI2, double fVerStop = -F_PI2, double fHorStart = 0.0, double fHorStop = F_2PI); @@ -74,7 +74,7 @@ namespace basegfx */ BASEGFX_DLLPUBLIC B3DPolyPolygon createSpherePolyPolygonFromB3DRange( const B3DRange& rRange, - sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L, + sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0, double fVerStart = F_PI2, double fVerStop = -F_PI2, double fHorStart = 0.0, double fHorStop = F_2PI); @@ -82,7 +82,7 @@ namespace basegfx There is one extra, the bool bNormals defines if normals will be set, default is false */ BASEGFX_DLLPUBLIC B3DPolyPolygon createUnitSphereFillPolyPolygon( - sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L, + sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0, bool bNormals = false, double fVerStart = F_PI2, double fVerStop = -F_PI2, double fHorStart = 0.0, double fHorStop = F_2PI); @@ -92,7 +92,7 @@ namespace basegfx */ BASEGFX_DLLPUBLIC B3DPolyPolygon createSphereFillPolyPolygonFromB3DRange( const B3DRange& rRange, - sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0L, + sal_uInt32 nHorSeg, sal_uInt32 nVerSeg = 0, bool bNormals = false, double fVerStart = F_PI2, double fVerStop = -F_PI2, double fHorStart = 0.0, double fHorStop = F_2PI); diff --git a/include/svtools/grfmgr.hxx b/include/svtools/grfmgr.hxx index c1e165c1ed1a..0cd3d6f64e45 100644 --- a/include/svtools/grfmgr.hxx +++ b/include/svtools/grfmgr.hxx @@ -461,11 +461,11 @@ public: OutputDevice* pOut, const Point& rPt, const Size& rSz, - long nExtraData = 0L, + long nExtraData = 0, OutputDevice* pFirstFrameOutDev = nullptr ); - void StopAnimation( OutputDevice* pOut = nullptr, long nExtraData = 0L ); + void StopAnimation( OutputDevice* pOut = nullptr, long nExtraData = 0 ); static GraphicObject CreateGraphicObjectFromURL( const OUString &rURL ); // will inspect an object ( e.g. a control ) for any 'ImageURL' diff --git a/include/svtools/parhtml.hxx b/include/svtools/parhtml.hxx index f48106695a4a..85a961417460 100644 --- a/include/svtools/parhtml.hxx +++ b/include/svtools/parhtml.hxx @@ -246,21 +246,21 @@ inline void HTMLParser::StartPRE() { bReadPRE = true; bPre_IgnoreNewPara = true; - nPre_LinePos = 0UL; + nPre_LinePos = 0; } inline void HTMLParser::StartListing() { bReadListing = true; bPre_IgnoreNewPara = true; - nPre_LinePos = 0UL; + nPre_LinePos = 0; } inline void HTMLParser::StartXMP() { bReadXMP = true; bPre_IgnoreNewPara = true; - nPre_LinePos = 0UL; + nPre_LinePos = 0; } #endif diff --git a/include/svx/contdlg.hxx b/include/svx/contdlg.hxx index bbb7d5d7dba8..876aa70ded2f 100644 --- a/include/svx/contdlg.hxx +++ b/include/svx/contdlg.hxx @@ -73,7 +73,7 @@ public: static tools::PolyPolygon CreateAutoContour( const Graphic& rGraphic, const Rectangle* pRect = nullptr, - const sal_uIntPtr nFlags = 0L ); + const sal_uIntPtr nFlags = 0 ); }; #endif // INCLUDED_SVX_CONTDLG_HXX diff --git a/include/svx/galmisc.hxx b/include/svx/galmisc.hxx index 4031af58369e..c9711c95ca1d 100644 --- a/include/svx/galmisc.hxx +++ b/include/svx/galmisc.hxx @@ -205,10 +205,10 @@ private: public: - GalleryHint( GalleryHintType nType, const OUString& rThemeName, sal_uIntPtr nData1 = 0UL ) : + GalleryHint( GalleryHintType nType, const OUString& rThemeName, sal_uIntPtr nData1 = 0 ) : mnType( nType ), maThemeName( rThemeName ), mnData1( nData1 ) {} - GalleryHint( GalleryHintType nType, const OUString& rThemeName, const OUString& rStringData, sal_uIntPtr nData1 = 0UL ) : + GalleryHint( GalleryHintType nType, const OUString& rThemeName, const OUString& rStringData, sal_uIntPtr nData1 = 0 ) : mnType( nType ), maThemeName( rThemeName ), maStringData( rStringData ), mnData1( nData1 ) {} GalleryHintType GetType() const { return mnType; } diff --git a/include/svx/svdmark.hxx b/include/svx/svdmark.hxx index 39a5eb3f6c7a..731179c7c040 100644 --- a/include/svx/svdmark.hxx +++ b/include/svx/svdmark.hxx @@ -216,7 +216,7 @@ public: return GetPointMarkDescription(true); } - // pPage=0L: Selection of everything! Respect Pages + // pPage=0: Selection of everything! Respect Pages bool TakeBoundRect(SdrPageView* pPageView, Rectangle& rRect) const; bool TakeSnapRect(SdrPageView* pPageView, Rectangle& rRect) const; diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx index 73955bf9c96f..3f457057e08a 100644 --- a/include/tools/stream.hxx +++ b/include/tools/stream.hxx @@ -623,7 +623,7 @@ protected: /// ReAllocateMemory must update the following variables: /// - pBuf: Address of new block - /// - nEndOfData: Set to nNewSize-1L , if outside of block + /// - nEndOfData: Set to nNewSize-1 , if outside of block /// Set to 0 , if new block size is 0 bytes /// - nSize: New block size /// - nPos: Set to 0 if position outside of block diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx index 119499629d36..5f705444775d 100644 --- a/include/vcl/animate.hxx +++ b/include/vcl/animate.hxx @@ -53,7 +53,7 @@ struct VCL_DLLPUBLIC AnimationBitmap const BitmapEx& rBmpEx, const Point& rPosPix, const Size& rSizePix, - long _nWait = 0L, + long _nWait = 0, Disposal _eDisposal = Disposal::Not ) : aBmpEx ( rBmpEx ), diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index 474441719031..bc17cbc70c13 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -500,7 +500,7 @@ public: @return the resulting bitmask. */ - Bitmap CreateMask( const Color& rTransColor, sal_uLong nTol = 0UL ) const; + Bitmap CreateMask( const Color& rTransColor, sal_uLong nTol = 0 ) const; /** Create region of similar colors in a given rectangle diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index 1339a88c7319..9a398c76c9e0 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -176,7 +176,7 @@ public: void StartAnimation( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSize, - long nExtraData = 0L, + long nExtraData = 0, OutputDevice* pFirstFrameOutDev = nullptr ); void StopAnimation( OutputDevice* pOutputDevice, long nExtraData ); diff --git a/include/vcl/lineinfo.hxx b/include/vcl/lineinfo.hxx index 99dda6242cf8..4bfa3df339ff 100644 --- a/include/vcl/lineinfo.hxx +++ b/include/vcl/lineinfo.hxx @@ -53,7 +53,7 @@ struct ImplLineInfo class VCL_DLLPUBLIC LineInfo { public: - LineInfo( LineStyle eLineStyle = LineStyle::Solid, long nWidth = 0L ); + LineInfo( LineStyle eLineStyle = LineStyle::Solid, long nWidth = 0 ); LineInfo( const LineInfo& rLineInfo ); LineInfo( LineInfo&& rLineInfo ); ~LineInfo(); diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index 5041f3a954ee..3a52aaff98cb 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -1442,7 +1442,7 @@ protected: public: explicit MetaCommentAction(); explicit MetaCommentAction( const MetaCommentAction& rAct ); - explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0L, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0UL ); + explicit MetaCommentAction( const OString& rComment, sal_Int32 nValue = 0, const sal_uInt8* pData = nullptr, sal_uInt32 nDataSize = 0 ); virtual void Move( long nHorzMove, long nVertMove ) override; virtual void Scale( double fScaleX, double fScaleY ) override; diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx index 5129ee76f54f..0cf73e2745f5 100644 --- a/include/vcl/salbtype.hxx +++ b/include/vcl/salbtype.hxx @@ -76,11 +76,11 @@ d_Col = BitmapColor( (sal_uInt8) ( _def_cR | ( ( _def_cR & maR.mnOr ) >> maR.mnO #define COLOR_TO_MASK( d_rCol, d_RM, d_GM, d_BM, d_RS, d_GS, d_BS, d_ALPHA ) \ -( ( ( ( d_RS < 0L ) ? ( (sal_uInt32) (d_rCol).GetRed() >> -d_RS ) : \ +( ( ( ( d_RS < 0 ) ? ( (sal_uInt32) (d_rCol).GetRed() >> -d_RS ) : \ ( (sal_uInt32) (d_rCol).GetRed() << d_RS ) ) & d_RM ) | \ - ( ( ( d_GS < 0L ) ? ( (sal_uInt32) (d_rCol).GetGreen() >> -d_GS ) : \ + ( ( ( d_GS < 0 ) ? ( (sal_uInt32) (d_rCol).GetGreen() >> -d_GS ) : \ ( (sal_uInt32) (d_rCol).GetGreen() << d_GS ) ) & d_GM ) | \ - ( ( ( d_BS < 0L ) ? ( (sal_uInt32) (d_rCol).GetBlue() >> -d_BS ) : \ + ( ( ( d_BS < 0 ) ? ( (sal_uInt32) (d_rCol).GetBlue() >> -d_BS ) : \ ( (sal_uInt32) (d_rCol).GetBlue() << d_BS ) ) & d_BM ) | \ d_ALPHA ) diff --git a/include/xmloff/styleexp.hxx b/include/xmloff/styleexp.hxx index 5f215069d06a..c4b1fc7df080 100644 --- a/include/xmloff/styleexp.hxx +++ b/include/xmloff/styleexp.hxx @@ -87,13 +87,13 @@ public: // const OUString& rFamily, const OUString& rXMLFamily, // const rtl::Reference < XMLPropertySetMapper >& rPropMapper, // bool bUsed, sal_uInt16 nFamily = 0, -// const OUString* pPrefix = 0L); +// const OUString* pPrefix = 0); // void exportStyleFamily( // const sal_Char *pFamily, const OUString& rXMLFamily, // const rtl::Reference < XMLPropertySetMapper >& rPropMapper, // bool bUsed, sal_uInt16 nFamily = 0, -// const OUString* pPrefix = 0L); +// const OUString* pPrefix = 0); bool exportDefaultStyle( const css::uno::Reference< css::beans::XPropertySet > & xPropSet, diff --git a/lotuswordpro/source/filter/lwpbasetype.cxx b/lotuswordpro/source/filter/lwpbasetype.cxx index 879094dc095b..8f26a6acf11d 100644 --- a/lotuswordpro/source/filter/lwpbasetype.cxx +++ b/lotuswordpro/source/filter/lwpbasetype.cxx @@ -90,8 +90,8 @@ void LwpPoint::Read(LwpObjectStream *pStrm) */ void LwpPoint::Reset() { - m_nX=0L; - m_nY=0L; + m_nX=0; + m_nY=0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx index f204ecb5cf84..3d28476bdb22 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx @@ -168,10 +168,10 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const OUString sLocalName; const OUString sAttrName = _xAttrList->getNameByIndex( i ); const sal_Int32 nColonPos = sAttrName.indexOf( ':' ); - if( -1L == nColonPos ) + if( -1 == nColonPos ) sLocalName = sAttrName; else - sLocalName = sAttrName.copy( nColonPos + 1L ); + sLocalName = sAttrName.copy( nColonPos + 1 ); const OUString sValue = _xAttrList->getValueByIndex( i ); switch( m_pReportElemTokenMap->Get( XML_NAMESPACE_REPORT, sLocalName ) ) @@ -217,10 +217,10 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const OUString sLocalName; const OUString sAttrName = _xAttrList->getNameByIndex( i ); const sal_Int32 nColonPos = sAttrName.indexOf( ':' ); - if( -1L == nColonPos ) + if( -1 == nColonPos ) sLocalName = sAttrName; else - sLocalName = sAttrName.copy( nColonPos + 1L ); + sLocalName = sAttrName.copy( nColonPos + 1 ); const OUString sValue = _xAttrList->getValueByIndex( i ); switch( pMasterElemTokenMap->Get( XML_NAMESPACE_REPORT, sLocalName ) ) @@ -260,10 +260,10 @@ void SAL_CALL ImportDocumentHandler::startElement(const OUString & _sName, const OUString sLocalName; const OUString sAttrName = _xAttrList->getNameByIndex( i ); const sal_Int32 nColonPos = sAttrName.indexOf( ':' ); - if( -1L == nColonPos ) + if( -1 == nColonPos ) sLocalName = sAttrName; else - sLocalName = sAttrName.copy( nColonPos + 1L ); + sLocalName = sAttrName.copy( nColonPos + 1 ); if ( sLocalName == "data-source-has-labels" ) { const OUString sValue = _xAttrList->getValueByIndex( i ); diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index b62bfad8adda..a34f91ff8986 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -1035,7 +1035,7 @@ static bool OslProfile_rewindFile(osl_TFile* pFile, bool bTruncate) { pFile->m_pReadPtr = pFile->m_ReadBuf + sizeof(pFile->m_ReadBuf); - bRet = (lseek(pFile->m_Handle, SEEK_SET, 0L) == 0L); + bRet = (lseek(pFile->m_Handle, SEEK_SET, 0L) == 0); if (bTruncate) { diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx index 0f9d7cc7bd8f..266277c91be9 100644 --- a/sal/rtl/cipher.cxx +++ b/sal/rtl/cipher.cxx @@ -31,13 +31,13 @@ #define RTL_CIPHER_NTOHL(c, l) \ ((l) = ((sal_uInt32)(*((c)++))) << 24, \ (l) |= ((sal_uInt32)(*((c)++))) << 16, \ - (l) |= ((sal_uInt32)(*((c)++))) << 8L, \ + (l) |= ((sal_uInt32)(*((c)++))) << 8, \ (l) |= ((sal_uInt32)(*((c)++)))) #define RTL_CIPHER_HTONL(l, c) \ (*((c)++) = (sal_uInt8)(((l) >> 24) & 0xff), \ *((c)++) = (sal_uInt8)(((l) >> 16) & 0xff), \ - *((c)++) = (sal_uInt8)(((l) >> 8L) & 0xff), \ + *((c)++) = (sal_uInt8)(((l) >> 8) & 0xff), \ *((c)++) = (sal_uInt8)(((l) ) & 0xff)) #define RTL_CIPHER_NTOHL64(c, xl, xr, n) \ @@ -48,7 +48,7 @@ { \ case 8: (xr) = ((sal_uInt32)(*(--(c)))); \ SAL_FALLTHROUGH; \ - case 7: (xr) |= ((sal_uInt32)(*(--(c)))) << 8L; \ + case 7: (xr) |= ((sal_uInt32)(*(--(c)))) << 8; \ SAL_FALLTHROUGH; \ case 6: (xr) |= ((sal_uInt32)(*(--(c)))) << 16; \ SAL_FALLTHROUGH; \ @@ -56,7 +56,7 @@ SAL_FALLTHROUGH; \ case 4: (xl) = ((sal_uInt32)(*(--(c)))); \ SAL_FALLTHROUGH; \ - case 3: (xl) |= ((sal_uInt32)(*(--(c)))) << 8L; \ + case 3: (xl) |= ((sal_uInt32)(*(--(c)))) << 8; \ SAL_FALLTHROUGH; \ case 2: (xl) |= ((sal_uInt32)(*(--(c)))) << 16; \ SAL_FALLTHROUGH; \ @@ -71,7 +71,7 @@ { \ case 8: *(--(c)) = (sal_uInt8)(((xr) ) & 0xff); \ SAL_FALLTHROUGH; \ - case 7: *(--(c)) = (sal_uInt8)(((xr) >> 8L) & 0xff); \ + case 7: *(--(c)) = (sal_uInt8)(((xr) >> 8) & 0xff); \ SAL_FALLTHROUGH; \ case 6: *(--(c)) = (sal_uInt8)(((xr) >> 16) & 0xff); \ SAL_FALLTHROUGH; \ @@ -79,7 +79,7 @@ SAL_FALLTHROUGH; \ case 4: *(--(c)) = (sal_uInt8)(((xl) ) & 0xff); \ SAL_FALLTHROUGH; \ - case 3: *(--(c)) = (sal_uInt8)(((xl) >> 8L) & 0xff); \ + case 3: *(--(c)) = (sal_uInt8)(((xl) >> 8) & 0xff); \ SAL_FALLTHROUGH; \ case 2: *(--(c)) = (sal_uInt8)(((xl) >> 16) & 0xff); \ SAL_FALLTHROUGH; \ diff --git a/sal/rtl/digest.cxx b/sal/rtl/digest.cxx index e54ada89e5f2..43e95913be17 100644 --- a/sal/rtl/digest.cxx +++ b/sal/rtl/digest.cxx @@ -36,12 +36,12 @@ #define RTL_DIGEST_HTONL(l,c) \ (*((c)++) = (sal_uInt8)(((l) >> 24) & 0xff), \ *((c)++) = (sal_uInt8)(((l) >> 16) & 0xff), \ - *((c)++) = (sal_uInt8)(((l) >> 8L) & 0xff), \ + *((c)++) = (sal_uInt8)(((l) >> 8) & 0xff), \ *((c)++) = (sal_uInt8)(((l) ) & 0xff)) #define RTL_DIGEST_LTOC(l,c) \ (*((c)++) = (sal_uInt8)(((l) ) & 0xff), \ - *((c)++) = (sal_uInt8)(((l) >> 8L) & 0xff), \ + *((c)++) = (sal_uInt8)(((l) >> 8) & 0xff), \ *((c)++) = (sal_uInt8)(((l) >> 16) & 0xff), \ *((c)++) = (sal_uInt8)(((l) >> 24) & 0xff)) @@ -701,9 +701,9 @@ static void endMD5 (DigestContextMD5 *ctx) switch (ctx->m_nDatLen & 0x03) { - case 0: X[i] = ((sal_uInt32)(*(p++))) << 0L; + case 0: X[i] = ((sal_uInt32)(*(p++))) << 0; SAL_FALLTHROUGH; - case 1: X[i] |= ((sal_uInt32)(*(p++))) << 8L; + case 1: X[i] |= ((sal_uInt32)(*(p++))) << 8; SAL_FALLTHROUGH; case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16; SAL_FALLTHROUGH; @@ -1155,9 +1155,9 @@ static void endSHA (DigestContextSHA *ctx) switch (ctx->m_nDatLen & 0x03) { - case 0: X[i] = ((sal_uInt32)(*(p++))) << 0L; + case 0: X[i] = ((sal_uInt32)(*(p++))) << 0; SAL_FALLTHROUGH; - case 1: X[i] |= ((sal_uInt32)(*(p++))) << 8L; + case 1: X[i] |= ((sal_uInt32)(*(p++))) << 8; SAL_FALLTHROUGH; case 2: X[i] |= ((sal_uInt32)(*(p++))) << 16; SAL_FALLTHROUGH; diff --git a/sal/rtl/random.cxx b/sal/rtl/random.cxx index 3168c9686e28..c68ad4b94f1f 100644 --- a/sal/rtl/random.cxx +++ b/sal/rtl/random.cxx @@ -36,13 +36,13 @@ #define RTL_RANDOM_RNG(x, y, z) \ { \ (x) = 170 * ((x) % 178) - 63 * ((x) / 178); \ - if ((x) < 0) (x) += 30328L; \ + if ((x) < 0) (x) += 30328; \ \ (y) = 171 * ((y) % 177) - 2 * ((y) / 177); \ - if ((y) < 0) (y) += 30269L; \ + if ((y) < 0) (y) += 30269; \ \ (z) = 172 * ((z) % 176) - 35 * ((z) / 176); \ - if ((z) < 0) (z) += 30307L; \ + if ((z) < 0) (z) += 30307; \ } /** RandomData_Impl. diff --git a/salhelper/source/timer.cxx b/salhelper/source/timer.cxx index c79f1fc03588..bcaeabf0a819 100644 --- a/salhelper/source/timer.cxx +++ b/salhelper/source/timer.cxx @@ -221,7 +221,7 @@ TTimeValue Timer::getRemainingTime() const if (secs > 0) { secs -= 1; - nsecs += 1000000000L; + nsecs += 1000000000; } else return TTimeValue(0, 0); diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 931d44a550d1..038bcd5cafaf 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -6017,7 +6017,7 @@ void ScDocument::StylesToNames() sal_uLong ScDocument::GetCellCount() const { - sal_uLong nCellCount = 0L; + sal_uLong nCellCount = 0; TableContainer::const_iterator it = maTabs.begin(); for (; it != maTabs.end(); ++it) @@ -6029,7 +6029,7 @@ sal_uLong ScDocument::GetCellCount() const sal_uLong ScDocument::GetFormulaGroupCount() const { - sal_uLong nFormulaGroupCount = 0L; + sal_uLong nFormulaGroupCount = 0; ScFormulaGroupIterator aIter( const_cast<ScDocument*>(this) ); for ( sc::FormulaGroupEntry* ptr = aIter.first(); ptr; ptr = aIter.next()) diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx index f2e33cff9539..8d55418a5b3b 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -316,7 +316,7 @@ sal_uInt16 XclTools::GetXclColumnWidth( sal_uInt16 nScWidth, long nScCharWidth ) double XclTools::GetXclDefColWidthCorrection( long nXclDefFontHeight ) { - return 40960.0 / ::std::max( nXclDefFontHeight - 15L, 60L ) + 50.0; + return 40960.0 / ::std::max( nXclDefFontHeight - 15, 60L ) + 50.0; } // formatting diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx index 5e30fb56ad09..91a201aff0ab 100644 --- a/sc/source/filter/lotus/lotread.cxx +++ b/sc/source/filter/lotus/lotread.cxx @@ -233,7 +233,7 @@ FltError ImportLotus::Read(SvStream& rIn) bool bRead = true; sal_uInt16 nOp; sal_uInt16 nRecLen; - sal_uInt32 nNextRec = 0UL; + sal_uInt32 nNextRec = 0; FltError eRet = eERR_OK; nTab = 0; diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx index 39ab0c4817df..8d7fb9499286 100644 --- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx +++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx @@ -293,7 +293,7 @@ static sal_Int32 lcl_GetRulerPos( sal_Int32 nApiPos ) nApiLimit = lcl_GetApiPos( nExp ); } sal_Int32 nRelPos = nApiPos - nApiBase; - return nRulerPos + nRelPos / nDiv * 10 + ::std::max( nRelPos % nDiv - nDiv + 10L, 0L ); + return nRulerPos + nRelPos / nDiv * 10 + ::std::max<sal_Int32>( nRelPos % nDiv - nDiv + 10, 0 ); } /** Expands the sequence's size and returns the base index of the new inserted elements. */ diff --git a/sc/source/ui/cctrl/dpcontrol.cxx b/sc/source/ui/cctrl/dpcontrol.cxx index cc0aaf972e61..48ab51194881 100644 --- a/sc/source/ui/cctrl/dpcontrol.cxx +++ b/sc/source/ui/cctrl/dpcontrol.cxx @@ -147,7 +147,7 @@ void ScDPFieldButton::getPopupBoundingBox(Point& rPos, Size& rSize) const { float fScaleFactor = mpOutDev->GetDPIScaleFactor(); - long nMaxSize = 18L * fScaleFactor; // Button max size in either dimension + long nMaxSize = 18 * fScaleFactor; // Button max size in either dimension long nW = std::min(maSize.getWidth() / 2, nMaxSize); long nH = std::min(maSize.getHeight(), nMaxSize); diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx index f70aec78e579..9a33e4bd999f 100644 --- a/sc/source/ui/dbgui/csvcontrol.cxx +++ b/sc/source/ui/dbgui/csvcontrol.cxx @@ -181,7 +181,7 @@ sal_Int32 ScCsvControl::GetVisPosCount() const sal_Int32 ScCsvControl::GetMaxPosOffset() const { - return std::max( GetPosCount() - GetVisPosCount() + 2L, 0L ); + return std::max<sal_Int32>( GetPosCount() - GetVisPosCount() + 2, 0 ); } bool ScCsvControl::IsValidSplitPos( sal_Int32 nPos ) const @@ -231,7 +231,7 @@ sal_Int32 ScCsvControl::GetLastVisLine() const sal_Int32 ScCsvControl::GetMaxLineOffset() const { - return std::max( GetLineCount() - GetVisLineCount() + 1L, 0L ); + return std::max<sal_Int32>( GetLineCount() - GetVisLineCount() + 1, 0 ); } bool ScCsvControl::IsValidLine( sal_Int32 nLine ) const diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 2a26cc9b8cd9..f7b3d6e7664a 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -196,7 +196,7 @@ sal_Int32 ScCsvGrid::GetNoScrollCol( sal_Int32 nPos ) const sal_Int32 nScroll = (GetFirstVisPos() > 0) ? CSV_SCROLL_DIST : 0; nNewPos = GetFirstVisPos() + nScroll; } - else if( nNewPos > GetLastVisPos() - CSV_SCROLL_DIST - 1L ) + else if( nNewPos > GetLastVisPos() - CSV_SCROLL_DIST - 1 ) { sal_Int32 nScroll = (GetFirstVisPos() < GetMaxPosOffset()) ? CSV_SCROLL_DIST : 0; nNewPos = GetLastVisPos() - nScroll - 1; diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx index c0b5b197d68c..62abb23ac91c 100644 --- a/sc/source/ui/dbgui/csvruler.cxx +++ b/sc/source/ui/dbgui/csvruler.cxx @@ -256,7 +256,7 @@ sal_Int32 ScCsvRuler::GetNoScrollPos( sal_Int32 nPos ) const sal_Int32 nScroll = (GetFirstVisPos() > 0) ? CSV_SCROLL_DIST : 0; nNewPos = std::max( nPos, GetFirstVisPos() + nScroll ); } - else if( nNewPos > GetLastVisPos() - CSV_SCROLL_DIST - 1L ) + else if( nNewPos > GetLastVisPos() - CSV_SCROLL_DIST - 1 ) { sal_Int32 nScroll = (GetFirstVisPos() < GetMaxPosOffset()) ? CSV_SCROLL_DIST : 0; nNewPos = std::min( nNewPos, GetLastVisPos() - nScroll - sal_Int32( 1 ) ); diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx index d76b1ef7c9d9..043a421454df 100644 --- a/sc/source/ui/drawfunc/fuconrec.cxx +++ b/sc/source/ui/drawfunc/fuconrec.cxx @@ -79,7 +79,7 @@ namespace { OUString aArrowName( SVX_RES(nResId) ); long nCount = pLineEndList->Count(); long nIndex; - for( nIndex = 0L; nIndex < nCount; nIndex++ ) + for( nIndex = 0; nIndex < nCount; nIndex++ ) { const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nIndex); if( pEntry->GetName() == aArrowName ) diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx index b4b2a910d4a1..740367eda3a2 100644 --- a/sc/source/ui/view/gridwin4.cxx +++ b/sc/source/ui/view/gridwin4.cxx @@ -614,7 +614,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI { if(bLayoutRTL) { - aDrawingRectPixel.Left() = 0L; + aDrawingRectPixel.Left() = 0; } else { diff --git a/sd/source/core/PageListWatcher.cxx b/sd/source/core/PageListWatcher.cxx index d5e5dad9845f..ed3db401f37a 100644 --- a/sd/source/core/PageListWatcher.cxx +++ b/sd/source/core/PageListWatcher.cxx @@ -110,12 +110,12 @@ SdPage* ImpPageListWatcher::GetSdPage(PageKind ePgKind, sal_uInt32 nPgNum) case PageKind::Handout: { // #11420# for models used to transfer drawing shapes via clipboard it's ok to not have a handout page - DBG_ASSERT(nPgNum == 0L, "ImpPageListWatcher::GetSdPage: access to non existing handout page (!)"); + DBG_ASSERT(nPgNum == 0, "ImpPageListWatcher::GetSdPage: access to non existing handout page (!)"); if (nPgNum == 0) pRetval = mpHandoutPage; else { - DBG_ASSERT(nPgNum == 0L, + DBG_ASSERT(nPgNum == 0, "ImpPageListWatcher::GetSdPage: access to non existing handout page (!)"); } break; @@ -150,7 +150,7 @@ sal_uInt32 ImpPageListWatcher::GetSdPageCount(PageKind ePgKind) { if(mpHandoutPage) { - nRetval = 1L; + nRetval = 1; } break; diff --git a/sd/source/filter/html/htmlex.cxx b/sd/source/filter/html/htmlex.cxx index 4443c4262891..c773402b4af8 100644 --- a/sd/source/filter/html/htmlex.cxx +++ b/sd/source/filter/html/htmlex.cxx @@ -2793,14 +2793,14 @@ OUString HtmlExport::CreateHTMLPolygonArea( const ::basegfx::B2DPolyPolygon& rPo OUStringBuffer aStr; const sal_uInt32 nNoOfPolygons(rPolyPolygon.count()); - for ( sal_uInt32 nXPoly = 0L; nXPoly < nNoOfPolygons; nXPoly++ ) + for ( sal_uInt32 nXPoly = 0; nXPoly < nNoOfPolygons; nXPoly++ ) { const ::basegfx::B2DPolygon& aPolygon = rPolyPolygon.getB2DPolygon(nXPoly); const sal_uInt32 nNoOfPoints(aPolygon.count()); aStr.append("<area shape=\"polygon\" alt=\"\" coords=\""); - for ( sal_uInt32 nPoint = 0L; nPoint < nNoOfPoints; nPoint++ ) + for ( sal_uInt32 nPoint = 0; nPoint < nNoOfPoints; nPoint++ ) { const ::basegfx::B2DPoint aB2DPoint(aPolygon.getB2DPoint(nPoint)); Point aPnt(FRound(aB2DPoint.getX()), FRound(aB2DPoint.getY())); diff --git a/sd/source/ui/app/sdmod2.cxx b/sd/source/ui/app/sdmod2.cxx index 79af5b81f845..ae01b515dbc2 100644 --- a/sd/source/ui/app/sdmod2.cxx +++ b/sd/source/ui/app/sdmod2.cxx @@ -494,8 +494,8 @@ SfxItemSet* SdModule::CreateItemSet( sal_uInt16 nSlot ) pRet->Put( SdOptionsSnapItem( pOptions, pFrameView ) ); // TP_SCALE: - sal_uInt32 nW = 10L; - sal_uInt32 nH = 10L; + sal_uInt32 nW = 10; + sal_uInt32 nH = 10; sal_Int32 nX; sal_Int32 nY; if( pDocSh ) diff --git a/sd/source/ui/dlg/copydlg.cxx b/sd/source/ui/dlg/copydlg.cxx index efcebc1442f1..247fb43e3874 100644 --- a/sd/source/ui/dlg/copydlg.cxx +++ b/sd/source/ui/dlg/copydlg.cxx @@ -109,12 +109,12 @@ void CopyDlg::Reset() else m_pNumFldCopies->SetValue( 1L ); - long nMoveX = 500L; + long nMoveX = 500; if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_X, true, &pPoolItem ) ) nMoveX = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(); SetMetricValue( *m_pMtrFldMoveX, Fraction(nMoveX) / maUIScale, MapUnit::Map100thMM); - long nMoveY = 500L; + long nMoveY = 500; if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_MOVE_Y, true, &pPoolItem ) ) nMoveY = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(); SetMetricValue( *m_pMtrFldMoveY, Fraction(nMoveY) / maUIScale, MapUnit::Map100thMM); @@ -124,12 +124,12 @@ void CopyDlg::Reset() else m_pMtrFldAngle->SetValue( 0L ); - long nWidth = 0L; + long nWidth = 0; if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_WIDTH, true, &pPoolItem ) ) nWidth = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(); SetMetricValue( *m_pMtrFldWidth, Fraction(nWidth) / maUIScale, MapUnit::Map100thMM); - long nHeight = 0L; + long nHeight = 0; if( SfxItemState::SET == mrOutAttrs.GetItemState( ATTR_COPY_HEIGHT, true, &pPoolItem ) ) nHeight = static_cast<const SfxInt32Item*>( pPoolItem )->GetValue(); SetMetricValue( *m_pMtrFldHeight, Fraction(nHeight) / maUIScale, MapUnit::Map100thMM); @@ -244,11 +244,11 @@ IMPL_LINK_NOARG(CopyDlg, SetDefault, Button*, void) { m_pNumFldCopies->SetValue( 1L ); - long nValue = 500L; + long nValue = 500; SetMetricValue( *m_pMtrFldMoveX, Fraction(nValue) / maUIScale, MapUnit::Map100thMM); SetMetricValue( *m_pMtrFldMoveY, Fraction(nValue) / maUIScale, MapUnit::Map100thMM); - nValue = 0L; + nValue = 0; m_pMtrFldAngle->SetValue( nValue ); SetMetricValue( *m_pMtrFldWidth, Fraction(nValue) / maUIScale, MapUnit::Map100thMM); SetMetricValue( *m_pMtrFldHeight, Fraction(nValue) / maUIScale, MapUnit::Map100thMM); diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index 8c6673011075..7a5dc67728e4 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -313,7 +313,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( vcl::Window* pWindow, m_pLbPages->SetDropDownLineCount(10); // fill Listbox with page names of Docs - for( long nPage = 0L; + for( long nPage = 0; nPage < rDoc.GetSdPageCount( PageKind::Standard ); nPage++ ) { @@ -409,7 +409,7 @@ void SdDefineCustomShowDlg::ClickButtonHdl2(void* p) sal_uLong nPosCP = TREELIST_APPEND; SvTreeListEntry* pEntry = m_pLbCustomPages->FirstSelected(); if( pEntry ) - nPosCP = m_pLbCustomPages->GetModel()->GetAbsPos( pEntry ) + 1L; + nPosCP = m_pLbCustomPages->GetModel()->GetAbsPos( pEntry ) + 1; for( sal_Int32 i = 0; i < nCount; i++ ) { diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index 54818e24a3be..dc22b52ac769 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -223,9 +223,9 @@ void SdVectorizeDlg::Calculate( Bitmap& rBmp, GDIMetaFile& rMtf ) void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf, long nPosX, long nPosY, long nWidth, long nHeight ) { - sal_uLong nSumR = 0UL, nSumG = 0UL, nSumB = 0UL; - const long nRight = nPosX + nWidth - 1L; - const long nBottom = nPosY + nHeight - 1L; + sal_uLong nSumR = 0, nSumG = 0, nSumB = 0; + const long nRight = nPosX + nWidth - 1; + const long nBottom = nPosY + nHeight - 1; const double fMult = 1.0 / ( nWidth * nHeight ); for( long nY = nPosY; nY <= nBottom; nY++ ) @@ -249,11 +249,11 @@ void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf, aRect = PixelToLogic( aRect, rMtf.GetPrefMapMode() ); - if( aRect.Right() > ( rMaxSize.Width() - 1L ) ) - aRect.Right() = rMaxSize.Width() - 1L; + if( aRect.Right() > ( rMaxSize.Width() - 1 ) ) + aRect.Right() = rMaxSize.Width() - 1; - if( aRect.Bottom() > ( rMaxSize.Height() - 1L ) ) - aRect.Bottom() = rMaxSize.Height() - 1L; + if( aRect.Bottom() > ( rMaxSize.Height() - 1 ) ) + aRect.Bottom() = rMaxSize.Height() - 1; rMtf.AddAction( new MetaLineColorAction( aColor, true ) ); rMtf.AddAction( new MetaFillColorAction( aColor, true ) ); diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx index 5555593fbb28..1087c488bd2f 100644 --- a/sd/source/ui/func/fuconrec.cxx +++ b/sd/source/ui/func/fuconrec.cxx @@ -509,7 +509,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj) OUString aArrowName( SVX_RES(nResId) ); long nCount = pLineEndList->Count(); long nIndex; - for( nIndex = 0L; nIndex < nCount; nIndex++ ) + for( nIndex = 0; nIndex < nCount; nIndex++ ) { const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nIndex); if( pEntry->GetName() == aArrowName ) diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index 3fb2dc929646..065314cc4772 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -127,7 +127,7 @@ void FuCopy::DoExecute( SfxRequest& rReq ) } Rectangle aRect; - sal_Int32 lWidth = 0, lHeight = 0, lSizeX = 0L, lSizeY = 0L, lAngle = 0L; + sal_Int32 lWidth = 0, lHeight = 0, lSizeX = 0, lSizeY = 0, lAngle = 0; sal_uInt16 nNumber = 0; Color aStartColor, aEndColor; bool bColor = false; @@ -189,13 +189,13 @@ void FuCopy::DoExecute( SfxRequest& rReq ) // calculate number of possible copies aRect = mpView->GetAllMarkedRect(); - if( lWidth < 0L ) + if( lWidth < 0 ) { long nTmp = ( aRect.Right() - aRect.Left() ) / -lWidth; nNumber = (sal_uInt16) std::min( nTmp, (long)nNumber ); } - if( lHeight < 0L ) + if( lHeight < 0 ) { long nTmp = ( aRect.Bottom() - aRect.Top() ) / -lHeight; nNumber = (sal_uInt16) std::min( nTmp, (long)nNumber ); diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx index 009a2f39426c..4e22123d6862 100644 --- a/sd/source/ui/func/fumorph.cxx +++ b/sd/source/ui/func/fumorph.cxx @@ -128,11 +128,11 @@ void FuMorph::DoExecute( SfxRequest& ) { aPolyPoly1 = ::basegfx::tools::correctOrientations(aPolyPoly1); aPolyPoly1.removeDoublePoints(); - ::basegfx::B2VectorOrientation eIsClockwise1(::basegfx::tools::getOrientation(aPolyPoly1.getB2DPolygon(0L))); + ::basegfx::B2VectorOrientation eIsClockwise1(::basegfx::tools::getOrientation(aPolyPoly1.getB2DPolygon(0))); aPolyPoly2 = ::basegfx::tools::correctOrientations(aPolyPoly2); aPolyPoly2.removeDoublePoints(); - ::basegfx::B2VectorOrientation eIsClockwise2(::basegfx::tools::getOrientation(aPolyPoly2.getB2DPolygon(0L))); + ::basegfx::B2VectorOrientation eIsClockwise2(::basegfx::tools::getOrientation(aPolyPoly2.getB2DPolygon(0))); // set same orientation if(eIsClockwise1 != eIsClockwise2) @@ -149,7 +149,7 @@ void FuMorph::DoExecute( SfxRequest& ) aPolyPoly2.flip(); // force same point counts - for( sal_uInt32 a(0L); a < aPolyPoly1.count(); a++ ) + for( sal_uInt32 a(0); a < aPolyPoly1.count(); a++ ) { ::basegfx::B2DPolygon aSub1(aPolyPoly1.getB2DPolygon(a)); ::basegfx::B2DPolygon aSub2(aPolyPoly2.getB2DPolygon(a)); @@ -195,21 +195,21 @@ void FuMorph::DoExecute( SfxRequest& ) { // length of step in dest poly ::basegfx::B2DPolygon aRetval; - const double fStep(::basegfx::tools::getLength(rCandidate) / (double)(rCandidate.isClosed() ? nNum : nNum - 1L)); + const double fStep(::basegfx::tools::getLength(rCandidate) / (double)(rCandidate.isClosed() ? nNum : nNum - 1)); double fDestPos(0.0); double fSrcPos(0.0); - sal_uInt32 nSrcPos(0L); - sal_uInt32 nSrcPosNext((nSrcPos + 1L == rCandidate.count()) ? 0L : nSrcPos + 1L); + sal_uInt32 nSrcPos(0); + sal_uInt32 nSrcPosNext((nSrcPos + 1 == rCandidate.count()) ? 0L : nSrcPos + 1); double fNextSrcLen(::basegfx::B2DVector(rCandidate.getB2DPoint(nSrcPos) - rCandidate.getB2DPoint(nSrcPosNext)).getLength()); - for(sal_uInt32 b(0L); b < nNum; b++) + for(sal_uInt32 b(0); b < nNum; b++) { // calc fDestPos in source while(fSrcPos + fNextSrcLen < fDestPos) { fSrcPos += fNextSrcLen; nSrcPos++; - nSrcPosNext = (nSrcPos + 1L == rCandidate.count()) ? 0L : nSrcPos + 1L; + nSrcPosNext = (nSrcPos + 1 == rCandidate.count()) ? 0L : nSrcPos + 1; fNextSrcLen = ::basegfx::B2DVector(rCandidate.getB2DPoint(nSrcPos) - rCandidate.getB2DPoint(nSrcPosNext)).getLength(); } @@ -224,7 +224,7 @@ void FuMorph::DoExecute( SfxRequest& ) fDestPos += fStep; } - if(aRetval.count() >= 3L) + if(aRetval.count() >= 3) { aRetval.setClosed(rCandidate.isClosed()); } diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx index eb7cfae7535a..a5114eab4395 100644 --- a/sd/source/ui/func/fuoaprms.cxx +++ b/sd/source/ui/func/fuoaprms.cxx @@ -664,9 +664,9 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq ) Point aCurCenter(aCurRect.Center()); const ::basegfx::B2DPolyPolygon& rPolyPolygon = pPath->GetPathPoly(); sal_uInt32 nNoOfPolygons(rPolyPolygon.count()); - const ::basegfx::B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(nNoOfPolygons - 1L)); + const ::basegfx::B2DPolygon aPolygon(rPolyPolygon.getB2DPolygon(nNoOfPolygons - 1)); sal_uInt32 nPoints(aPolygon.count()); - const ::basegfx::B2DPoint aNewB2DCenter(aPolygon.getB2DPoint(nPoints - 1L)); + const ::basegfx::B2DPoint aNewB2DCenter(aPolygon.getB2DPoint(nPoints - 1)); const Point aNewCenter(FRound(aNewB2DCenter.getX()), FRound(aNewB2DCenter.getY())); Size aDistance(aNewCenter.X() - aCurCenter.X(), aNewCenter.Y() - aCurCenter.Y()); pRunningObj->Move(aDistance); diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx index 7ef6ab46b3b4..4adb3f6b9762 100644 --- a/sd/source/ui/func/fupoor.cxx +++ b/sd/source/ui/func/fupoor.cxx @@ -628,14 +628,14 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt) { pEdgeObj = static_cast<SdrEdgeObj*>(pHdl->GetObj()); - if(0L == pHdl->GetPointNum()) + if(0 == pHdl->GetPointNum()) { if(pEdgeObj->GetConnection(true).GetObject()) { bIsMoveOfConnectedHandle = true; } } - if(1L == pHdl->GetPointNum()) + if(1 == pHdl->GetPointNum()) { if(pEdgeObj->GetConnection(false).GetObject()) { diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx index f1e024947f0e..f599f96037bc 100644 --- a/sd/source/ui/func/fusel.cxx +++ b/sd/source/ui/func/fusel.cxx @@ -176,7 +176,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) long nAngle0 = GetAngle(aMDPos - mpView->GetRef1()); nAngle0 -= 27000; nAngle0 = NormAngle360(nAngle0); - bMirrorSide0 = nAngle0 < 18000L; + bMirrorSide0 = nAngle0 < 18000; if (!pHdl && mpView->Is3DRotationCreationActive()) { @@ -731,7 +731,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt) long nAngle1 = GetAngle(aPnt - mpView->GetRef1()); nAngle1 -= 27000; nAngle1 = NormAngle360(nAngle1); - bool bMirrorSide1 = nAngle1 < 18000L; + bool bMirrorSide1 = nAngle1 < 18000; if (bMirrorSide0 != bMirrorSide1) { diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx index 8d3a4218839f..a240333659cc 100644 --- a/sd/source/ui/func/fusldlg.cxx +++ b/sd/source/ui/func/fusldlg.cxx @@ -67,7 +67,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& ) SdPage* pPage = nullptr; long nPage; - for( nPage = mpDoc->GetSdPageCount( PageKind::Standard ) - 1L; nPage >= 0L; nPage-- ) + for( nPage = mpDoc->GetSdPageCount( PageKind::Standard ) - 1; nPage >= 0; nPage-- ) { pPage = mpDoc->GetSdPage( (sal_uInt16) nPage, PageKind::Standard ); OUString aStr( pPage->GetName() ); diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx index 30109b5a98bf..d974014a57d9 100644 --- a/sd/source/ui/inc/DrawViewShell.hxx +++ b/sd/source/ui/inc/DrawViewShell.hxx @@ -267,7 +267,7 @@ public: void LockInput(); void UnlockInput(); - bool IsInputLocked() const { return mnLockCount > 0UL; } + bool IsInputLocked() const { return mnLockCount > 0; } sal_uInt16 GetCurPageId() { return maTabControl->GetCurPageId(); } sal_uInt16 GetCurPagePos() { return maTabControl->GetCurPagePos(); } diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index e3d5a4c59c29..63b0c11d9967 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -662,7 +662,7 @@ void SAL_CALL SlideshowImpl::disposing() Help::EnableExtHelp(); showChildWindows(); - mnChildMask = 0UL; + mnChildMask = 0; } // show current window again @@ -2391,7 +2391,7 @@ static const FncGetChildWindowId aShowChildren[] = void SlideshowImpl::hideChildWindows() { - mnChildMask = 0UL; + mnChildMask = 0; if( ANIMATIONMODE_SHOW == meAnimationMode ) { diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx index ef80dac94e08..a3be158f7f2d 100644 --- a/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx +++ b/sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx @@ -29,7 +29,7 @@ // previews that are currently not visible. The visible previews are all // held in memory at all times. This default is used only when the // configuration does not have a value. -static const sal_Int32 MAXIMAL_CACHE_SIZE = 4L*1024L*1024L; +static const sal_Int32 MAXIMAL_CACHE_SIZE = 4*1024L*1024L; using namespace ::com::sun::star::uno; diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx index 9292cf50a08e..d3718f76ee73 100644 --- a/sd/source/ui/view/drawview.cxx +++ b/sd/source/ui/view/drawview.cxx @@ -454,7 +454,7 @@ bool DrawView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAtt * Paint-method: Redirect event to the view */ -void DrawView::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0L*/) +void DrawView::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0*/) { if( mpVDev ) { diff --git a/sd/source/ui/view/drtxtob.cxx b/sd/source/ui/view/drtxtob.cxx index ef1926241799..5271ed2e1293 100644 --- a/sd/source/ui/view/drtxtob.cxx +++ b/sd/source/ui/view/drtxtob.cxx @@ -458,14 +458,14 @@ void TextObjectBar::GetAttrState( SfxItemSet& rSet ) nStartPara = 0; nEndPara = pOLV->GetOutliner()->GetParagraphCount() - 1; } - long nUpper = 0L; + long nUpper = 0; for( sal_Int32 nPara = nStartPara; nPara <= nEndPara; nPara++ ) { const SfxItemSet& rItems = pOLV->GetOutliner()->GetParaAttribs( nPara ); const SvxULSpaceItem& rItem = static_cast<const SvxULSpaceItem&>( rItems.Get( EE_PARA_ULSPACE ) ); nUpper = std::max( nUpper, (long)rItem.GetUpper() ); } - if( nUpper == 0L ) + if( nUpper == 0 ) rSet.DisableItem( SID_PARASPACE_DECREASE ); } else diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index b70b424eb046..94e44b1236f6 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -787,8 +787,8 @@ void DrawViewShell::ShowMousePosInfo(const Rectangle& rRect, { RulerLine pHLines[2]; RulerLine pVLines[2]; - long nHOffs = 0L; - long nVOffs = 0L; + long nHOffs = 0; + long nVOffs = 0; sal_uInt16 nCnt; if (mpHorizontalRuler.get() != nullptr) diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx index 31ce3316ed54..0713916b1f46 100644 --- a/sd/source/ui/view/drviewsa.cxx +++ b/sd/source/ui/view/drviewsa.cxx @@ -325,7 +325,7 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind) OUString aName( "DrawViewShell" ); SetName (aName); - mnLockCount = 0UL; + mnLockCount = 0; uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx index 5dfe6f600908..4954cde4fe50 100644 --- a/sd/source/ui/view/outlnvsh.cxx +++ b/sd/source/ui/view/outlnvsh.cxx @@ -1323,7 +1323,7 @@ void OutlineViewShell::GetStatusBarState(SfxItemSet& rSet) if( pFirstPara == pLastPara ) { // how many pages are we before the selected page? - sal_uLong nPos = 0L; + sal_uLong nPos = 0; while( pFirstPara ) { pFirstPara = pOlView->GetPrevTitle( pFirstPara ); @@ -1673,7 +1673,7 @@ void OutlineViewShell::UpdateOutlineObject( SdPage* pPage, Paragraph* pPara ) // how many paragraphs in the outline? sal_Int32 nTitlePara = rOutliner.GetAbsPos( pPara ); sal_Int32 nPara = nTitlePara + 1; - sal_Int32 nParasInLayout = 0L; + sal_Int32 nParasInLayout = 0; pPara = rOutliner.GetParagraph( nPara ); while( pPara && !::Outliner::HasParaFlag(pPara, ParaFlag::ISPAGE) ) { diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 9eda921bb7a9..1ee4e3715183 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -385,8 +385,8 @@ SdPage* OutlineView::InsertSlideForParagraph( Paragraph* pPara ) mrOutliner.SetParaFlag( pPara, ParaFlag::ISPAGE ); // how many titles are there before the new title paragraph? - sal_uLong nExample = 0L; // position of the "example" page - sal_uLong nTarget = 0L; // position of insertion + sal_uLong nExample = 0; // position of the "example" page + sal_uLong nTarget = 0; // position of insertion while(pPara) { pPara = GetPrevTitle(pPara); @@ -503,7 +503,7 @@ IMPL_LINK( OutlineView, ParagraphRemovingHdl, ::Outliner::ParagraphHdlParam, aPa if( ::Outliner::HasParaFlag( pPara, ParaFlag::ISPAGE ) ) { // how many titles are in front of the title paragraph in question? - sal_uLong nPos = 0L; + sal_uLong nPos = 0; while(pPara) { pPara = GetPrevTitle(pPara); @@ -631,7 +631,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner::DepthChangeHdlParam, aParam // the paragraph was a page but now becomes a normal paragraph // how many titles are before the title paragraph in question? - sal_uLong nPos = 0L; + sal_uLong nPos = 0; Paragraph* pParagraph = pPara; while(pParagraph) { @@ -680,7 +680,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner::DepthChangeHdlParam, aParam else if ( (pOutliner->GetPrevDepth() == 1) && ( pOutliner->GetDepth( pOutliner->GetAbsPos( pPara ) ) == 2 ) ) { // how many titles are in front of the title paragraph in question? - sal_Int32 nPos = -1L; + sal_Int32 nPos = -1; Paragraph* pParagraph = pPara; while(pParagraph) @@ -700,7 +700,7 @@ IMPL_LINK( OutlineView, DepthChangedHdl, ::Outliner::DepthChangeHdlParam, aParam } // how many titles are in front of the title paragraph in question? - sal_Int32 nPos = -1L; + sal_Int32 nPos = -1; Paragraph* pTempPara = pPara; while(pTempPara) diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 193b5a45551f..12bfacf6dff8 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -468,7 +468,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewRedirector::createRedirected /** * The event will be forwarded to the View */ -void View::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0L*/) +void View::CompleteRedraw(OutputDevice* pOutDev, const vcl::Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector /*=0*/) { // execute ?? if (mnLockRedrawSmph == 0) diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 91be0281b146..53f3a1e4c067 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -789,7 +789,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi long nNewZoom; Point aOldMousePos = GetActiveWindow()->PixelToLogic(rCEvt.GetMousePosPixel()); - if( pData->GetDelta() < 0L ) + if( pData->GetDelta() < 0 ) nNewZoom = std::max( (long) pWin->GetMinZoom(), basegfx::zoomtools::zoomOut( nOldZoom )); else nNewZoom = std::min( (long) pWin->GetMaxZoom(), basegfx::zoomtools::zoomIn( nOldZoom )); diff --git a/sfx2/source/bastyp/mieclip.cxx b/sfx2/source/bastyp/mieclip.cxx index 65c2fee624a1..65fa79649183 100644 --- a/sfx2/source/bastyp/mieclip.cxx +++ b/sfx2/source/bastyp/mieclip.cxx @@ -82,7 +82,7 @@ SvStream* MSE40HTMLClipFormatObj::IsValid( SvStream& rStream ) ? nEnd - nStt + 32 : 0 )); pStrm->WriteStream( rStream ); - pStrm->SetStreamSize( nEnd - nStt + 1L ); + pStrm->SetStreamSize( nEnd - nStt + 1 ); pStrm->Seek( STREAM_SEEK_TO_BEGIN ); return pStrm; } diff --git a/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx b/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx index 49adb0aa95ac..7205eb9b6c5e 100644 --- a/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx +++ b/shell/source/win32/shlxthandler/ooofilt/stream_helper.cxx @@ -127,14 +127,14 @@ long FileStream::stell () { if (file) return ftell(file); - return -1L; + return -1; } long FileStream::sseek (long offset, int origin) { if (file) return fseek(file, offset, origin); - return -1L; + return -1; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/slideshow/source/engine/shapes/drawinglayeranimation.cxx b/slideshow/source/engine/shapes/drawinglayeranimation.cxx index 63d1787474cb..413d333890d2 100644 --- a/slideshow/source/engine/shapes/drawinglayeranimation.cxx +++ b/slideshow/source/engine/shapes/drawinglayeranimation.cxx @@ -105,7 +105,7 @@ double ScrollTextAnimNode::GetStateAtRelativeTime( const sal_uInt32 nRepeatCount(nRelativeTime / mnDuration); sal_uInt32 nFrameTime(nRelativeTime - (nRepeatCount * mnDuration)); - if(DoAlternate() && (nRepeatCount + 1L) % 2L) + if(DoAlternate() && (nRepeatCount + 1) % 2L) nFrameTime = mnDuration - nFrameTime; return mfStart + ((mfStop - mfStart) * @@ -120,7 +120,7 @@ double ScrollTextAnimNode::GetStateAtRelativeTime( { const sal_uInt32 nRepeatCount(nRelativeTime / mnDuration); - if((nRepeatCount + 1L) % 2L) + if((nRepeatCount + 1) % 2L) nFrameTime = mnDuration - nFrameTime; } @@ -306,7 +306,7 @@ double ActivityImpl::GetMixerState( sal_uInt32 nTime ) else { // end of animation, take last entry's end - fRetval = maVector[maVector.size() - 1L].GetStop(); + fRetval = maVector[maVector.size() - 1].GetStop(); } } @@ -322,25 +322,25 @@ sal_uInt32 ActivityImpl::GetStepWidthLogic() const sal_uInt32 nRetval(0L); - if(mnStepWidth < 0L) + if(mnStepWidth < 0) { // is in pixels, convert to logical units nRetval = (-mnStepWidth * PIXEL_TO_LOGIC); } - else if(mnStepWidth > 0L) + else if(mnStepWidth > 0) { // is in logical units nRetval = mnStepWidth; } - if(0L == nRetval) + if(0 == nRetval) { // step 1 pixel, canned value // with very high DPIs like in PDF export, this can // still get zero. for that cases, set a default, too (taken // from ainfoscrolltext.cxx) - nRetval = 100L; + nRetval = 100; } return nRetval; @@ -464,7 +464,7 @@ void ActivityImpl::ImpForceScrollTextAnimNodes() (fRelativeDistance * fDistanceLogic) / GetStepWidthLogic(); nLoopTime = FRound(fNumberSteps * mnFrequency); - if(0L == mnRepeat) + if(0 == mnRepeat) { if(!DoScrollIn()) { @@ -480,8 +480,8 @@ void ActivityImpl::ImpForceScrollTextAnimNodes() { sal_uInt32 nNumRepeat(mnRepeat); - if(DoAlternate() && (nNumRepeat + 1L) % 2L) - nNumRepeat += 1L; + if(DoAlternate() && (nNumRepeat + 1) % 2L) + nNumRepeat += 1; // ending main loop ScrollTextAnimNode aMainNode( @@ -830,7 +830,7 @@ ActivityImpl::ActivityImpl( // eg VisisbleWhenStopped is grayed out and needs to be corrected here. mbVisibleWhenStopped = true; mbVisibleWhenStarted = false; - mnRepeat = 0L; + mnRepeat = 0; } // Get animation direction diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx index 0ce16d4900e5..c2a4477a0565 100644 --- a/sot/source/sdstor/stg.cxx +++ b/sot/source/sdstor/stg.cxx @@ -195,7 +195,7 @@ sal_uLong StorageStream::Read( void* pData, sal_uLong nSize ) nPos += nSize; } else - nSize = 0L; + nSize = 0; return nSize; } @@ -209,7 +209,7 @@ sal_uLong StorageStream::Write( const void* pData, sal_uLong nSize ) nPos += nSize; } else - nSize = 0L; + nSize = 0; return nSize; } diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx index 9adfcac5fbd4..983401def54c 100644 --- a/sot/source/sdstor/stgole.cxx +++ b/sot/source/sdstor/stgole.cxx @@ -111,7 +111,7 @@ bool StgCompObjStream::Load() Seek( 8L ); // skip the first part sal_Int32 nMarker = 0; ReadInt32( nMarker ); - if( nMarker == -1L ) + if( nMarker == -1 ) { ReadClsId( *this, m_aClsId ); sal_Int32 nLen1 = 0; @@ -150,7 +150,7 @@ bool StgCompObjStream::Store() WriteInt16( 1 ); // Version? WriteInt16( -2 ); // 0xFFFE = Byte Order Indicator WriteInt32( 0x0A03 ); // Windows 3.10 - WriteInt32( -1L ); + WriteInt32( -1 ); WriteClsId( *this, m_aClsId ); // Class ID WriteInt32( aAsciiUserName.getLength() + 1 ); WriteCharPtr( aAsciiUserName.getStr() ); diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx index 84942089915d..71bcfe23f117 100644 --- a/starmath/source/node.cxx +++ b/starmath/source/node.cxx @@ -1548,8 +1548,8 @@ void SmVerticalBraceNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat) eRectPos = RectPos::Bottom; nDistScript *= + rFormat.GetDistance(DIS_LOWERLIMIT); } - nDistBody /= 100L; - nDistScript /= 100L; + nDistBody /= 100; + nDistScript /= 100; Point aPos = pBrace->AlignTo(*pBody, eRectPos, RectHorAlign::Center, RectVerAlign::Baseline); aPos.Y() += nDistBody; diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx index 22df49ebc509..f94b15b3eaaf 100644 --- a/stoc/test/testintrosp.cxx +++ b/stoc/test/testintrosp.cxx @@ -482,7 +482,7 @@ void ImplIntroTest::setPropertyValue( const OUString& aPropertyName, const Any& PropertyChangeEvent aEvt; aEvt.Source = (OWeakObject*)this; aEvt.PropertyName = aPropertyName; - aEvt.PropertyHandle = 0L; + aEvt.PropertyHandle = 0; aPropChangeListener->propertyChange( aEvt ); } if( aVetoPropChangeListener.is() && aPropertyName == aVetoPropChangeListenerStr ) @@ -490,7 +490,7 @@ void ImplIntroTest::setPropertyValue( const OUString& aPropertyName, const Any& PropertyChangeEvent aEvt; aEvt.Source = (OWeakObject*)this; aEvt.PropertyName = aVetoPropChangeListenerStr; - aEvt.PropertyHandle = 0L; + aEvt.PropertyHandle = 0; aVetoPropChangeListener->vetoableChange( aEvt ); } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 103da063321f..85533c5e23f4 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -2725,7 +2725,7 @@ void SvNumberformat::ImpGetFractionElements ( double& fNumber, sal_uInt16 nIx, { nDiv = 1; sal_uInt64 nBasis = ((sal_uInt64)floor( pow(10.0,rInfo.nCntExp))) - 1; // 9, 99, 999 ,... - sal_uInt64 nFracPrev = 1L, nDivPrev = 0, nFracNext, nDivNext, nPartialDenom; + sal_uInt64 nFracPrev = 1, nDivPrev = 0, nFracNext, nDivNext, nPartialDenom; double fRemainder = fNumber; // Use continued fraction representation of fNumber diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 844dc178cc65..4c3253f045d6 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -342,7 +342,7 @@ void SvTreeList::Move( SvTreeListEntry* pSrcEntry, SvTreeListEntry* pDstEntry ) if ( !pDstEntry ) { pParent = pRootItem; - nPos = 0UL; + nPos = 0; } else { diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index ad4eaef311b7..6173d089be73 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -1378,7 +1378,7 @@ void ToolbarMenu::Command( const CommandEvent& rCEvt ) const CommandWheelData* pData = rCEvt.GetWheelData(); if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) ) { - implCursorUpDown( pData->GetDelta() > 0L, false ); + implCursorUpDown( pData->GetDelta() > 0, false ); } } } diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx index c35159f9f00d..f8573997d1ab 100644 --- a/svtools/source/graphic/grfcache.cxx +++ b/svtools/source/graphic/grfcache.cxx @@ -1216,7 +1216,7 @@ bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt, co bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree ) { - sal_uLong nFreedSize = 0UL; + sal_uLong nFreedSize = 0; if( nSizeToFree ) { diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx index d50453192f8a..a70e87ce8b18 100644 --- a/svtools/source/graphic/grfmgr.cxx +++ b/svtools/source/graphic/grfmgr.cxx @@ -464,7 +464,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, pOut->SetDrawMode( nOldDrawMode & ~DrawModeFlags( DrawModeFlags::SettingsLine | DrawModeFlags::SettingsFill | DrawModeFlags::SettingsText | DrawModeFlags::SettingsGradient ) ); // mirrored horizontically - if( aSz.Width() < 0L ) + if( aSz.Width() < 0 ) { aPt.X() += aSz.Width() + 1; aSz.Width() = -aSz.Width(); @@ -472,7 +472,7 @@ bool GraphicObject::Draw( OutputDevice* pOut, const Point& rPt, const Size& rSz, } // mirrored vertically - if( aSz.Height() < 0L ) + if( aSz.Height() < 0 ) { aPt.Y() += aSz.Height() + 1; aSz.Height() = -aSz.Height(); diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index 3eb47fbc867f..99b62c3a8c42 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -338,7 +338,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib fRevScaleX = (double) ( aBitmapWidth - 1 ) / (double)( aUnrotatedWidth - 1 ); // create horizontal mapping table long x; - for( x = 0, nTmpX = aBitmapWidth - 1L, nTmp = aBitmapWidth - 2L >= 0 ? aBitmapWidth -2L : 0L; x < aUnrotatedWidth; x++ ) + for( x = 0, nTmpX = aBitmapWidth - 1, nTmp = aBitmapWidth - 2 >= 0 ? aBitmapWidth -2 : 0L; x < aUnrotatedWidth; x++ ) { fTmp = x * fRevScaleX; @@ -377,7 +377,7 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib fRevScaleY = (double) ( aBitmapHeight - 1 ) / (double)( aUnrotatedHeight - 1 ); // create vertical mapping table long y; - for( y = 0, nTmpY = aBitmapHeight - 1L, nTmp = aBitmapHeight - 2L >= 0 ? aBitmapHeight - 2L : 0L; y < aUnrotatedHeight; y++ ) + for( y = 0, nTmpY = aBitmapHeight - 1, nTmp = aBitmapHeight - 2 >= 0 ? aBitmapHeight - 2 : 0L; y < aUnrotatedHeight; y++ ) { fTmp = y * fRevScaleY; @@ -419,8 +419,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib const double fCosAngle = cos( nRot10 * F_PI1800 ); const double fSinAngle = sin( nRot10 * F_PI1800 ); - const long aTargetWidth = nEndX - nStartX + 1L; - const long aTargetHeight = nEndY - nStartY + 1L; + const long aTargetWidth = nEndX - nStartX + 1; + const long aTargetHeight = nEndY - nStartY + 1; std::unique_ptr<long[]> pCosX(new long[ aTargetWidth ]); std::unique_ptr<long[]> pSinX(new long[ aTargetWidth ]); std::unique_ptr<long[]> pCosY(new long[ aTargetHeight ]); @@ -472,8 +472,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib nUnRotX = ( pCosX[ x ] - nSinY ) >> 8; nUnRotY = ( pSinX[ x ] + nCosY ) >> 8; - if( ( nUnRotX >= 0L ) && ( nUnRotX < aUnrotatedWidth ) && - ( nUnRotY >= 0L ) && ( nUnRotY < aUnrotatedHeight ) ) + if( ( nUnRotX >= 0 ) && ( nUnRotX < aUnrotatedWidth ) && + ( nUnRotY >= 0 ) && ( nUnRotY < aUnrotatedHeight ) ) { nTmpX = pMapIX[ nUnRotX ]; nTmpFX = pMapFX[ nUnRotX ]; @@ -514,8 +514,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib nUnRotX = ( pCosX[ x ] - nSinY ) >> 8; nUnRotY = ( pSinX[ x ] + nCosY ) >> 8; - if( ( nUnRotX >= 0L ) && ( nUnRotX < aUnrotatedWidth ) && - ( nUnRotY >= 0L ) && ( nUnRotY < aUnrotatedHeight ) ) + if( ( nUnRotX >= 0 ) && ( nUnRotX < aUnrotatedWidth ) && + ( nUnRotY >= 0 ) && ( nUnRotY < aUnrotatedHeight ) ) { nTmpX = pMapIX[ nUnRotX ]; nTmpFX = pMapFX[ nUnRotX ]; @@ -653,8 +653,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib nUnRotX = ( pCosX[ nX ] - nSinY ) >> 8; nUnRotY = ( pSinX[ nX ] + nCosY ) >> 8; - if( ( nUnRotX >= 0L ) && ( nUnRotX < aUnrotatedWidth ) && - ( nUnRotY >= 0L ) && ( nUnRotY < aUnrotatedHeight ) ) + if( ( nUnRotX >= 0 ) && ( nUnRotX < aUnrotatedWidth ) && + ( nUnRotY >= 0 ) && ( nUnRotY < aUnrotatedHeight ) ) { nTmpX = pMapIX[ nUnRotX ]; nTmpFX = pMapFX[ nUnRotX ]; @@ -752,8 +752,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib nUnRotX = ( pCosX[ nX ] - nSinY ) >> 8; nUnRotY = ( pSinX[ nX ] + nCosY ) >> 8; - if( ( nUnRotX >= 0L ) && ( nUnRotX < aUnrotatedWidth ) && - ( nUnRotY >= 0L ) && ( nUnRotY < aUnrotatedHeight ) ) + if( ( nUnRotX >= 0 ) && ( nUnRotX < aUnrotatedWidth ) && + ( nUnRotY >= 0 ) && ( nUnRotY < aUnrotatedHeight ) ) { nTmpX = pMapIX[ nUnRotX ]; nTmpFX = pMapFX[ nUnRotX ]; @@ -808,11 +808,11 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib aTestB = pMAcc->GetBestMatchingColor( Color( COL_BLACK ) ); // create new horizontal mapping table - for( long nX = 0UL; nX < aUnrotatedWidth; nX++ ) + for( long nX = 0; nX < aUnrotatedWidth; nX++ ) pMapLX[ nX ] = FRound( (double) pMapIX[ nX ] + pMapFX[ nX ] / 1048576.0 ); // create new vertical mapping table - for( long nY = 0UL; nY < aUnrotatedHeight; nY++ ) + for( long nY = 0; nY < aUnrotatedHeight; nY++ ) pMapLY[ nY ] = FRound( (double) pMapIY[ nY ] + pMapFY[ nY ] / 1048576.0 ); // do mask rotation @@ -826,8 +826,8 @@ bool ImplCreateRotatedScaled( const BitmapEx& rBmpEx, const GraphicAttr& rAttrib nUnRotX = ( pCosX[ nX ] - nSinY ) >> 8; nUnRotY = ( pSinX[ nX ] + nCosY ) >> 8; - if( ( nUnRotX >= 0L ) && ( nUnRotX < aUnrotatedWidth ) && - ( nUnRotY >= 0L ) && ( nUnRotY < aUnrotatedHeight ) ) + if( ( nUnRotX >= 0 ) && ( nUnRotX < aUnrotatedWidth ) && + ( nUnRotY >= 0 ) && ( nUnRotY < aUnrotatedHeight ) ) { if( pMAcc ) { @@ -936,7 +936,7 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice, } else { - nStartX = -1L; // invalid + nStartX = -1; // invalid } } else @@ -944,12 +944,12 @@ bool GraphicManager::ImplCreateOutput( OutputDevice* pOutputDevice, aOutPoint = pOutputDevice->PixelToLogic( aOutputPointPix ); aOutSize = pOutputDevice->PixelToLogic( aOutputSizePix ); nStartX = nStartY = 0; - nEndX = aOutputSizePix.Width() - 1L; - nEndY = aOutputSizePix.Height() - 1L; + nEndX = aOutputSizePix.Width() - 1; + nEndY = aOutputSizePix.Height() - 1; } // do transformation - if( nStartX >= 0L ) + if( nStartX >= 0 ) { const bool bSimple = ( 1 == nW || 1 == nH ); diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 9ec51dfce12e..c26c4c079fae 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -473,7 +473,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) else if( HTML_ISALPHA( nNextCh ) ) { OUStringBuffer sEntityBuffer( MAX_ENTITY_LEN ); - sal_Int32 nPos = 0L; + sal_Int32 nPos = 0; do { sEntityBuffer.appendUtf32( nNextCh ); @@ -731,7 +731,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak ) if( sal_Unicode(EOF) == (nNextCh = GetNextChar()) && rInput.IsEof() ) { - if( !aToken.isEmpty() || sTmpBuffer.getLength() > 1L ) + if( !aToken.isEmpty() || sTmpBuffer.getLength() > 1 ) { // Have seen s.th. aside from blanks? aToken += sTmpBuffer.makeStringAndClear(); diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 85886b22ec3e..757fe235ba1f 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -1494,7 +1494,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm break; case MOVETO : { - if(aNewB2DPolygon.count() > 1L) + if(aNewB2DPolygon.count() > 1) { // #i76201# Add conversion to closed polygon when first and last points are equal basegfx::tools::checkClosed(aNewB2DPolygon); @@ -1520,7 +1520,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm { if(aNewB2DPolygon.count()) { - if(aNewB2DPolygon.count() > 1L) + if(aNewB2DPolygon.count() > 1) { aNewB2DPolygon.setClosed(true); aNewB2DPolyPolygon.append(aNewB2DPolygon); @@ -1551,7 +1551,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm { if ( nPntCount ) { - if(aNewB2DPolygon.count() > 1L) + if(aNewB2DPolygon.count() > 1) { // #i76201# Add conversion to closed polygon when first and last points are equal basegfx::tools::checkClosed(aNewB2DPolygon); @@ -1758,7 +1758,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm case ARC : case CLOCKWISEARC : { - if(aNewB2DPolygon.count() > 1L) + if(aNewB2DPolygon.count() > 1) { // #i76201# Add conversion to closed polygon when first and last points are equal basegfx::tools::checkClosed(aNewB2DPolygon); @@ -1940,7 +1940,7 @@ void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegm if ( rSegmentInd == nSegInfoSize ) rSegmentInd++; - if(aNewB2DPolygon.count() > 1L) + if(aNewB2DPolygon.count() > 1) { // #i76201# Add conversion to closed polygon when first and last points are equal basegfx::tools::checkClosed(aNewB2DPolygon); @@ -2257,7 +2257,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly ) vObjectList = vTempList; } - if(1L == vObjectList.size()) + if(1 == vObjectList.size()) { // a single object, correct some values AdaptObjColor(*vObjectList[0L],rCustomShapeSet,nColorIndex,nColorCount); diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx index a52bfffe4097..c68563193055 100644 --- a/svx/source/customshapes/EnhancedCustomShape3d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx @@ -214,7 +214,7 @@ basegfx::B3DPolygon EnhancedCustomShape3d::Transformation2D::ApplySkewSettings( basegfx::B3DPolygon aRetval; sal_uInt32 j; - for ( j = 0L; j < rPoly3D.count(); j++ ) + for ( j = 0; j < rPoly3D.count(); j++ ) { const basegfx::B3DPoint aPoint(rPoly3D.getB3DPoint(j)); double fDepth(-( aPoint.getZ() * fSkew ) / 100.0); @@ -748,12 +748,12 @@ Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomS basegfx::B3DPolygon aBoundVolume; const tools::Polygon aPolygon( rBoundRect ); - for ( i = 0L; i < 4L; i++ ) + for ( i = 0; i < 4; i++ ) { aBoundVolume.append(basegfx::B3DPoint(aPolygon[ (sal_uInt16)i ].X() - aCenter.X(), aPolygon[ (sal_uInt16)i ].Y() - aCenter.Y(), fExtrusionForward)); } - for ( i = 0L; i < 4L; i++ ) + for ( i = 0; i < 4; i++ ) { aBoundVolume.append(basegfx::B3DPoint(aPolygon[ (sal_uInt16)i ].X() - aCenter.X(), aPolygon[ (sal_uInt16)i ].Y() - aCenter.Y(), fExtrusionBackward)); } @@ -786,7 +786,7 @@ Rectangle EnhancedCustomShape3d::CalculateNewSnapRect( const SdrObject* pCustomS aBoundVolume = aTransformation2D.ApplySkewSettings( aBoundVolume ); tools::Polygon aTransformed( 8 ); - for ( i = 0L; i < 8L; i++ ) + for ( i = 0; i < 8; i++ ) aTransformed[ (sal_uInt16)i ] = aTransformation2D.Transform2D( aBoundVolume.getB3DPoint( i ) ); return aTransformed.GetBoundRect(); diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 2b0555820971..6851783f1d32 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -346,7 +346,7 @@ void SvxSuperContourDlg::SetGraphic( const Graphic& rGraphic ) { aUndoGraphic = aRedoGraphic = Graphic(); aGraphic = rGraphic; - nGrfChanged = 0UL; + nGrfChanged = 0; m_pContourWnd->SetGraphic( aGraphic ); } diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx index 3b90b0bb7f3f..2662d16c441c 100644 --- a/svx/source/dialog/contimp.hxx +++ b/svx/source/dialog/contimp.hxx @@ -105,7 +105,7 @@ public: void SetGraphic( const Graphic& rGraphic ); const Graphic& GetGraphic() const { return aGraphic; } - bool IsGraphicChanged() const { return nGrfChanged > 0UL; } + bool IsGraphicChanged() const { return nGrfChanged > 0; } void SetPolyPolygon( const tools::PolyPolygon& rPolyPoly ); tools::PolyPolygon GetPolyPolygon(); diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index da2e7fb0a3d4..12d06a0144c6 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -118,7 +118,7 @@ public: Imp3DDepthRemapper::Imp3DDepthRemapper(E3dScene& rScene) { - // only called when rScene.GetSubList() and nObjCount > 1L + // only called when rScene.GetSubList() and nObjCount > 1 SdrObjList* pList = rScene.GetSubList(); const size_t nObjCount(pList->GetObjCount()); diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 9457839c1c70..7d21a32d995e 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -2496,7 +2496,7 @@ void DbGridControl::MoveToLast() void DbGridControl::MoveToPrev() { - long nNewRow = std::max(GetCurRow() - 1L, 0L); + long nNewRow = std::max(GetCurRow() - 1, 0L); if (GetCurRow() != nNewRow) MoveToPosition(nNewRow); } diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx index bac41bc254fb..76a4b01c92e8 100644 --- a/svx/source/form/fmvwimp.cxx +++ b/svx/source/form/fmvwimp.cxx @@ -1262,7 +1262,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const svx::ODataAccessDescriptor // const SdrPageViewWinList& rWinList = pPageView->GetWinList(); // const SdrPageViewWindows& rPageViewWindows = pPageView->GetPageViewWindows(); - for( sal_uInt32 i = 0L; i < pPageView->PageWindowCount(); i++ ) + for( sal_uInt32 i = 0; i < pPageView->PageWindowCount(); i++ ) { const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(i); @@ -1415,7 +1415,7 @@ SdrObject* FmXFormView::implCreateXFormsControl( const svx::OXFormsDescriptor &_ // const SdrPageViewWinList& rWinList = pPageView->GetWinList(); // const SdrPageViewWindows& rPageViewWindows = pPageView->GetPageViewWindows(); - for( sal_uInt32 i = 0L; i < pPageView->PageWindowCount(); i++ ) + for( sal_uInt32 i = 0; i < pPageView->PageWindowCount(); i++ ) { const SdrPageWindow& rPageWindow = *pPageView->GetPageWindow(i); diff --git a/svx/source/gallery2/codec.cxx b/svx/source/gallery2/codec.cxx index aeb7a5dd0066..914b57c9eca2 100644 --- a/svx/source/gallery2/codec.cxx +++ b/svx/source/gallery2/codec.cxx @@ -76,7 +76,7 @@ void GalleryCodec::Write( SvStream& rStmToWrite ) aCodec.Compress( rStmToWrite, rStm ); aCodec.EndCompression(); - nCompSize = rStm.Tell() - nPos - 4UL; + nCompSize = rStm.Tell() - nPos - 4; rStm.Seek( nPos ); rStm.WriteUInt32( nCompSize ); rStm.Seek( STREAM_SEEK_TO_END ); @@ -102,7 +102,7 @@ void GalleryCodec::Read( SvStream& rStmToRead ) std::unique_ptr<sal_uInt8[]> pOutBuf(new sal_uInt8[ nUnCompressedSize ]); sal_uInt8* pTmpBuf = pOutBuf.get(); sal_uInt8* pLast = pOutBuf.get() + nUnCompressedSize - 1; - sal_uIntPtr nIndex = 0UL, nCountByte, nRunByte; + sal_uIntPtr nIndex = 0, nCountByte, nRunByte; bool bEndDecoding = false; do diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 3b5207437059..6089585bd079 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -978,8 +978,8 @@ sal_uIntPtr GalleryBrowser2::ImplGetSelectedItemId( const Point* pSelPos, Point& } } - rSelPos.X() = std::max( std::min( rSelPos.X(), aOutputSizePixel.Width() - 1L ), 0L ); - rSelPos.Y() = std::max( std::min( rSelPos.Y(), aOutputSizePixel.Height() - 1L ), 0L ); + rSelPos.X() = std::max( std::min( rSelPos.X(), aOutputSizePixel.Width() - 1 ), 0L ); + rSelPos.Y() = std::max( std::min( rSelPos.Y(), aOutputSizePixel.Height() - 1 ), 0L ); if( nRet && ( !mpCurTheme || ( nRet > mpCurTheme->GetObjectCount() ) ) ) { diff --git a/svx/source/sdr/animation/animationstate.cxx b/svx/source/sdr/animation/animationstate.cxx index 85b94a664000..f9cf78dd8669 100644 --- a/svx/source/sdr/animation/animationstate.cxx +++ b/svx/source/sdr/animation/animationstate.cxx @@ -93,7 +93,7 @@ namespace sdr // ensure step forward in integer timing, the floating step difference maybe smaller than 1.0. Use // at least 25ms for next step - const sal_uInt32 nMinimumStepTime((sal_uInt32)fCurrentTime + 25L); + const sal_uInt32 nMinimumStepTime((sal_uInt32)fCurrentTime + 25); if(nNextTime <= nMinimumStepTime) { diff --git a/svx/source/sdr/animation/scheduler.cxx b/svx/source/sdr/animation/scheduler.cxx index 9936dfdb4be6..cfee290d1c7b 100644 --- a/svx/source/sdr/animation/scheduler.cxx +++ b/svx/source/sdr/animation/scheduler.cxx @@ -142,7 +142,7 @@ namespace sdr { // without delta time, init events by triggering them. This will invalidate // painted objects and add them to the scheduler again - mnDeltaTime = 0L; + mnDeltaTime = 0; triggerEvents(); checkTimeout(); } diff --git a/svx/source/sdr/event/eventhandler.cxx b/svx/source/sdr/event/eventhandler.cxx index 4f3c6baab603..9ca3d87cdf45 100644 --- a/svx/source/sdr/event/eventhandler.cxx +++ b/svx/source/sdr/event/eventhandler.cxx @@ -99,7 +99,7 @@ namespace sdr // for control bool TimerEventHandler::IsEmpty() const { - return (0L == maVector.size()); + return (0 == maVector.size()); } // The timer when it is triggered; from class Timer diff --git a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx index 8ede68ce1708..794200fbd87a 100644 --- a/svx/source/sdr/overlay/overlaymanagerbuffered.cxx +++ b/svx/source/sdr/overlay/overlaymanagerbuffered.cxx @@ -263,14 +263,14 @@ namespace sdr // truncate aRegionRectanglePixel to destination pixel size, more does // not need to be prepared since destination is a buffer for a window. So, // maximum size indirectly shall be limited to getOutputDevice().GetOutputSizePixel() - if(aRegionRectanglePixel.Left() < 0L) + if(aRegionRectanglePixel.Left() < 0) { - aRegionRectanglePixel.Left() = 0L; + aRegionRectanglePixel.Left() = 0; } - if(aRegionRectanglePixel.Top() < 0L) + if(aRegionRectanglePixel.Top() < 0) { - aRegionRectanglePixel.Top() = 0L; + aRegionRectanglePixel.Top() = 0; } if(aRegionRectanglePixel.Right() > aDestinationSizePixel.getWidth()) diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx index e150b19469f5..7d1aed4ecf56 100644 --- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx +++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx @@ -275,7 +275,7 @@ namespace drawinglayer if(nTempStartWidth) { - if(nTempStartWidth < 0L) + if(nTempStartWidth < 0) { fStartWidth = ((double)(-nTempStartWidth) * fWidth) * 0.01; } @@ -298,7 +298,7 @@ namespace drawinglayer if(nTempEndWidth) { - if(nTempEndWidth < 0L) + if(nTempEndWidth < 0) { fEndWidth = ((double)(-nTempEndWidth) * fWidth) * 0.01; } @@ -882,7 +882,7 @@ namespace drawinglayer css::drawing::ProjectionMode aProjectionMode(css::drawing::ProjectionMode_PARALLEL); const sal_uInt16 nProjectionValue(static_cast<const Svx3DPerspectiveItem&>(rSet.Get(SDRATTR_3DSCENE_PERSPECTIVE)).GetValue()); - if(1L == nProjectionValue) + if(1 == nProjectionValue) { aProjectionMode = css::drawing::ProjectionMode_PERSPECTIVE; } @@ -897,15 +897,15 @@ namespace drawinglayer css::drawing::ShadeMode aShadeMode(css::drawing::ShadeMode_FLAT); const sal_uInt16 nShadeValue(static_cast<const Svx3DShadeModeItem&>(rSet.Get(SDRATTR_3DSCENE_SHADE_MODE)).GetValue()); - if(1L == nShadeValue) + if(1 == nShadeValue) { aShadeMode = css::drawing::ShadeMode_PHONG; } - else if(2L == nShadeValue) + else if(2 == nShadeValue) { aShadeMode = css::drawing::ShadeMode_SMOOTH; } - else if(3L == nShadeValue) + else if(3 == nShadeValue) { aShadeMode = css::drawing::ShadeMode_DRAFT; } diff --git a/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx b/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx index d8434d62db20..c565f983e8c6 100644 --- a/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx +++ b/svx/source/sdr/primitive3d/sdrattributecreator3d.cxx @@ -39,11 +39,11 @@ namespace drawinglayer css::drawing::NormalsKind aNormalsKind(css::drawing::NormalsKind_SPECIFIC); const sal_uInt16 nNormalsValue(static_cast<const Svx3DNormalsKindItem&>(rSet.Get(SDRATTR_3DOBJ_NORMALS_KIND)).GetValue()); - if(1L == nNormalsValue) + if(1 == nNormalsValue) { aNormalsKind = css::drawing::NormalsKind_FLAT; } - else if(2L == nNormalsValue) + else if(2 == nNormalsValue) { aNormalsKind = css::drawing::NormalsKind_SPHERE; } @@ -55,11 +55,11 @@ namespace drawinglayer css::drawing::TextureProjectionMode aTextureProjectionX(css::drawing::TextureProjectionMode_OBJECTSPECIFIC); const sal_uInt16 nTextureValueX(static_cast<const Svx3DTextureProjectionXItem&>(rSet.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_X)).GetValue()); - if(1L == nTextureValueX) + if(1 == nTextureValueX) { aTextureProjectionX = css::drawing::TextureProjectionMode_PARALLEL; } - else if(2L == nTextureValueX) + else if(2 == nTextureValueX) { aTextureProjectionX = css::drawing::TextureProjectionMode_SPHERE; } @@ -68,11 +68,11 @@ namespace drawinglayer css::drawing::TextureProjectionMode aTextureProjectionY(css::drawing::TextureProjectionMode_OBJECTSPECIFIC); const sal_uInt16 nTextureValueY(static_cast<const Svx3DTextureProjectionYItem&>(rSet.Get(SDRATTR_3DOBJ_TEXTURE_PROJ_Y)).GetValue()); - if(1L == nTextureValueY) + if(1 == nTextureValueY) { aTextureProjectionY = css::drawing::TextureProjectionMode_PARALLEL; } - else if(2L == nTextureValueY) + else if(2 == nTextureValueY) { aTextureProjectionY = css::drawing::TextureProjectionMode_SPHERE; } diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 09703ceffadd..13b8f4ceaa26 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -1065,7 +1065,7 @@ void PosSizePropertyPanel::SetPosSizeMinMax() fRight -= maRect.getWidth(); fBottom -= maRect.getHeight(); - const double fMaxLong((double)(MetricField::ConvertValue( LONG_MAX, 0, MapUnit::Map100thMM, meDlgUnit ) - 1L)); + const double fMaxLong((double)(MetricField::ConvertValue( LONG_MAX, 0, MapUnit::Map100thMM, meDlgUnit ) - 1)); fLeft = basegfx::clamp(fLeft, -fMaxLong, fMaxLong); fRight = basegfx::clamp(fRight, -fMaxLong, fMaxLong); fTop = basegfx::clamp(fTop, - fMaxLong, fMaxLong); diff --git a/svx/source/svdraw/polypolygoneditor.cxx b/svx/source/svdraw/polypolygoneditor.cxx index 9fab1ba153f3..548580eb3cb5 100644 --- a/svx/source/svdraw/polypolygoneditor.cxx +++ b/svx/source/svdraw/polypolygoneditor.cxx @@ -46,7 +46,7 @@ bool PolyPolygonEditor::DeletePoints( const std::set< sal_uInt16 >& rAbsPoints ) aCandidate.remove(nPnt); - if( ( mbIsClosed && aCandidate.count() < 3L) || (aCandidate.count() < 2L) ) + if( ( mbIsClosed && aCandidate.count() < 3) || (aCandidate.count() < 2) ) { maPolyPolygon.remove(nPoly); } @@ -155,7 +155,7 @@ bool PolyPolygonEditor::SetPointsSmooth( basegfx::B2VectorContinuity eFlags, con bool PolyPolygonEditor::GetRelativePolyPoint( const basegfx::B2DPolyPolygon& rPoly, sal_uInt32 nAbsPnt, sal_uInt32& rPolyNum, sal_uInt32& rPointNum ) { const sal_uInt32 nPolyCount(rPoly.count()); - sal_uInt32 nPolyNum(0L); + sal_uInt32 nPolyNum(0); while(nPolyNum < nPolyCount) { diff --git a/svx/source/svdraw/sdrpagewindow.cxx b/svx/source/svdraw/sdrpagewindow.cxx index 9b7e9b1b8ad5..84cfd5d0880b 100644 --- a/svx/source/svdraw/sdrpagewindow.cxx +++ b/svx/source/svdraw/sdrpagewindow.cxx @@ -237,7 +237,7 @@ namespace if(aCandidate.count()) { - const sal_uInt32 nLoopCount(aCandidate.isClosed() ? aCandidate.count() : aCandidate.count() - 1L); + const sal_uInt32 nLoopCount(aCandidate.isClosed() ? aCandidate.count() : aCandidate.count() - 1); rOutDev.SetFillColor(); rOutDev.SetLineColor(aColor); @@ -254,7 +254,7 @@ namespace void impTryTest(const SdrPageView& rPageView, OutputDevice& rOutDev) { - if(rPageView.GetPage() && rPageView.GetPage()->GetObjCount() >= 2L) + if(rPageView.GetPage() && rPageView.GetPage()->GetObjCount() >= 2) { SdrPage* pPage = rPageView.GetPage(); SdrObject* pObjA = pPage->GetObj(0L); diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index c3519a3fcbe0..d1527eebc105 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -1313,7 +1313,7 @@ bool SdrTextAniAmountItem::GetPresentation( sal_Int32 nValue(GetValue()); if(!nValue) - nValue = -1L; + nValue = -1; if(nValue < 0) { diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 74de5e46e874..ed1ffd1d0b84 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -284,7 +284,7 @@ void SdrEditView::EndUndo() // #i13033# // Comparison changed to 1L since EndUndo() is called later now // and EndUndo WILL change count to count-1 - if(1L == mpModel->GetUndoBracketLevel()) + if(1 == mpModel->GetUndoBracketLevel()) { ImpBroadcastEdgesOfMarkedNodes(); } diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index dddb0bd0ee98..aa5b6b3cf009 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -524,7 +524,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa XPolygon aXP((sal_uInt16)nPointCount); sal_uInt32 nPtNum; - for(nPtNum = 0L; nPtNum < nPointCount; nPtNum++) + for(nPtNum = 0; nPtNum < nPointCount; nPtNum++) { Point aPt(pO->GetPoint(nPtNum)); aXP[(sal_uInt16)nPtNum]=aPt; @@ -537,7 +537,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa case SdrCrookMode::Stretch: CrookStretchPoly(aXP,rRef,rRad,bVertical,rMarkRect); break; } - for(nPtNum = 0L; nPtNum < nPointCount; nPtNum++) + for(nPtNum = 0; nPtNum < nPointCount; nPtNum++) { // broadcasting could be optimized here, but for the // current two points of the measurement object, it's fine @@ -638,7 +638,7 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol XPolygon aXP((sal_uInt16)nPointCount); sal_uInt32 nPtNum; - for(nPtNum = 0L; nPtNum < nPointCount; nPtNum++) + for(nPtNum = 0; nPtNum < nPointCount; nPtNum++) { Point aPt(pO->GetPoint(nPtNum)); aXP[(sal_uInt16)nPtNum]=aPt; @@ -646,7 +646,7 @@ void SdrEditView::ImpDistortObj(SdrObject* pO, const Rectangle& rRef, const XPol aXP.Distort(rRef, rDistortedRect); - for(nPtNum = 0L; nPtNum < nPointCount; nPtNum++) + for(nPtNum = 0; nPtNum < nPointCount; nPtNum++) { // broadcasting could be optimized here, but for the // current two points of the measurement object it's fine diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index d0a15ece7dc6..3fc220ee9425 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -688,19 +688,19 @@ basegfx::B2DPolygon SdrEditView::ImpCombineToSinglePolygon(const basegfx::B2DPol { const sal_uInt32 nPolyCount(rPolyPolygon.count()); - if(0L == nPolyCount) + if(0 == nPolyCount) { return basegfx::B2DPolygon(); } - else if(1L == nPolyCount) + else if(1 == nPolyCount) { - return rPolyPolygon.getB2DPolygon(0L); + return rPolyPolygon.getB2DPolygon(0); } else { - basegfx::B2DPolygon aRetval(rPolyPolygon.getB2DPolygon(0L)); + basegfx::B2DPolygon aRetval(rPolyPolygon.getB2DPolygon(0)); - for(sal_uInt32 a(1L); a < nPolyCount; a++) + for(sal_uInt32 a(1); a < nPolyCount; a++) { basegfx::B2DPolygon aCandidate(rPolyPolygon.getB2DPolygon(a)); @@ -708,10 +708,10 @@ basegfx::B2DPolygon SdrEditView::ImpCombineToSinglePolygon(const basegfx::B2DPol { if(aCandidate.count()) { - const basegfx::B2DPoint aCA(aCandidate.getB2DPoint(0L)); - const basegfx::B2DPoint aCB(aCandidate.getB2DPoint(aCandidate.count() - 1L)); - const basegfx::B2DPoint aRA(aRetval.getB2DPoint(0L)); - const basegfx::B2DPoint aRB(aRetval.getB2DPoint(aRetval.count() - 1L)); + const basegfx::B2DPoint aCA(aCandidate.getB2DPoint(0)); + const basegfx::B2DPoint aCB(aCandidate.getB2DPoint(aCandidate.count() - 1)); + const basegfx::B2DPoint aRA(aRetval.getB2DPoint(0)); + const basegfx::B2DPoint aRB(aRetval.getB2DPoint(aRetval.count() - 1)); const double fRACA(basegfx::B2DVector(aCA - aRA).getLength()); const double fRACB(basegfx::B2DVector(aCB - aRA).getLength()); @@ -791,7 +791,7 @@ void SdrEditView::DistributeMarkedObjects() if(eHor != SvxDistributeHorizontal::NONE) { // build sorted entry list - nFullLength = 0L; + nFullLength = 0; for( size_t a = 0; a < nMark; ++a ) { @@ -886,7 +886,7 @@ void SdrEditView::DistributeMarkedObjects() if(eVer != SvxDistributeVertical::NONE) { // build sorted entry list - nFullLength = 0L; + nFullLength = 0; for( size_t a = 0; a < nMark; ++a ) { @@ -1301,7 +1301,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly) if(!pInsOL) { - nInsPos = pObj->GetOrdNum() + 1L; + nInsPos = pObj->GetOrdNum() + 1; pInsPV = pM->GetPageView(); pInsOL = pObj->GetObjList(); } @@ -1323,17 +1323,17 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly) { SdrObjKind eKind = OBJ_PATHFILL; - if(nPolyCount > 1L) + if(nPolyCount > 1) { aPolyPolygon.setClosed(true); } else { // check for Polyline - const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(0L)); + const basegfx::B2DPolygon aPolygon(aPolyPolygon.getB2DPolygon(0)); const sal_uInt32 nPointCount(aPolygon.count()); - if(nPointCount <= 2L) + if(nPointCount <= 2) { eKind = OBJ_PATHLINE; } @@ -1341,8 +1341,8 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly) { if(!aPolygon.isClosed()) { - const basegfx::B2DPoint aPointA(aPolygon.getB2DPoint(0L)); - const basegfx::B2DPoint aPointB(aPolygon.getB2DPoint(nPointCount - 1L)); + const basegfx::B2DPoint aPointA(aPolygon.getB2DPoint(0)); + const basegfx::B2DPoint aPointB(aPolygon.getB2DPoint(nPointCount - 1)); const double fDistance(basegfx::B2DVector(aPointB - aPointA).getLength()); const double fJoinTolerance(10.0); @@ -1408,18 +1408,18 @@ bool SdrEditView::ImpCanDismantle(const basegfx::B2DPolyPolygon& rPpolyPolygon, bool bCan(false); const sal_uInt32 nPolygonCount(rPpolyPolygon.count()); - if(nPolygonCount >= 2L) + if(nPolygonCount >= 2) { // #i69172# dismantle makes sense with 2 or more polygons in a polyPolygon bCan = true; } - else if(bMakeLines && 1L == nPolygonCount) + else if(bMakeLines && 1 == nPolygonCount) { // #i69172# ..or with at least 2 edges (curves or lines) const basegfx::B2DPolygon aPolygon(rPpolyPolygon.getB2DPolygon(0L)); const sal_uInt32 nPointCount(aPolygon.count()); - if(nPointCount > 2L) + if(nPointCount > 2) { bCan = true; } diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 4159b61fe656..d35b11e1b0f5 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -737,7 +737,7 @@ bool SdrObjEditView::SdrBeginTextEdit( if(!bBrk && !pWin) { - for(i = 0L; i < nWinCount && !pWin; i++) + for(i = 0; i < nWinCount && !pWin; i++) { SdrPaintWindow* pPaintWindow = GetPaintWindow(i); @@ -881,7 +881,7 @@ bool SdrObjEditView::SdrBeginTextEdit( // register all windows as OutlinerViews with the Outliner if(!bOnlyOneView) { - for(i = 0L; i < nWinCount; i++) + for(i = 0; i < nWinCount; i++) { SdrPaintWindow* pPaintWindow = GetPaintWindow(i); OutputDevice& rOutDev = pPaintWindow->GetOutputDevice(); diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index a19a53422688..c673dc4e118e 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -783,7 +783,7 @@ bool ImpSdrGDIMetaFileImport::CheckLastLineMerge(const basegfx::B2DPolygon& rSrc if(pLastPoly) { - if(1L == pLastPoly->GetPathPoly().count()) + if(1 == pLastPoly->GetPathPoly().count()) { bool bOk(false); basegfx::B2DPolygon aDstPoly(pLastPoly->GetPathPoly().getB2DPolygon(0L)); @@ -796,32 +796,32 @@ bool ImpSdrGDIMetaFileImport::CheckLastLineMerge(const basegfx::B2DPolygon& rSrc if(aDstPoly.count()) { - const sal_uInt32 nMaxDstPnt(aDstPoly.count() - 1L); - const sal_uInt32 nMaxSrcPnt(rSrcPoly.count() - 1L); + const sal_uInt32 nMaxDstPnt(aDstPoly.count() - 1); + const sal_uInt32 nMaxSrcPnt(rSrcPoly.count() - 1); if(aDstPoly.getB2DPoint(nMaxDstPnt) == rSrcPoly.getB2DPoint(0L)) { - aDstPoly.append(rSrcPoly, 1L, rSrcPoly.count() - 1L); + aDstPoly.append(rSrcPoly, 1L, rSrcPoly.count() - 1); bOk = true; } else if(aDstPoly.getB2DPoint(0L) == rSrcPoly.getB2DPoint(nMaxSrcPnt)) { basegfx::B2DPolygon aNew(rSrcPoly); - aNew.append(aDstPoly, 1L, aDstPoly.count() - 1L); + aNew.append(aDstPoly, 1L, aDstPoly.count() - 1); aDstPoly = aNew; bOk = true; } else if(aDstPoly.getB2DPoint(0L) == rSrcPoly.getB2DPoint(0L)) { aDstPoly.flip(); - aDstPoly.append(rSrcPoly, 1L, rSrcPoly.count() - 1L); + aDstPoly.append(rSrcPoly, 1L, rSrcPoly.count() - 1); bOk = true; } else if(aDstPoly.getB2DPoint(nMaxDstPnt) == rSrcPoly.getB2DPoint(nMaxSrcPnt)) { basegfx::B2DPolygon aNew(rSrcPoly); aNew.flip(); - aDstPoly.append(aNew, 1L, aNew.count() - 1L); + aDstPoly.append(aNew, 1L, aNew.count() - 1); bOk = true; } } diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 2f8a46854969..d483f6aed95d 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -926,8 +926,8 @@ sdr::overlay::OverlayObject* SdrHdl::CreateOverlayObject( } else { - sal_uInt16 nCenX((sal_uInt16)(aBmpEx.GetSizePixel().Width() - 1L) >> 1); - sal_uInt16 nCenY((sal_uInt16)(aBmpEx.GetSizePixel().Height() - 1L) >> 1); + sal_uInt16 nCenX((sal_uInt16)(aBmpEx.GetSizePixel().Width() - 1) >> 1); + sal_uInt16 nCenY((sal_uInt16)(aBmpEx.GetSizePixel().Height() - 1) >> 1); if(aMoveOutsideOffset.X() > 0) { diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index 6cf64c9e1da6..edd162c47d32 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -437,7 +437,7 @@ const OUString& SdrMarkList::GetMarkDescription() const { const size_t nCount(GetMarkCount()); - if(mbNameOk && 1L == nCount) + if(mbNameOk && 1 == nCount) { // if it's a single selection, cache only text frame const SdrObject* pObj = GetMark(0)->GetMarkedSdrObj(); @@ -458,7 +458,7 @@ const OUString& SdrMarkList::GetMarkDescription() const { const_cast<SdrMarkList*>(this)->maMarkName = ImpGetResStr(STR_ObjNameNoObj); } - else if(1L == nCount) + else if(1 == nCount) { if(pMark->GetMarkedSdrObj()) { @@ -549,7 +549,7 @@ const OUString& SdrMarkList::GetPointMarkDescription(bool bGlue) const const SdrMark* pMark = GetMark(n1stMarkNum); OUString aNam; - if(1L == nMarkPtObjAnz) + if(1 == nMarkPtObjAnz) { if(pMark->GetMarkedSdrObj()) { @@ -587,7 +587,7 @@ const OUString& SdrMarkList::GetPointMarkDescription(bool bGlue) const OUString aStr1; - if(1L == nMarkPtAnz) + if(1 == nMarkPtAnz) { aStr1 = (ImpGetResStr(bGlue ? STR_ViewMarkedGluePoint : STR_ViewMarkedPoint)); } diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 131d2ad5eb65..05fa868d46ea 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -1187,7 +1187,7 @@ void SdrModel::TakeMetricStr(long nVal, OUString& rStr, bool bNoUnitChars, sal_I { // #i22167# // change to double precision usage to not lose decimal places - const bool bNegative(nVal < 0L); + const bool bNegative(nVal < 0); SvtSysLocale aSysLoc; const LocaleDataWrapper& rLoc(aSysLoc.GetLocaleData()); double fLocalValue(double(nVal) * double(aUIUnitFact)); diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index c379541d4dd8..e7a877e49dc1 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -137,7 +137,7 @@ void SdrMarkView::ImpClearVars() mbPlusHdlAlways=false; mnFrameHandlesLimit=50; mbInsPolyPoint=false; - mnInsPointNum = 0L; + mnInsPointNum = 0; mbMarkedObjRectDirty=false; mbMarkedPointsRectsDirty=false; mbMarkHandlesHidden = false; diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index de9124fa705f..1bb0dbaf4f6b 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1191,7 +1191,7 @@ SdrHdl* SdrObject::GetPlusHdl(const SdrHdl& /*rHdl*/, sal_uInt32 /*nPlNum*/) con void SdrObject::AddToHdlList(SdrHdlList& rHdlList) const { sal_uInt32 nCount=GetHdlCount(); - for (sal_uInt32 i=0L; i<nCount; i++) { + for (sal_uInt32 i=0; i<nCount; i++) { SdrHdl* pHdl=GetHdl(i); if (pHdl!=nullptr) { rHdlList.AddHdl(pHdl); diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 65822737b2f6..dfc6738fba96 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -273,7 +273,7 @@ sal_uInt32 SdrCaptionObj::GetHdlCount() const { sal_uInt32 nCount1(SdrRectObj::GetHdlCount()); // Currently only dragging the tail's end is implemented. - return nCount1 + 1L; + return nCount1 + 1; } SdrHdl* SdrCaptionObj::GetHdl(sal_uInt32 nHdlNum) const diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index e4b3a01d49f0..dfc640f98434 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -176,13 +176,13 @@ bool SdrCircObj::PaintNeedsXPolyCirc() const if(!bNeed && meCircleKind == OBJ_CARC) { // start of the line is here if StartPolygon, StartWidth!=0 - bNeed=static_cast<const XLineStartItem&>(rSet.Get(XATTR_LINESTART)).GetLineStartValue().count() != 0L && + bNeed=static_cast<const XLineStartItem&>(rSet.Get(XATTR_LINESTART)).GetLineStartValue().count() != 0 && static_cast<const XLineStartWidthItem&>(rSet.Get(XATTR_LINESTARTWIDTH)).GetValue() != 0; if(!bNeed) { // end of the line is here if EndPolygon, EndWidth!=0 - bNeed = static_cast<const XLineEndItem&>(rSet.Get(XATTR_LINEEND)).GetLineEndValue().count() != 0L && + bNeed = static_cast<const XLineEndItem&>(rSet.Get(XATTR_LINEEND)).GetLineEndValue().count() != 0 && static_cast<const XLineEndWidthItem&>(rSet.Get(XATTR_LINEENDWIDTH)).GetValue() != 0; } } @@ -388,7 +388,7 @@ SdrHdl* SdrCircObj::GetHdl(sal_uInt32 nHdlNum) const { if (meCircleKind==OBJ_CIRC) { - nHdlNum += 2L; + nHdlNum += 2; } SdrHdl* pH = nullptr; @@ -406,7 +406,7 @@ SdrHdl* SdrCircObj::GetHdl(sal_uInt32 nHdlNum) const case 1: aPnt = GetAnglePnt(maRect,nEndAngle); eLocalKind = SdrHdlKind::Circle; - nPNum = 2L; + nPNum = 2; break; case 2: aPnt = maRect.TopLeft(); @@ -759,12 +759,12 @@ basegfx::B2DPolyPolygon SdrCircObj::TakeCreatePoly(const SdrDragStat& rDrag) con { const ImpCircUser* pU = static_cast<const ImpCircUser*>(rDrag.GetUser()); - if(rDrag.GetPointCount() < 4L) + if(rDrag.GetPointCount() < 4) { // force to OBJ_CIRC to get full visualisation basegfx::B2DPolyPolygon aRetval(ImpCalcXPolyCirc(OBJ_CIRC, pU->aR, pU->nStart, pU->nEnd)); - if(3L == rDrag.GetPointCount()) + if(3 == rDrag.GetPointCount()) { // add edge to first point on ellipse basegfx::B2DPolygon aNew; diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index cc14814fc7dc..c2f70302b7e8 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -917,7 +917,7 @@ sal_uInt32 SdrGrafObj::GetHdlCount() const SdrHdl* SdrGrafObj::GetHdl(sal_uInt32 nHdlNum) const { - return SdrRectObj::GetHdl( nHdlNum + 1L ); + return SdrRectObj::GetHdl( nHdlNum + 1 ); } void SdrGrafObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 286e6088fdf8..4712d2b7f070 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -358,7 +358,7 @@ long impGetLineStartEndDistance(const basegfx::B2DPolyPolygon& rPolyPolygon, lon if(bCenter) { - nHeight /= 2L; + nHeight /= 2; } return nHeight; @@ -1113,14 +1113,14 @@ sal_uInt32 SdrMeasureObj::GetPointCount() const Point SdrMeasureObj::GetPoint(sal_uInt32 i) const { - return (0L == i) ? aPt1 : aPt2; + return (0 == i) ? aPt1 : aPt2; } void SdrMeasureObj::NbcSetPoint(const Point& rPnt, sal_uInt32 i) { - if (0L == i) + if (0 == i) aPt1=rPnt; - if (1L == i) + if (1 == i) aPt2=rPnt; SetRectsDirty(); SetTextDirty(); diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 21feaf92474a..d1a06cf77fe0 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -295,7 +295,7 @@ void ImpPathCreateUser::CalcBezier(const Point& rP1, const Point& rP2, const Poi // #i21479# // Also copy the end point when no end point is set yet - if (!bMouseDown || (0L == aBezEnd.X() && 0L == aBezEnd.Y())) aBezEnd=rP2; + if (!bMouseDown || (0 == aBezEnd.X() && 0 == aBezEnd.Y())) aBezEnd=rP2; bBezier=bRet; } @@ -879,7 +879,7 @@ bool ImpPathForDragAndCreate::endPathDrag(SdrDragStat& rDrag) basegfx::B2DPolygon aCandidate(aTempPolyPolygon.getB2DPolygon(nPoly)); aCandidate.remove(nPnt); - if(aCandidate.count() < 2L) + if(aCandidate.count() < 2) { aTempPolyPolygon.remove(nPoly); } @@ -1575,9 +1575,9 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::TakeObjectPolyPolygon(const Sdr return aRetval; ImpPathCreateUser* pU = static_cast<ImpPathCreateUser*>(rDrag.GetUser()); - basegfx::B2DPolygon aNewPolygon(aRetval.count() ? aRetval.getB2DPolygon(aRetval.count() - 1L) : basegfx::B2DPolygon()); + basegfx::B2DPolygon aNewPolygon(aRetval.count() ? aRetval.getB2DPolygon(aRetval.count() - 1) : basegfx::B2DPolygon()); - if(pU->IsFormFlag() && aNewPolygon.count() > 1L) + if(pU->IsFormFlag() && aNewPolygon.count() > 1) { // remove last segment and replace with current // do not forget to rescue the previous control point which will be lost when @@ -1598,7 +1598,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::TakeObjectPolyPolygon(const Sdr if(aRetval.count()) { - aRetval.setB2DPolygon(aRetval.count() - 1L, aNewPolygon); + aRetval.setB2DPolygon(aRetval.count() - 1, aNewPolygon); } else { @@ -1691,7 +1691,7 @@ SdrPathObj::~SdrPathObj() static bool lcl_ImpIsLine(const basegfx::B2DPolyPolygon& rPolyPolygon) { - return (1L == rPolyPolygon.count() && 2L == rPolyPolygon.getB2DPolygon(0L).count()); + return (1 == rPolyPolygon.count() && 2 == rPolyPolygon.getB2DPolygon(0).count()); } static Rectangle lcl_ImpGetBoundRect(const basegfx::B2DPolyPolygon& rPolyPolygon) @@ -1707,9 +1707,9 @@ void SdrPathObj::ImpForceLineAngle() { if(OBJ_LINE == meKind && lcl_ImpIsLine(GetPathPoly())) { - const basegfx::B2DPolygon aPoly(GetPathPoly().getB2DPolygon(0L)); - const basegfx::B2DPoint aB2DPoint0(aPoly.getB2DPoint(0L)); - const basegfx::B2DPoint aB2DPoint1(aPoly.getB2DPoint(1L)); + const basegfx::B2DPolygon aPoly(GetPathPoly().getB2DPolygon(0)); + const basegfx::B2DPoint aB2DPoint0(aPoly.getB2DPoint(0)); + const basegfx::B2DPoint aB2DPoint1(aPoly.getB2DPoint(1)); const Point aPoint0(FRound(aB2DPoint0.getX()), FRound(aB2DPoint0.getY())); const Point aPoint1(FRound(aB2DPoint1.getX()), FRound(aB2DPoint1.getY())); const Point aDelt(aPoint1 - aPoint0); @@ -1890,9 +1890,9 @@ OUString SdrPathObj::TakeObjNameSingul() const if(lcl_ImpIsLine(GetPathPoly())) { - const basegfx::B2DPolygon aPoly(GetPathPoly().getB2DPolygon(0L)); - const basegfx::B2DPoint aB2DPoint0(aPoly.getB2DPoint(0L)); - const basegfx::B2DPoint aB2DPoint1(aPoly.getB2DPoint(1L)); + const basegfx::B2DPolygon aPoly(GetPathPoly().getB2DPolygon(0)); + const basegfx::B2DPoint aB2DPoint0(aPoly.getB2DPoint(0)); + const basegfx::B2DPoint aB2DPoint1(aPoly.getB2DPoint(1)); if(aB2DPoint0 != aB2DPoint1) { @@ -2594,8 +2594,8 @@ sal_uInt32 SdrPathObj::NbcInsPoint(sal_uInt32 /*nHdlNum*/, const Point& rPos, bo double fSmallestCut; basegfx::tools::getSmallestDistancePointToPolyPolygon(GetPathPoly(), aTestPoint, nSmallestPolyIndex, nSmallestEdgeIndex, fSmallestCut); basegfx::B2DPolygon aCandidate(GetPathPoly().getB2DPolygon(nSmallestPolyIndex)); - const bool bBefore(!aCandidate.isClosed() && 0L == nSmallestEdgeIndex && 0.0 == fSmallestCut); - const bool bAfter(!aCandidate.isClosed() && aCandidate.count() == nSmallestEdgeIndex + 2L && 1.0 == fSmallestCut); + const bool bBefore(!aCandidate.isClosed() && 0 == nSmallestEdgeIndex && 0.0 == fSmallestCut); + const bool bAfter(!aCandidate.isClosed() && aCandidate.count() == nSmallestEdgeIndex + 2 && 1.0 == fSmallestCut); if(bBefore) { @@ -2611,7 +2611,7 @@ sal_uInt32 SdrPathObj::NbcInsPoint(sal_uInt32 /*nHdlNum*/, const Point& rPos, bo } } - nNewHdl = 0L; + nNewHdl = 0; } else if(bAfter) { @@ -2627,7 +2627,7 @@ sal_uInt32 SdrPathObj::NbcInsPoint(sal_uInt32 /*nHdlNum*/, const Point& rPos, bo } } - nNewHdl = aCandidate.count() - 1L; + nNewHdl = aCandidate.count() - 1; } else { @@ -2667,10 +2667,10 @@ sal_uInt32 SdrPathObj::NbcInsPoint(sal_uInt32 /*nHdlNum*/, const Point& rPos, bo } else { - aCandidate.insert(nSmallestEdgeIndex + 1L, aTestPoint); + aCandidate.insert(nSmallestEdgeIndex + 1, aTestPoint); } - nNewHdl = nSmallestEdgeIndex + 1L; + nNewHdl = nSmallestEdgeIndex + 1; } maPathPolygon.setB2DPolygon(nSmallestPolyIndex, aCandidate); @@ -2694,7 +2694,7 @@ SdrObject* SdrPathObj::RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index) if(PolyPolygonEditor::GetRelativePolyPoint(aLocalPolyPolygon, nHdlNum, nPoly, nPnt)) { - if(0L == nPoly) + if(0 == nPoly) { const basegfx::B2DPolygon aCandidate(aLocalPolyPolygon.getB2DPolygon(nPoly)); const sal_uInt32 nPointCount(aCandidate.count()); @@ -2714,10 +2714,10 @@ SdrObject* SdrPathObj::RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index) } else { - if(nPointCount >= 3L && nPnt != 0L && nPnt + 1L < nPointCount) + if(nPointCount >= 3 && nPnt != 0 && nPnt + 1 < nPointCount) { // split in two objects at point nPnt - basegfx::B2DPolygon aSplitPolyA(aCandidate, 0L, nPnt + 1L); + basegfx::B2DPolygon aSplitPolyA(aCandidate, 0L, nPnt + 1); SetPathPoly(basegfx::B2DPolyPolygon(aSplitPolyA)); pNewObj = Clone(); @@ -2875,7 +2875,7 @@ bool SdrPathObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DP if(OBJ_LINE == meKind) { // ignore shear and rotate, just use scale and translate - OSL_ENSURE(GetPathPoly().count() > 0L && GetPathPoly().getB2DPolygon(0L).count() > 1L, "OBJ_LINE with too few polygons (!)"); + OSL_ENSURE(GetPathPoly().count() > 0 && GetPathPoly().getB2DPolygon(0).count() > 1, "OBJ_LINE with too few polygons (!)"); // #i72287# use polygon without control points for range calculation. Do not change rPolyPolygon // itself, else this method will no longer return the full polygon information (curve will // be lost) diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 6824c46bad95..2b59fd0aa072 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1864,7 +1864,7 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( // get outliner set up. To avoid getting a somehow rotated MetaFile, // temporarily disable object rotation. sal_Int32 nAngle(aGeo.nRotationAngle); - aGeo.nRotationAngle = 0L; + aGeo.nRotationAngle = 0; ImpSetupDrawOutlinerForPaint( bContourFrame, rOutliner, aTextRect, aAnchorRect, aPaintRect, aFitXKorreg ); aGeo.nRotationAngle = nAngle; diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index e97b77cf50a0..f3915087ebbb 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -754,8 +754,8 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive( rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000)); // add one to rage sizes to get back to the old Rectangle and outliner measurements - const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1L)); - const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1L)); + const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1)); + const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1)); const OutlinerParaObject* pOutlinerParaObject = rSdrAutofitTextPrimitive.getSdrText()->GetOutlinerParaObject(); OSL_ENSURE(pOutlinerParaObject, "impDecomposeBlockTextPrimitive used with no OutlinerParaObject (!)"); const bool bVerticalWriting(pOutlinerParaObject->IsVertical()); @@ -921,8 +921,8 @@ void SdrTextObj::impDecomposeBlockTextPrimitive( } // add one to rage sizes to get back to the old Rectangle and outliner measurements - const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1L)); - const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1L)); + const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1)); + const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1)); const bool bVerticalWriting(rSdrBlockTextPrimitive.getOutlinerParaObject().IsVertical()); const bool bTopToBottom(rSdrBlockTextPrimitive.getOutlinerParaObject().IsTopToBottom()); const Size aAnchorTextSize(Size(nAnchorTextWidth, nAnchorTextHeight)); @@ -1303,7 +1303,7 @@ void impCreateAlternateTiming(const SfxItemSet& rSet, drawinglayer::animation::A const double fHalfInnerPath(fTimeForInnerPath * 0.5); const sal_uInt32 nDoubleRepeat(nRepeat / 2L); - if(nDoubleRepeat || 0L == nRepeat) + if(nDoubleRepeat || 0 == nRepeat) { // double forth and back loop drawinglayer::animation::AnimationEntryLoop aLoop(nDoubleRepeat ? nDoubleRepeat : ENDLESS_LOOP); @@ -1354,9 +1354,9 @@ void impCreateSlideTiming(const SfxItemSet& rSet, drawinglayer::animation::Anima rAnimList.append(aOutIn); // loop. In loop, move out and in again - if(nRepeat > 1L || 0L == nRepeat) + if(nRepeat > 1 || 0 == nRepeat) { - drawinglayer::animation::AnimationEntryLoop aLoop(nRepeat ? nRepeat - 1L : ENDLESS_LOOP); + drawinglayer::animation::AnimationEntryLoop aLoop(nRepeat ? nRepeat - 1 : ENDLESS_LOOP); drawinglayer::animation::AnimationEntryLinear aTime0(fTimeFullPath * 0.5, fFrequency, 0.5, fStartPosition); aLoop.append(aTime0); drawinglayer::animation::AnimationEntryLinear aTime1(fTimeFullPath * 0.5, fFrequency, fStartPosition, 0.5); @@ -1517,8 +1517,8 @@ void SdrTextObj::impDecomposeChainedTextPrimitive( rOutliner.SetMaxAutoPaperSize(Size(1000000,1000000)); // add one to rage sizes to get back to the old Rectangle and outliner measurements - const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1L)); - const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1L)); + const sal_uInt32 nAnchorTextWidth(FRound(aAnchorTextRange.getWidth() + 1)); + const sal_uInt32 nAnchorTextHeight(FRound(aAnchorTextRange.getHeight() + 1)); // Text const OutlinerParaObject* pOutlinerParaObject = rSdrChainedTextPrimitive.getSdrText()->GetOutlinerParaObject(); diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index 3e6e5f3df65e..69a143222e45 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -712,7 +712,7 @@ void SdrTextObj::impDecomposePathTextPrimitive( aShadowDecomposition); sal_uInt32 a; - for(a = 0L; a < nLoopCount; a++) + for(a = 0; a < nLoopCount; a++) { // filter text portions for this paragraph ::std::vector< const impPathTextPortion* > aParagraphTextPortions; @@ -740,7 +740,7 @@ void SdrTextObj::impDecomposePathTextPrimitive( // add shadow primitives to decomposition aRetvalA.resize(nShadowCount); - for(a = 0L; a < nShadowCount; a++) + for(a = 0; a < nShadowCount; a++) { aRetvalA[a] = drawinglayer::primitive2d::Primitive2DReference(aShadowDecomposition[a]); } @@ -763,7 +763,7 @@ void SdrTextObj::impDecomposePathTextPrimitive( // add normal primitives to decomposition aRetvalB.resize(nRegularCount); - for(a = 0L; a < nRegularCount; a++) + for(a = 0; a < nRegularCount; a++) { aRetvalB[a] = drawinglayer::primitive2d::Primitive2DReference(aRegularDecomposition[a]); } diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index fabe609f5cee..407d6ccd1e76 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -395,7 +395,7 @@ void SdrPageView::DrawLayer( SdrLayerID nID, OutputDevice* pGivenTarget, sdr::co void SdrPageView::SetDesignMode( bool _bDesignMode ) const { - for ( sal_uInt32 i = 0L; i < PageWindowCount(); ++i ) + for ( sal_uInt32 i = 0; i < PageWindowCount(); ++i ) { const SdrPageWindow& rPageViewWindow = *GetPageWindow(i); rPageViewWindow.SetDesignMode( _bDesignMode ); diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index 507af2343a5b..5fd7a16e35b0 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -555,7 +555,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, s count = nRepeatCount; } - for(a = 0L; a < count; a++) + for(a = 0; a < count; a++) { #endif // SVX_REPAINT_TIMER_TEST @@ -626,7 +626,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, s if(!bTimesInited) { - for(a = 0L; a < REMEMBERED_TIMES_COUNT; a++) + for(a = 0; a < REMEMBERED_TIMES_COUNT; a++) { fLastTimes[a] = fTimePerPaint; } @@ -635,17 +635,17 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, s } else { - for(a = 1L; a < REMEMBERED_TIMES_COUNT; a++) + for(a = 1; a < REMEMBERED_TIMES_COUNT; a++) { - fLastTimes[a - 1L] = fLastTimes[a]; + fLastTimes[a - 1] = fLastTimes[a]; } - fLastTimes[REMEMBERED_TIMES_COUNT - 1L] = fTimePerPaint; + fLastTimes[REMEMBERED_TIMES_COUNT - 1] = fTimePerPaint; } double fAddedTimes(0.0); - for(a = 0L; a < REMEMBERED_TIMES_COUNT; a++) + for(a = 0; a < REMEMBERED_TIMES_COUNT; a++) { fAddedTimes += fLastTimes[a]; } @@ -656,7 +656,7 @@ void SdrPaintView::CompleteRedraw(OutputDevice* pOut, const vcl::Region& rReg, s fprintf(stderr, "StartTime : %" SAL_PRIuUINT64 ", StopTime: %" SAL_PRIuUINT64 ", NeededTime: %" SAL_PRIuUINT64 ", TimePerPaint: %f\n", nStartTime, nStopTime, nNeededTime, fTimePerPaint); fprintf(stderr, "Remembered times: "); - for(a = 0L; a < REMEMBERED_TIMES_COUNT; a++) + for(a = 0; a < REMEMBERED_TIMES_COUNT; a++) { fprintf(stderr, "%d: %f ", a, fLastTimes[a]); } diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index b8b0356ad5cd..6a6bd3bcccc9 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -104,7 +104,7 @@ void SdrPolyEditView::CheckPolyPossibilitiesHelper( SdrMark* pM, bool& b1stSmoot if(PolyPolygonEditor::GetRelativePolyPoint(pPath->GetPathPoly(), nNum, nPolyNum, nPntNum)) { const basegfx::B2DPolygon aLocalPolygon(pPath->GetPathPoly().getB2DPolygon(nPolyNum)); - bool bCanSegment(bClosed || nPntNum < aLocalPolygon.count() - 1L); + bool bCanSegment(bClosed || nPntNum < aLocalPolygon.count() - 1); if(!bSetMarkedSegmentsKindPossible && bCanSegment) { diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx index 2129b24a1a3c..285df2634e28 100644 --- a/svx/source/svdraw/svdsnpv.cxx +++ b/svx/source/svdraw/svdsnpv.cxx @@ -345,7 +345,7 @@ SdrSnap SdrSnapView::SnapPos(Point& rPnt, const SdrPageView* pPV) const if (bOPntSnap && nMaxPointSnapCount>0) { sal_uInt32 nCount(pO->GetSnapPointCount()); - for (sal_uInt32 i(0L); i < nCount && nMaxPointSnapCount > 0L; i++) + for (sal_uInt32 i(0); i < nCount && nMaxPointSnapCount > 0; i++) { Point aP(pO->GetSnapPoint(i)); dx1=x-aP.X(); diff --git a/svx/source/svdraw/svdviter.cxx b/svx/source/svdraw/svdviter.cxx index ef00503274af..dfa658e53025 100644 --- a/svx/source/svdraw/svdviter.cxx +++ b/svx/source/svdraw/svdviter.cxx @@ -30,7 +30,7 @@ void SdrViewIter::ImpInitVars() { - mnListenerNum = 0L; + mnListenerNum = 0; mpAktView = nullptr; } diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 3a12bd5ba16e..623570e2216c 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -206,7 +206,7 @@ bool SdrExchangeView::Paste(SvStream& rInput, const OUString& rBaseURL, sal_uInt SdrOutliner& rOutliner = pObj->GetModel()->GetHitTestOutliner(); rOutliner.SetText(*pObj->GetOutlinerParaObject()); - if(1L == rOutliner.GetParagraphCount()) + if(1 == rOutliner.GetParagraphCount()) { SfxStyleSheet* pCandidate = rOutliner.GetStyleSheet(0L); diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx index a008b808dc76..34f99685ac83 100644 --- a/svx/source/table/accessibletableshape.cxx +++ b/svx/source/table/accessibletableshape.cxx @@ -870,7 +870,7 @@ sal_Int32 AccessibleTableShape::GetIndexOfSelectedChild( sal_Int32 nChildren = const_cast<AccessibleTableShape*>(this)->getAccessibleChildCount(); if( nSelectedChildIndex >= nChildren ) - return -1L; + return -1; sal_Int32 n = 0; while( n < nChildren ) @@ -885,7 +885,7 @@ sal_Int32 AccessibleTableShape::GetIndexOfSelectedChild( ++n; } - return n < nChildren ? n : -1L; + return n < nChildren ? n : -1; } void AccessibleTableShape::getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (IndexOutOfBoundsException ) { diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index 3e7316647d66..d736132f1ced 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -392,9 +392,9 @@ void SvxLineEndWindow::FillValueSet() OSL_ENSURE( !aBmp.IsEmpty(), "UI bitmap was not created" ); pVD->DrawBitmap( aPt0, aBmp ); - aLineEndSet->InsertItem((sal_uInt16)((i+1L)*2L+1L), + aLineEndSet->InsertItem((sal_uInt16)((i+1)*2L+1), Image(pVD->GetBitmap(aPt0, aBmpSize)), pEntry->GetName()); - aLineEndSet->InsertItem((sal_uInt16)((i+2L)*2L), + aLineEndSet->InsertItem((sal_uInt16)((i+2)*2L), Image(pVD->GetBitmap(aPt1, aBmpSize)), pEntry->GetName()); } nLines = std::min( (sal_uInt16)(nCount + 1), (sal_uInt16) MAX_LINES ); diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index b9663e078d4a..76ae1a58157f 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2470,7 +2470,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl { SdrModel* pModel = pPageObj->GetModel(); SdrPage* pNewPage = nullptr; - const sal_uInt16 nDestinationPageNum((sal_uInt16)((nPageNum << 1) - 1L)); + const sal_uInt16 nDestinationPageNum((sal_uInt16)((nPageNum << 1) - 1)); if(pModel) { diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx index c6eadbeeec14..117cdee1f5d0 100644 --- a/svx/source/xoutdev/_xoutbmp.cxx +++ b/svx/source/xoutdev/_xoutbmp.cxx @@ -437,7 +437,7 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold ) const Size aSize( rBmp.GetSizePixel() ); Bitmap aRetBmp; - if( ( aSize.Width() > 2L ) && ( aSize.Height() > 2L ) ) + if( ( aSize.Width() > 2 ) && ( aSize.Height() > 2 ) ) { Bitmap aWorkBmp( rBmp ); @@ -452,9 +452,9 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold ) if( pReadAcc && pWriteAcc ) { const long nWidth = aSize.Width(); - const long nWidth2 = nWidth - 2L; + const long nWidth2 = nWidth - 2; const long nHeight = aSize.Height(); - const long nHeight2 = nHeight - 2L; + const long nHeight2 = nHeight - 2; const long lThres2 = (long) cThreshold * cThreshold; const sal_uInt8 nWhitePalIdx(static_cast< sal_uInt8 >(pWriteAcc->GetBestPaletteIndex(Color(COL_WHITE)))); const sal_uInt8 nBlackPalIdx(static_cast< sal_uInt8 >(pWriteAcc->GetBestPaletteIndex(Color(COL_BLACK)))); @@ -464,14 +464,14 @@ Bitmap XOutBitmap::DetectEdges( const Bitmap& rBmp, const sal_uInt8 cThreshold ) // initialize border with white pixels pWriteAcc->SetLineColor( Color( COL_WHITE) ); - pWriteAcc->DrawLine( Point(), Point( nWidth - 1L, 0L ) ); - pWriteAcc->DrawLine( Point( nWidth - 1L, 0L ), Point( nWidth - 1L, nHeight - 1L ) ); - pWriteAcc->DrawLine( Point( nWidth - 1L, nHeight - 1L ), Point( 0L, nHeight - 1L ) ); - pWriteAcc->DrawLine( Point( 0, nHeight - 1L ), Point() ); + pWriteAcc->DrawLine( Point(), Point( nWidth - 1, 0L ) ); + pWriteAcc->DrawLine( Point( nWidth - 1, 0L ), Point( nWidth - 1, nHeight - 1 ) ); + pWriteAcc->DrawLine( Point( nWidth - 1, nHeight - 1 ), Point( 0L, nHeight - 1 ) ); + pWriteAcc->DrawLine( Point( 0, nHeight - 1 ), Point() ); - for( long nY = 0L, nY1 = 1L, nY2 = 2; nY < nHeight2; nY++, nY1++, nY2++ ) + for( long nY = 0, nY1 = 1, nY2 = 2; nY < nHeight2; nY++, nY1++, nY2++ ) { - for( long nX = 0L, nXDst = 1L, nXTmp; nX < nWidth2; nX++, nXDst++ ) + for( long nX = 0, nXDst = 1, nXTmp; nX < nWidth2; nX++, nXDst++ ) { nXTmp = nX; @@ -550,12 +550,12 @@ tools::Polygon XOutBitmap::GetCountour( const Bitmap& rBmp, const XOutFlags nFla const Size& rPrefSize = aWorkBmp.GetPrefSize(); const double fFactorX = (double) rPrefSize.Width() / nWidth; const double fFactorY = (double) rPrefSize.Height() / nHeight; - const long nStartX1 = aWorkRect.Left() + 1L; + const long nStartX1 = aWorkRect.Left() + 1; const long nEndX1 = aWorkRect.Right(); - const long nStartX2 = nEndX1 - 1L; - const long nStartY1 = aWorkRect.Top() + 1L; + const long nStartX2 = nEndX1 - 1; + const long nStartY1 = aWorkRect.Top() + 1; const long nEndY1 = aWorkRect.Bottom(); - const long nStartY2 = nEndY1 - 1L; + const long nStartY2 = nEndY1 - 1; std::unique_ptr<Point[]> pPoints1; std::unique_ptr<Point[]> pPoints2; long nX, nY; diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 73eb20dc5ba1..bfaf7b38e561 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -1364,7 +1364,7 @@ XLineStartItem* XLineStartItem::checkForUniqueItem( SdrModel* pModel ) const return new XLineStartItem( "", maPolyPolygon ); } - if( maPolyPolygon.count() > 1L ) + if( maPolyPolygon.count() > 1 ) { // check if the polygon is closed if(!maPolyPolygon.isClosed()) @@ -1647,7 +1647,7 @@ XLineEndItem* XLineEndItem::checkForUniqueItem( SdrModel* pModel ) const return new XLineEndItem( "", maPolyPolygon ); } - if( maPolyPolygon.count() > 1L ) + if( maPolyPolygon.count() > 1 ) { // check if the polygon is closed if(!maPolyPolygon.isClosed()) diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index 0307e31b8431..513f29bd9d12 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -640,7 +640,7 @@ bool XFillBmpSizeXItem::GetPresentation bool XFillBmpSizeXItem::HasMetrics() const { - return GetValue() > 0L; + return GetValue() > 0; } // class XFillBmpTileSizeYItem @@ -682,7 +682,7 @@ bool XFillBmpSizeYItem::GetPresentation bool XFillBmpSizeYItem::HasMetrics() const { - return GetValue() > 0L; + return GetValue() > 0; } // class XFillBmpTileLogItem diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx index 8af8713ed2f4..48d948382607 100644 --- a/sw/qa/extras/ww8export/ww8export.cxx +++ b/sw/qa/extras/ww8export/ww8export.cxx @@ -48,7 +48,7 @@ #include <bordertest.hxx> -#define convertTwipToMm100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L)) +#define convertTwipToMm100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36)/72L) : (((TWIP)*127L-36)/72L)) class Test : public SwModelTestBase { diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx index 0df510cbd79c..8b699b948de0 100644 --- a/sw/source/core/access/accdoc.cxx +++ b/sw/source/core/access/accdoc.cxx @@ -191,10 +191,10 @@ sal_Int32 SAL_CALL SwAccessibleDocumentBase::getAccessibleIndexInParent() } catch(const css::lang::IndexOutOfBoundsException &) { - return -1L; + return -1; } } - return -1L; + return -1; } OUString SAL_CALL SwAccessibleDocumentBase::getAccessibleDescription() diff --git a/sw/source/core/access/accframe.cxx b/sw/source/core/access/accframe.cxx index 8f8a09953995..1b6fd51d1e60 100644 --- a/sw/source/core/access/accframe.cxx +++ b/sw/source/core/access/accframe.cxx @@ -461,7 +461,7 @@ sal_Int32 SwAccessibleFrame::GetChildIndex( SwAccessibleMap& rAccMap, sal_Int32 nPos = 0; return GetChildIndex( rAccMap, maVisArea, *mpFrame, rChild, nPos, IsInPagePreview() ) ? nPos - : -1L; + : -1; } sw::access::SwAccessibleChild SwAccessibleFrame::GetChildAtPixel( diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 91a0428fe09a..b86782984e10 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -2489,7 +2489,7 @@ sal_Int32 SwAccessibleParagraph::getIndexAtPoint( const awt::Point& rPoint ) return bSuccess ? GetPortionData().GetAccessiblePosition( aPos.nContent.GetIndex() ) - : -1L; + : -1; } OUString SwAccessibleParagraph::getSelectedText() diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx index 6d8bf2ecede5..082662a15081 100644 --- a/sw/source/core/access/acctable.cxx +++ b/sw/source/core/access/acctable.cxx @@ -731,7 +731,7 @@ sal_Int32 SwAccessibleTable::GetIndexOfSelectedChild( // iterate over all children to n-th isAccessibleChildSelected() sal_Int32 nChildren = const_cast<SwAccessibleTable*>(this)->getAccessibleChildCount(); // #i77106# if( nSelectedChildIndex >= nChildren ) - return -1L; + return -1; sal_Int32 n = 0; while( n < nChildren ) @@ -746,7 +746,7 @@ sal_Int32 SwAccessibleTable::GetIndexOfSelectedChild( ++n; } - return n < nChildren ? n : -1L; + return n < nChildren ? n : -1; } void SwAccessibleTable::GetStates( diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 840fc938219a..d13ac79a82cc 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -119,7 +119,7 @@ namespace { OUString aArrowName( SVX_RES(nResId) ); long nCount = pLineEndList->Count(); long nIndex; - for( nIndex = 0L; nIndex < nCount; nIndex++ ) + for( nIndex = 0; nIndex < nCount; nIndex++ ) { const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nIndex); if( pEntry->GetName() == aArrowName ) diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index c3ba3a6bd6ee..32da7963cafd 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -984,7 +984,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, ( _eVertRelOrient == text::RelOrientation::CHAR || _eVertRelOrient == text::RelOrientation::TEXT_LINE ) ) { - SwTwips nTop = 0L; + SwTwips nTop = 0; if ( _eVertRelOrient == text::RelOrientation::CHAR ) { SwRect aChRect; @@ -1030,7 +1030,7 @@ void SwFEShell::CalcBoundRect( SwRect& _orRect, (_nAnchorId == FLY_AT_CHAR) && _eHoriRelOrient == text::RelOrientation::CHAR ) { - SwTwips nLeft = 0L; + SwTwips nLeft = 0; SwRect aChRect; if ( _pToCharContentPos ) { diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index f6db821cb563..c4d132890e66 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -453,12 +453,12 @@ public: method replaced 'old' method <bool IsMoveable() const>. Determines, if frame is moveable in given environment. if no environment - is given (parameter _pLayoutFrame == 0L), the movability in the actual - environment (<this->GetUpper()) is checked. + is given (parameter _pLayoutFrame == 0), the movability in the actual + environment (<GetUpper()) is checked. @param _pLayoutFrame input parameter - given environment (layout frame), in which the movability - will be checked. If not set ( == 0L ), actual environment is taken. + will be checked. If not set ( == 0 ), actual environment is taken. @return boolean, indicating, if frame is moveable in given environment */ diff --git a/sw/source/core/layout/anchoredobject.cxx b/sw/source/core/layout/anchoredobject.cxx index 20c4a3cb6947..34e251c220ec 100644 --- a/sw/source/core/layout/anchoredobject.cxx +++ b/sw/source/core/layout/anchoredobject.cxx @@ -315,7 +315,7 @@ void SwAnchoredObject::CheckCharRect( const SwFormatAnchor& _rAnch, void SwAnchoredObject::CheckTopOfLine( const SwFormatAnchor& _rAnch, const SwTextFrame& _rAnchorCharFrame ) { - SwTwips nTopOfLine = 0L; + SwTwips nTopOfLine = 0; if ( _rAnchorCharFrame.GetTopOfLine( nTopOfLine, *_rAnch.GetContentAnchor() ) ) { if ( nTopOfLine != mnLastTopOfLine ) diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index baa4e0577190..4464254006fb 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -754,7 +754,7 @@ void SwPageFrame::MakeAll(vcl::RenderContext* pRenderContext) nWidth = nDefWidth; nWidth += + 2 * aBorder.Width(); - nWidth = std::max( nWidth, 2L * aBorder.Width() + 4L*MM50 ); + nWidth = std::max( nWidth, 2L * aBorder.Width() + 4*MM50 ); Frame().Width( nWidth ); SwLayoutFrame *pBody = FindBodyCont(); @@ -1189,7 +1189,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) // because of its object positioning. if ( !static_cast<SwTextFrame*>(this)->IsFollow() ) { - sal_uInt32 nToPageNum = 0L; + sal_uInt32 nToPageNum = 0; const bool bMoveFwdByObjPos = SwLayouter::FrameMovedFwdByObjPos( *(GetAttrSet()->GetDoc()), *(static_cast<SwTextFrame*>(this)), diff --git a/sw/source/core/layout/findfrm.cxx b/sw/source/core/layout/findfrm.cxx index 9caa4894e1f9..d424b676792a 100644 --- a/sw/source/core/layout/findfrm.cxx +++ b/sw/source/core/layout/findfrm.cxx @@ -629,7 +629,6 @@ const SwAttrSet* SwFrame::GetAttrSet() const return &static_cast<const SwLayoutFrame*>(this)->GetFormat()->GetAttrSet(); } -//UUUU drawinglayer::attribute::SdrAllFillAttributesHelperPtr SwFrame::getSdrAllFillAttributesHelper() const { if(IsContentFrame()) @@ -1276,7 +1275,7 @@ static bool lcl_IsInColSct( const SwFrame *pUp ) OD 08.08.2003 #110978# method replaced 'old' method <sal_Bool IsMoveable() const>. Determines, if frame is moveable in given environment. if no environment - is given (parameter _pLayoutFrame == 0L), the movability in the actual + is given (parameter _pLayoutFrame == 0), the movability in the actual environment (<this->GetUpper()) is checked. */ bool SwFrame::IsMoveable( const SwLayoutFrame* _pLayoutFrame ) const diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 523e1a1e7133..066055a1f264 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -1787,7 +1787,7 @@ SwTwips SwFlyFrame::Grow_( SwTwips nDist, bool bTst ) if( nSize > 0 && nDist > ( LONG_MAX - nSize ) ) nDist = LONG_MAX - nSize; - if ( nDist <= 0L ) + if ( nDist <= 0 ) return 0L; if ( Lower()->IsColumnFrame() ) @@ -1871,7 +1871,7 @@ SwTwips SwFlyFrame::Shrink_( SwTwips nDist, bool bTst ) nVal = std::min( nDist, nHeight - nFormatHeight ); } - if ( nVal <= 0L ) + if ( nVal <= 0 ) return 0L; if ( Lower()->IsColumnFrame() ) diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx index a59c83495b1e..4fe14deaec59 100644 --- a/sw/source/core/layout/objectformatter.cxx +++ b/sw/source/core/layout/objectformatter.cxx @@ -103,7 +103,7 @@ class SwPageNumAndTypeOfAnchors inline sal_uInt32 GetPageNum( sal_uInt32 _nIndex ) const { - sal_uInt32 nRetPgNum = 0L; + sal_uInt32 nRetPgNum = 0; if ( _nIndex < Count()) { diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx index 16d3ed4fc764..fcfdaf603aa9 100644 --- a/sw/source/core/layout/objectformattertxtfrm.cxx +++ b/sw/source/core/layout/objectformattertxtfrm.cxx @@ -511,7 +511,7 @@ SwAnchoredObject* SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor( SwAnchoredObject* pRetAnchoredObj = nullptr; - sal_uInt32 i = 0L; + sal_uInt32 i = 0; for ( ; i < CountOfCollected(); ++i ) { SwAnchoredObject* pAnchoredObj = GetCollectedObj(i); diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index bafe1a96d7d1..9debe9f81bbb 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -184,7 +184,7 @@ SwPageFrame::SwPageFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwPageDesc *pPg Frame().Height( 0 ); long nWidth = pSh->VisArea().Width(); if ( !nWidth ) - nWidth = 5000L; //aendert sich sowieso + nWidth = 5000; //aendert sich sowieso Frame().Width ( nWidth ); } else diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 7fbb23ff8e77..fc78538d9e41 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -1874,7 +1874,7 @@ SwTwips SwSectionFrame::Grow_( SwTwips nDist, bool bTst ) if( nFrameHeight > 0 && nDist > (LONG_MAX - nFrameHeight) ) nDist = LONG_MAX - nFrameHeight; - if ( nDist <= 0L ) + if ( nDist <= 0 ) return 0L; bool bInCalcContent = GetUpper() && IsInFly() && FindFlyFrame()->IsLocked(); diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index f73145b1e324..1dccd55739f1 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -505,7 +505,7 @@ void SwToContentAnchoredObjectPosition::CalcPosition() // #i28701# - correction: use <pAnchorFrameForVertPos> // instead of <pOrientFrame> and do not adjust relative position // to get correct vertical position. - nVertOffsetToFrameAnchorPos = 0L; + nVertOffsetToFrameAnchorPos = 0; // #i11860# - use new method <GetTopForObjPos> // to get top of frame for object positioning. const SwTwips nTopOfOrient = diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 923ed6205876..0de30b2ad760 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -340,9 +340,9 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) aTmp1 = GetOut()->LogicToPixel( aTmp1 ); Rectangle aTmp2( GetOut()->PixelToLogic( aTmp1 ) ); if ( aTmp2.Left() > aRect.Left() ) - aTmp1.Left() = std::max( 0L, aTmp1.Left() - 1L ); + aTmp1.Left() = std::max( 0L, aTmp1.Left() - 1 ); if ( aTmp2.Top() > aRect.Top() ) - aTmp1.Top() = std::max( 0L, aTmp1.Top() - 1L ); + aTmp1.Top() = std::max( 0L, aTmp1.Top() - 1 ); aTmp1.Right() += 1; aTmp1.Bottom() += 1; aTmp1 = GetOut()->PixelToLogic( aTmp1 ); @@ -1015,7 +1015,7 @@ void SwViewShell::SizeChgNotify() { Size aDocSize = GetDocSize(); std::stringstream ss; - ss << aDocSize.Width() + 2L * DOCUMENTBORDER << ", " << aDocSize.Height() + 2L * DOCUMENTBORDER; + ss << aDocSize.Width() + 2 * DOCUMENTBORDER << ", " << aDocSize.Height() + 2 * DOCUMENTBORDER; OString sSize = ss.str().c_str(); GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_SIZE_CHANGED, sSize.getStr()); } diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 699ad22fde26..90c6c2a0d257 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2271,7 +2271,7 @@ void RtfAttributeOutput::CharEscapement(const SvxEscapementItem& rEsc) * 100% Escapement */ - m_aStyles.append((sal_Int32)((long(nEsc) * nH) + 500L) / 1000L); + m_aStyles.append((sal_Int32)((long(nEsc) * nH) + 500) / 1000L); // 500L to round !! } diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index cad9ce17ea9d..78d22797fd0e 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -298,7 +298,7 @@ void SvXMLExportItemMapper::exportXML( SvXMLExport& rExport, exportXML( rExport, rExport.GetAttrList(), rSet, rUnitConverter, rExport.GetNamespaceMap(), nFlags, &aIndexArray ); - if( rExport.GetAttrList().getLength() > 0L || + if( rExport.GetAttrList().getLength() > 0 || (nFlags & SvXmlExportFlags::EMPTY) || !aIndexArray.empty() ) { diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index 058c9517e559..0f15ab2bfc69 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -892,7 +892,7 @@ bool SvXMLImportItemMapper::PutXMLValue( case MID_FRMSIZE_REL_COL_WIDTH: { sal_Int32 nPos = rValue.indexOf( '*' ); - if( -1L != nPos ) + if( -1 != nPos ) { sal_Int32 nValue = rValue.toInt32(); if( nValue < MINLAY ) diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index 41eee95e590b..f764ae78a143 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -139,7 +139,7 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) : { const SwTableBox *pBox = rBoxes[nBox]; - if( nBox < nBoxes-1U || nWidth==0UL ) + if( nBox < nBoxes-1U || nWidth==0 ) { nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox ); SwXMLTableColumn_Impl *pCol = @@ -150,7 +150,7 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) : if( nBox==nBoxes-1U ) { - OSL_ENSURE( nLine==0U && nWidth==0UL, + OSL_ENSURE( nLine==0U && nWidth==0, "parent width will be lost" ); nWidth = nCPos; } @@ -284,7 +284,7 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat, if( bInsert ) { - rFrameFormat.SetName( rNamePrefix + "." + OUString::number(nLine+1UL) ); + rFrameFormat.SetName( rNamePrefix + "." + OUString::number(nLine+1) ); if ( i != aFormatList.end() ) ++i; aFormatList.insert( i, &rFrameFormat ); } @@ -730,7 +730,7 @@ void SwXMLExport::ExportTableAutoStyles( const SwTableNode& rTableNd ) const SwFormatFrameSize& rFrameSize = pTableFormat->GetFrameSize(); sal_uInt32 nAbsWidth = rFrameSize.GetSize().Width(); - sal_uInt32 nBaseWidth = 0UL; + sal_uInt32 nBaseWidth = 0; sal_Int8 nPrcWidth = rFrameSize.GetWidthPercent(); bool bFixAbsWidth = nPrcWidth != 0 || /*text::*/HoriOrientation::NONE == eTabHoriOri diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 05d0d15f4e35..c01211744cfb 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -187,7 +187,7 @@ class SwXMLTableCell_Impl public: - SwXMLTableCell_Impl( sal_uInt32 nRSpan=1UL, sal_uInt32 nCSpan=1UL ) : + SwXMLTableCell_Impl( sal_uInt32 nRSpan=1, sal_uInt32 nCSpan=1 ) : dValue( 0.0 ), pStartNode( nullptr ), nRowSpan( nRSpan ), @@ -478,18 +478,18 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl( break; case XML_TOK_TABLE_NUM_COLS_SPANNED: nColSpan = (sal_uInt32)rValue.toInt32(); - if( nColSpan < 1UL ) - nColSpan = 1UL; + if( nColSpan < 1 ) + nColSpan = 1; break; case XML_TOK_TABLE_NUM_ROWS_SPANNED: nRowSpan = (sal_uInt32)rValue.toInt32(); - if( nRowSpan < 1UL ) - nRowSpan = 1UL; + if( nRowSpan < 1 ) + nRowSpan = 1; break; case XML_TOK_TABLE_NUM_COLS_REPEATED: nColRepeat = (sal_uInt32)rValue.toInt32(); - if( nColRepeat < 1UL ) - nColRepeat = 1UL; + if( nColRepeat < 1 ) + nColRepeat = 1; break; case XML_TOK_TABLE_FORMULA: { @@ -752,7 +752,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl( SvXMLImportContext( rImport, nPrfx, rLName ), xMyTable( pTable ) { - sal_uInt32 nColRep = 1UL; + sal_uInt32 nColRep = 1; OUString aStyleName, aDfltCellStyleName; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -926,8 +926,8 @@ SwXMLTableRowContext_Impl::SwXMLTableRowContext_Impl( SwXMLImport& rImport, else if( IsXMLToken( aLocalName, XML_NUMBER_ROWS_REPEATED ) ) { nRowRepeat = (sal_uInt32)rValue.toInt32(); - if( nRowRepeat < 1UL ) - nRowRepeat = 1UL; + if( nRowRepeat < 1 ) + nRowRepeat = 1; } else if( IsXMLToken( aLocalName, XML_DEFAULT_CELL_STYLE_NAME ) ) { @@ -951,7 +951,7 @@ void SwXMLTableRowContext_Impl::EndElement() { GetTable()->FinishRow(); - if( nRowRepeat > 1UL ) + if( nRowRepeat > 1 ) GetTable()->InsertRepRows( nRowRepeat ); } } @@ -1533,7 +1533,7 @@ sal_Int32 SwXMLTableContext::GetColumnWidth( sal_uInt32 nCol, if( nLast > m_aColumnWidths.size() ) nLast = m_aColumnWidths.size(); - sal_Int32 nWidth2 = 0L; + sal_Int32 nWidth2 = 0; for( sal_uInt32 i=nCol; i < nLast; ++i ) nWidth2 += m_aColumnWidths[i].width; @@ -1566,12 +1566,12 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName, if( m_nCurCol >= USHRT_MAX || m_nCurRow > USHRT_MAX ) return; - OSL_ENSURE( nRowSpan >=1UL, "SwXMLTableContext::InsertCell: row span is 0" ); - if( 0UL == nRowSpan ) - nRowSpan = 1UL; - OSL_ENSURE( nColSpan >=1UL, "SwXMLTableContext::InsertCell: col span is 0" ); - if( 0UL == nColSpan ) - nColSpan = 1UL; + OSL_ENSURE( nRowSpan >=1, "SwXMLTableContext::InsertCell: row span is 0" ); + if( 0 == nRowSpan ) + nRowSpan = 1; + OSL_ENSURE( nColSpan >=1, "SwXMLTableContext::InsertCell: col span is 0" ); + if( 0 == nColSpan ) + nColSpan = 1; // Until it is possible to add columns here, fix the column span. sal_uInt32 nColsReq = m_nCurCol + nColSpan; @@ -1583,12 +1583,12 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName, // Check whether there are cells from a previous line already that reach // into the current row. - if( m_nCurRow > 0UL && nColSpan > 1UL ) + if( m_nCurRow > 0 && nColSpan > 1 ) { SwXMLTableRow_Impl *pCurRow = (*m_pRows)[m_nCurRow].get(); sal_uInt32 nLastCol = GetColumnCount() < nColsReq ? GetColumnCount() : nColsReq; - for( sal_uInt32 i=m_nCurCol+1UL; i<nLastCol; ++i ) + for( sal_uInt32 i=m_nCurCol+1; i<nLastCol; ++i ) { if( pCurRow->GetCell(i)->IsUsed() ) { @@ -1641,9 +1641,9 @@ void SwXMLTableContext::InsertCell( const OUString& rStyleName, } // Fill the cells - for( sal_uInt32 i=nColSpan; i>0UL; --i ) + for( sal_uInt32 i=nColSpan; i>0; --i ) { - for( sal_uInt32 j=nRowSpan; j>0UL; --j ) + for( sal_uInt32 j=nRowSpan; j>0; --j ) { const bool bCovered = i != nColSpan || j != nRowSpan; GetCell( nRowsReq-j, nColsReq-i ) @@ -1670,7 +1670,7 @@ void SwXMLTableContext::InsertRow( const OUString& rStyleName, return; // Make sure there is at least one column. - if( 0==m_nCurRow && 0UL == GetColumnCount() ) + if( 0==m_nCurRow && 0 == GetColumnCount() ) InsertColumn( USHRT_MAX, true ); if (m_nCurRow < m_pRows->size()) @@ -1689,7 +1689,7 @@ void SwXMLTableContext::InsertRow( const OUString& rStyleName, } // We start at the first column ... - m_nCurCol=0UL; + m_nCurCol=0; // ... but this cell may be occupied already. while( m_nCurCol<GetColumnCount() && GetCell(m_nCurRow,m_nCurCol)->IsUsed() ) @@ -1747,17 +1747,17 @@ const SwStartNode *SwXMLTableContext::GetPrevStartNode( sal_uInt32 nRow, if( GetColumnCount() == nCol ) { // The last cell is the right one here. - pPrevCell = GetCell( m_pRows->size() - 1U, GetColumnCount() - 1UL ); + pPrevCell = GetCell( m_pRows->size() - 1U, GetColumnCount() - 1 ); } - else if( nCol > 0UL ) + else if( nCol > 0 ) { // The previous cell in this row. - pPrevCell = GetCell( nRow, nCol-1UL ); + pPrevCell = GetCell( nRow, nCol-1 ); } - else if( nRow > 0UL ) + else if( nRow > 0 ) { // The last cell from the previous row. - pPrevCell = GetCell( nRow-1UL, GetColumnCount()-1UL ); + pPrevCell = GetCell( nRow-1, GetColumnCount()-1 ); } const SwStartNode *pSttNd = nullptr; @@ -1784,12 +1784,12 @@ void SwXMLTableContext::FixRowSpan( sal_uInt32 nRow, sal_uInt32 nCol, for( sal_uInt32 i = nCol; i < nLastCol; i++ ) { sal_uInt32 j = nRow; - sal_uInt32 nRowSpan = 1UL; + sal_uInt32 nRowSpan = 1; SwXMLTableCell_Impl *pCell = GetCell( j, i ); - while( pCell && pCell->GetRowSpan() > 1UL ) + while( pCell && pCell->GetRowSpan() > 1 ) { pCell->SetRowSpan( nRowSpan++ ); - pCell = j > 0UL ? GetCell( --j, i ) : nullptr; + pCell = j > 0 ? GetCell( --j, i ) : nullptr; } } } @@ -1927,19 +1927,19 @@ SwTableBox *SwXMLTableContext::MakeTableBox( SwTableLine *pUpper, SwXMLTableRow_Impl *pRow = (*m_pRows)[i].get(); for( sal_uInt32 j=nLeftCol; j<nRightCol; j++ ) { - bSplit = ( 1UL == pRow->GetCell(j)->GetRowSpan() ); + bSplit = ( 1 == pRow->GetCell(j)->GetRowSpan() ); if( !bSplit ) break; } - if( bSplit && (nStartRow>nTopRow || i+1UL<nBottomRow) ) + if( bSplit && (nStartRow>nTopRow || i+1<nBottomRow) ) { SwTableLine *pLine = - MakeTableLine( pBox, nStartRow, nLeftCol, i+1UL, + MakeTableLine( pBox, nStartRow, nLeftCol, i+1, nRightCol ); rLines.push_back( pLine ); - nStartRow = i+1UL; + nStartRow = i+1; bSplitted = true; } } @@ -1951,7 +1951,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox( SwTableLine *pUpper, nStartRow = nTopRow; while( nStartRow < nBottomRow ) { - sal_uInt32 nMaxRowSpan = 0UL; + sal_uInt32 nMaxRowSpan = 0; SwXMLTableRow_Impl *pStartRow = (*m_pRows)[nStartRow].get(); const SwXMLTableCell_Impl *pCell; for( i=nLeftCol; i<nRightCol; i++ ) @@ -1966,12 +1966,12 @@ SwTableBox *SwXMLTableContext::MakeTableBox( SwTableLine *pUpper, i = nLeftCol; while( i < nRightCol ) { - if( pPrevRow->GetCell(i)->GetRowSpan() > 1UL ) + if( pPrevRow->GetCell(i)->GetRowSpan() > 1 ) { const SwXMLTableCell_Impl *pCell2 = GetCell( nStartRow, i ); const sal_uInt32 nColSpan2 = pCell2->GetColSpan(); - FixRowSpan( nStartRow-1UL, i, nColSpan2 ); + FixRowSpan( nStartRow-1, i, nColSpan2 ); ReplaceWithEmptyCell( nStartRow, i, true ); i += nColSpan2; } @@ -2187,7 +2187,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper, const SfxItemSet *pAutoItemSet = nullptr; const OUString& rStyleName = (*m_pRows)[nTopRow]->GetStyleName(); - if( 1UL == (nBottomRow - nTopRow) && + if( 1 == (nBottomRow - nTopRow) && !rStyleName.isEmpty() && GetSwImport().FindAutomaticStyle( XML_STYLE_FAMILY_TABLE_ROW, rStyleName, &pAutoItemSet ) ) @@ -2227,21 +2227,21 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper, // Could the table fragment be splitted horizontally behind // the current line? bool bHoriSplit = (*m_pRows)[nRow]->IsSplitable() && - nRow+1UL < nBottomRow && - 1UL == pCell->GetRowSpan(); + nRow+1 < nBottomRow && + 1 == pCell->GetRowSpan(); (*m_pRows)[nRow]->SetSplitable( bHoriSplit ); // Could the table fragment be splitted vertically behind the // current column (uptp the current line? - bSplit &= ( 1UL == pCell->GetColSpan() ); + bSplit &= ( 1 == pCell->GetColSpan() ); if( bSplit ) { bHoriSplitPossible |= bHoriSplit; // Could the current table fragment be splitted // horizontally behind the next column, too? - bHoriSplit &= (nCol+1UL < nRightCol && - 1UL == GetCell(nRow,nCol+1UL)->GetRowSpan()); + bHoriSplit &= (nCol+1 < nRightCol && + 1 == GetCell(nRow,nCol+1)->GetRowSpan()); bHoriSplitMayContinue |= bHoriSplit; } } @@ -2260,11 +2260,11 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper, // Could the table fragment be splitted vertically behind the // current column (uptp the current line? - bSplit = 1UL == pCell->GetColSpan(); + bSplit = 1 == pCell->GetColSpan(); } #if OSL_DEBUG_LEVEL > 0 - if( nCol == nRightCol-1UL ) + if( nCol == nRightCol-1 ) { OSL_ENSURE( bSplit, "Split-Flag falsch" ); if ( m_bHasSubTables ) @@ -2287,7 +2287,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper, SwXMLTableCell_Impl *pCell = GetCell( nTopRow, nStartCol ); // #i95726# - some fault tolerance if( ( !m_bHasSubTables || ( pCell->GetRowSpan() == (nBottomRow-nTopRow) ) ) && - pCell->GetColSpan() == (nCol+1UL-nStartCol) && + pCell->GetColSpan() == (nCol+1-nStartCol) && ( pCell->GetStartNode() || pCell->GetSubTable() ) ) { // insert new empty cell for covered cells: @@ -2304,7 +2304,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper, // The remaining box neither contains lines nor rows (i.e. // is a content box - nSplitCol = nCol + 1UL; + nSplitCol = nCol + 1; pBox = MakeTableBox( pLine, pCell, nTopRow, nStartCol, @@ -2323,7 +2323,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper, // the next column, too. That for, we check the next // column but remember the current one as a good place to // split. - nSplitCol = nCol + 1UL; + nSplitCol = nCol + 1; } else if ( m_bHasSubTables ) { @@ -2341,7 +2341,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper, OSL_ENSURE( bHoriSplitPossible || nSplitCol == nRightCol, "bHoriSplitPossible-Flag sollte gesetzt sein" ); - nSplitCol = nCol + 1UL; + nSplitCol = nCol + 1; } pBox = MakeTableBox( pLine, nTopRow, nStartCol, @@ -2379,10 +2379,10 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox ) { if( ( pCell=pPrevRow->GetCell(i), pCell->GetRowSpan() > 1UL ) ) { - FixRowSpan( m_nCurRow-1UL, i, 1UL ); + FixRowSpan( m_nCurRow-1, i, 1UL ); } } - for (sal_uLong i = m_pRows->size() - 1UL; i >= m_nCurRow; --i) + for (sal_uLong i = m_pRows->size() - 1; i >= m_nCurRow; --i) m_pRows->pop_back(); } @@ -2393,24 +2393,24 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox ) // TODO: Do we have to keep both values, the relative and the absolute // width? - sal_Int32 nAbsWidth = 0L; - sal_Int32 nMinAbsColWidth = 0L; - sal_Int32 nRelWidth = 0L; - sal_Int32 nMinRelColWidth = 0L; - sal_uInt32 nRelCols = 0UL; + sal_Int32 nAbsWidth = 0; + sal_Int32 nMinAbsColWidth = 0; + sal_Int32 nRelWidth = 0; + sal_Int32 nMinRelColWidth = 0; + sal_uInt32 nRelCols = 0; for( colIter = m_aColumnWidths.begin(); colIter < m_aColumnWidths.end(); ++colIter) { if( colIter->isRelative ) { nRelWidth += colIter->width; - if( 0L == nMinRelColWidth || colIter->width < nMinRelColWidth ) + if( 0 == nMinRelColWidth || colIter->width < nMinRelColWidth ) nMinRelColWidth = colIter->width; nRelCols++; } else { nAbsWidth += colIter->width; - if( 0L == nMinAbsColWidth || colIter->width < nMinAbsColWidth ) + if( 0 == nMinAbsColWidth || colIter->width < nMinAbsColWidth ) nMinAbsColWidth = colIter->width; } } @@ -2420,17 +2420,17 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox ) { // If there a columns that have an absolute width, we have to // calculate a relative one for them. - if( nAbsCols > 0UL ) + if( nAbsCols > 0 ) { // All column that have absolute widths get relative widths; // these widths relate to each over like the original absolute // widths. The smallest column gets a width that hat the same // value as the smallest column that has an relative width // already. - if( 0L == nMinRelColWidth ) + if( 0 == nMinRelColWidth ) nMinRelColWidth = nMinAbsColWidth; - for( colIter = m_aColumnWidths.begin(); nAbsCols > 0UL && colIter < m_aColumnWidths.end(); ++colIter) + for( colIter = m_aColumnWidths.begin(); nAbsCols > 0 && colIter < m_aColumnWidths.end(); ++colIter) { if( !colIter->isRelative ) { @@ -2456,7 +2456,7 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox ) if( nRelWidth != m_nWidth && nRelWidth && nCols ) { double n = (double)m_nWidth / (double)nRelWidth; - nRelWidth = 0L; + nRelWidth = 0; for( colIter = m_aColumnWidths.begin(); colIter < m_aColumnWidths.end() - 1; ++colIter) { sal_Int32 nW = (sal_Int32)( colIter->width * n); @@ -2470,7 +2470,7 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox ) { // If there are columns that have relative widths, we have to // calculate a absolute widths for them. - if( nRelCols > 0UL ) + if( nRelCols > 0 ) { // The absolute space that is available for all columns with a // relative width. @@ -2511,12 +2511,12 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox ) // Otherwise, if there is enough space for every column, every // column gets this space. - for( colIter = m_aColumnWidths.begin(); nRelCols > 0UL && colIter < m_aColumnWidths.end(); ++colIter ) + for( colIter = m_aColumnWidths.begin(); nRelCols > 0 && colIter < m_aColumnWidths.end(); ++colIter ) { if( colIter->isRelative ) { sal_Int32 nAbsCol; - if( 1UL == nRelCols ) + if( 1 == nRelCols ) { // The last column that has a relative width gets // all absolute space that is left. @@ -2556,7 +2556,7 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox ) // column widths, every column get some extra width. sal_Int32 nExtraAbs = m_nWidth - nAbsWidth; sal_Int32 nAbsLastCol = m_aColumnWidths.back().width + nExtraAbs; - for( colIter = m_aColumnWidths.begin(); colIter < m_aColumnWidths.end()-1UL; ++colIter ) + for( colIter = m_aColumnWidths.begin(); colIter < m_aColumnWidths.end()-1; ++colIter ) { sal_Int32 nAbsCol = colIter->width; sal_Int32 nExtraAbsCol = (nAbsCol * nExtraAbs) / @@ -2574,7 +2574,7 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox ) // Every column gets the minimum width plus some extra width. sal_Int32 nExtraAbs = m_nWidth - (nCols * MINLAY); sal_Int32 nAbsLastCol = MINLAY + nExtraAbs; - for( colIter = m_aColumnWidths.begin(); colIter < m_aColumnWidths.end()-1UL; ++colIter ) + for( colIter = m_aColumnWidths.begin(); colIter < m_aColumnWidths.end()-1; ++colIter ) { sal_Int32 nAbsCol = colIter->width; sal_Int32 nExtraAbsCol = (nAbsCol * nExtraAbs) / @@ -2592,18 +2592,18 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox ) pBox ? pBox->GetTabLines() : m_pTableNode->GetTable().GetTabLines(); - sal_uInt32 nStartRow = 0UL; + sal_uInt32 nStartRow = 0; sal_uInt32 nRows = m_pRows->size(); - for(sal_uInt32 i=0UL; i<nRows; ++i ) + for(sal_uInt32 i=0; i<nRows; ++i ) { // Could we split the table behind the current line? bool bSplit = true; if ( m_bHasSubTables ) { SwXMLTableRow_Impl *pRow = (*m_pRows)[i].get(); - for( sal_uInt32 j=0UL; j<nCols; j++ ) + for( sal_uInt32 j=0; j<nCols; j++ ) { - bSplit = ( 1UL == pRow->GetCell(j)->GetRowSpan() ); + bSplit = ( 1 == pRow->GetCell(j)->GetRowSpan() ); if( !bSplit ) break; } @@ -2612,10 +2612,10 @@ void SwXMLTableContext::MakeTable_( SwTableBox *pBox ) if( bSplit ) { SwTableLine *pLine = - MakeTableLine( pBox, nStartRow, 0UL, i+1UL, nCols ); - if( pBox || nStartRow>0UL ) + MakeTableLine( pBox, nStartRow, 0UL, i+1, nCols ); + if( pBox || nStartRow>0 ) rLines.push_back( pLine ); - nStartRow = i+1UL; + nStartRow = i+1; } } } diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx index 2e7546b146ef..f9f074106df8 100644 --- a/sw/source/uibase/dochdl/swdtflvr.cxx +++ b/sw/source/uibase/dochdl/swdtflvr.cxx @@ -641,7 +641,7 @@ bool SwTransferable::WriteObject( tools::SvRef<SotStorageStream>& xStream, const SvxFontHeightItem& rDefaultFontHeight = static_cast<const SvxFontHeightItem&>(rItemPool.GetDefaultItem(EE_CHAR_FONTHEIGHT)); // SW should have no MasterPages - OSL_ENSURE(0L == pModel->GetMasterPageCount(), "SW with MasterPages (!)"); + OSL_ENSURE(0 == pModel->GetMasterPageCount(), "SW with MasterPages (!)"); for(sal_uInt16 a(0); a < pModel->GetPageCount(); a++) { diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx index 891c245d35f9..086e20013118 100644 --- a/sw/source/uibase/misc/redlndlg.cxx +++ b/sw/source/uibase/misc/redlndlg.cxx @@ -695,7 +695,7 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd) SvTreeListEntry *const pEntry = m_RedlineParents[i]->pTLBParent; if (pEntry) { - long nIdx = aLBoxArr.size() - 1L; + long nIdx = aLBoxArr.size() - 1; sal_uLong nAbsPos = pModel->GetAbsPos(pEntry); while (nIdx >= 0 && pModel->GetAbsPos(aLBoxArr[ static_cast< sal_uInt16 >(nIdx) ]) > nAbsPos) @@ -705,7 +705,7 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd) } // clear TLB from behind - long nIdx = (long)aLBoxArr.size() - 1L; + long nIdx = (long)aLBoxArr.size() - 1; while (nIdx >= 0) m_pTable->RemoveEntry(aLBoxArr[ static_cast< sal_uInt16 >(nIdx--) ]); diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 82569db0269c..a81e28873836 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -513,7 +513,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) { bDone = true; - if(1L == pSdrView->GetMarkedObjectCount()) + if(1 == pSdrView->GetMarkedObjectCount()) { // #i68101# SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0); @@ -543,7 +543,7 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) { bDone = true; - if(1L == pSdrView->GetMarkedObjectCount()) + if(1 == pSdrView->GetMarkedObjectCount()) { SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(0); OSL_ENSURE(pSelected, "DrawViewShell::FuTemp03: nMarkCount, but no object (!)"); diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 7ef82e34934d..2345b474dfde 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3149,8 +3149,8 @@ Size SwXTextDocument::getDocumentSize() SwViewShell* pViewShell = pDocShell->GetWrtShell(); Size aDocSize = pViewShell->GetDocSize(); - return Size(aDocSize.Width() + 2L * DOCUMENTBORDER, - aDocSize.Height() + 2L * DOCUMENTBORDER); + return Size(aDocSize.Width() + 2 * DOCUMENTBORDER, + aDocSize.Height() + 2 * DOCUMENTBORDER); } void SwXTextDocument::setPart(int nPart) diff --git a/sw/source/uibase/wrtsh/delete.cxx b/sw/source/uibase/wrtsh/delete.cxx index e4833ae2d4dc..a300ad2ba059 100644 --- a/sw/source/uibase/wrtsh/delete.cxx +++ b/sw/source/uibase/wrtsh/delete.cxx @@ -270,7 +270,7 @@ long SwWrtShell::DelRight() } else EnterStdMode(); - nRet = 1L; + nRet = 1; break; } else diff --git a/tools/source/generic/b3dtrans.cxx b/tools/source/generic/b3dtrans.cxx index d12330145fdf..0db5581a9bed 100644 --- a/tools/source/generic/b3dtrans.cxx +++ b/tools/source/generic/b3dtrans.cxx @@ -270,13 +270,13 @@ void B3dTransformationSet::CalcViewport() // fill parameters for ViewportTransformation // Translation - maTranslate.setX((double)maSetBound.Left() + ((maSetBound.GetWidth() - 1L) / 2.0)); - maTranslate.setY((double)maSetBound.Top() + ((maSetBound.GetHeight() - 1L) / 2.0)); + maTranslate.setX((double)maSetBound.Left() + ((maSetBound.GetWidth() - 1) / 2.0)); + maTranslate.setY((double)maSetBound.Top() + ((maSetBound.GetHeight() - 1) / 2.0)); maTranslate.setZ(ZBUFFER_DEPTH_RANGE / 2.0); // Scaling - maScale.setX((maSetBound.GetWidth() - 1L) / 2.0); - maScale.setY((maSetBound.GetHeight() - 1L) / -2.0); + maScale.setX((maSetBound.GetWidth() - 1) / 2.0); + maScale.setY((maSetBound.GetHeight() - 1) / -2.0); maScale.setZ(ZBUFFER_DEPTH_RANGE / 2.0); } diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index 69e698b6d07a..1a5d0ce2dbe6 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -291,7 +291,7 @@ void ImplPolygon::ImplCreateFlagArray() inline double ImplGetParameter( const Point& rCenter, const Point& rPt, double fWR, double fHR ) { const long nDX = rPt.X() - rCenter.X(); - double fAngle = atan2( -rPt.Y() + rCenter.Y(), ( ( nDX == 0L ) ? 0.000000001 : nDX ) ); + double fAngle = atan2( -rPt.Y() + rCenter.Y(), ( ( nDX == 0 ) ? 0.000000001 : nDX ) ); return atan2(fWR*sin(fAngle), fHR*cos(fAngle)); } @@ -1422,7 +1422,7 @@ bool Polygon::IsInside( const Point& rPoint ) const DBG_ASSERT( !mpImplPolygon->mpFlagAry, "IsInside could fail with beziers!" ); const Rectangle aBound( GetBoundRect() ); - const Line aLine( rPoint, Point( aBound.Right() + 100L, rPoint.Y() ) ); + const Line aLine( rPoint, Point( aBound.Right() + 100, rPoint.Y() ) ); sal_uInt16 nCount = mpImplPolygon->mnPoints; sal_uInt16 nPCounter = 0; @@ -1849,14 +1849,14 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon) if(bCurve) { // #127979# Reduce source point count hard to the limit of the tools Polygon - if(nB2DLocalCount > ((0x0000ffff / 3L) - 1L)) + if(nB2DLocalCount > ((0x0000ffff / 3L) - 1)) { OSL_FAIL("Polygon::Polygon: Too many points in given B2DPolygon, need to reduce hard to maximum of tools Polygon (!)"); - nB2DLocalCount = ((0x0000ffff / 3L) - 1L); + nB2DLocalCount = ((0x0000ffff / 3L) - 1); } // calculate target point count - const sal_uInt32 nLoopCount(bClosed ? nB2DLocalCount : (nB2DLocalCount ? nB2DLocalCount - 1L : 0L )); + const sal_uInt32 nLoopCount(bClosed ? nB2DLocalCount : (nB2DLocalCount ? nB2DLocalCount - 1 : 0L )); if(nLoopCount) { @@ -1925,7 +1925,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon) else { // add last point as closing point - const basegfx::B2DPoint aClosingPoint(rPolygon.getB2DPoint(nB2DLocalCount - 1L)); + const basegfx::B2DPoint aClosingPoint(rPolygon.getB2DPoint(nB2DLocalCount - 1)); const Point aEnd(FRound(aClosingPoint.getX()), FRound(aClosingPoint.getY())); mpImplPolygon->mpPointAry[nArrayInsert] = aEnd; mpImplPolygon->mpFlagAry[nArrayInsert] = (sal_uInt8)POLY_NORMAL; @@ -1943,10 +1943,10 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon) else { // #127979# Reduce source point count hard to the limit of the tools Polygon - if(nB2DLocalCount > (0x0000ffff - 1L)) + if(nB2DLocalCount > (0x0000ffff - 1)) { OSL_FAIL("Polygon::Polygon: Too many points in given B2DPolygon, need to reduce hard to maximum of tools Polygon (!)"); - nB2DLocalCount = (0x0000ffff - 1L); + nB2DLocalCount = (0x0000ffff - 1); } if(nB2DLocalCount) diff --git a/tools/source/stream/stream.cxx b/tools/source/stream/stream.cxx index d778180c4594..a467467d299d 100644 --- a/tools/source/stream/stream.cxx +++ b/tools/source/stream/stream.cxx @@ -1630,9 +1630,9 @@ SvMemoryStream::SvMemoryStream( void* pBuffer, std::size_t bufSize, nEndOfData = bufSize; bOwnsData = false; pBuf = static_cast<sal_uInt8 *>(pBuffer); - nResize = 0L; + nResize = 0; nSize = bufSize; - nPos = 0L; + nPos = 0; SetBufferSize( 0 ); } @@ -1640,7 +1640,7 @@ SvMemoryStream::SvMemoryStream( std::size_t nInitSize, std::size_t nResizeOffset { m_isWritable = true; bOwnsData = true; - nEndOfData = 0L; + nEndOfData = 0; nResize = nResizeOffset; nPos = 0; pBuf = nullptr; @@ -1843,9 +1843,9 @@ bool SvMemoryStream::ReAllocateMemory( long nDiff ) { memcpy( pNewBuf, pBuf, (size_t)nNewSize ); if( nPos > nNewSize ) - nPos = 0L; + nPos = 0; if( nEndOfData >= nNewSize ) - nEndOfData = nNewSize-1L; + nEndOfData = nNewSize-1; } else { @@ -1888,7 +1888,7 @@ void* SvMemoryStream::SwitchBuffer() void* pRetVal = pBuf; pBuf = nullptr; - nEndOfData = 0L; + nEndOfData = 0; nResize = 64; nPos = 0; diff --git a/tools/source/stream/strmwnt.cxx b/tools/source/stream/strmwnt.cxx index 204602fff220..096f075b9cbb 100644 --- a/tools/source/stream/strmwnt.cxx +++ b/tools/source/stream/strmwnt.cxx @@ -175,7 +175,7 @@ sal_uInt64 SvFileStream::SeekPos(sal_uInt64 const nPos) if( nNewPos == 0xFFFFFFFF ) { SetError(::GetSvError( GetLastError() ) ); - nNewPos = 0L; + nNewPos = 0; } } else @@ -278,7 +278,7 @@ void SvFileStream::Open( const OUString& rFilename, StreamMode nMode ) DWORD nOpenAction; DWORD nShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE; - DWORD nAccessMode = 0L; + DWORD nAccessMode = 0; UINT nOldErrorMode = SetErrorMode( SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX ); if( nMode & StreamMode::SHARE_DENYREAD) diff --git a/tools/source/stream/vcompat.cxx b/tools/source/stream/vcompat.cxx index 490fc6f6c746..7e03ef43a0c8 100644 --- a/tools/source/stream/vcompat.cxx +++ b/tools/source/stream/vcompat.cxx @@ -32,8 +32,8 @@ VersionCompat::VersionCompat( SvStream& rStm, StreamMode nStreamMode, sal_uInt16 if( StreamMode::WRITE == mnStmMode ) { mpRWStm->WriteUInt16( mnVersion ); - mnTotalSize = ( mnCompatPos = mpRWStm->Tell() ) + 4UL; - mpRWStm->SeekRel( 4L ); + mnTotalSize = ( mnCompatPos = mpRWStm->Tell() ) + 4; + mpRWStm->SeekRel( 4 ); } else { diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx index bbe74057603a..05e731480c07 100644 --- a/unotools/source/misc/datetime.cxx +++ b/unotools/source/misc/datetime.cxx @@ -36,7 +36,7 @@ namespace bool bNeg = false; rValue = 0; - sal_Int32 nPos = 0L; + sal_Int32 nPos = 0; sal_Int32 nLen = rString.getLength(); // skip white space diff --git a/vcl/inc/impoctree.hxx b/vcl/inc/impoctree.hxx index fc63ade3c993..fc63122d3e0f 100644 --- a/vcl/inc/impoctree.hxx +++ b/vcl/inc/impoctree.hxx @@ -101,9 +101,9 @@ inline void ImpErrorQuad::ImplAddColorError7( const ImpErrorQuad& rErrQuad ) inline BitmapColor ImpErrorQuad::ImplGetColor() { - return BitmapColor( (sal_uInt8) ( ( nRed < 0L ? 0L : nRed > 8160L ? 8160L : nRed ) >> 5 ), - (sal_uInt8) ( ( nGreen < 0L ? 0L : nGreen > 8160L ? 8160L : nGreen ) >> 5 ), - (sal_uInt8) ( ( nBlue < 0L ? 0L : nBlue > 8160L ? 8160L : nBlue ) >> 5 ) ); + return BitmapColor( (sal_uInt8) ( ( nRed < 0 ? 0L : nRed > 8160 ? 8160L : nRed ) >> 5 ), + (sal_uInt8) ( ( nGreen < 0 ? 0L : nGreen > 8160 ? 8160L : nGreen ) >> 5 ), + (sal_uInt8) ( ( nBlue < 0 ? 0L : nBlue > 8160 ? 8160L : nBlue ) >> 5 ) ); } class ImpNodeCache diff --git a/vcl/inc/octree.hxx b/vcl/inc/octree.hxx index 44a4c5e0a77f..c7cf23eac0fe 100644 --- a/vcl/inc/octree.hxx +++ b/vcl/inc/octree.hxx @@ -85,7 +85,7 @@ inline sal_uInt16 Octree::GetBestPaletteIndex( const BitmapColor& rColor ) { pColor = &(BitmapColor&) rColor; nPalIndex = 65535; - nLevel = 0L; + nLevel = 0; GetPalIndex( pTree ); return nPalIndex; } diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx index 47fa5d372d56..1edf37189cb9 100644 --- a/vcl/opengl/gdiimpl.cxx +++ b/vcl/opengl/gdiimpl.cxx @@ -890,7 +890,7 @@ void OpenGLSalGraphicsImpl::DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPt if( basegfx::tools::isConvex( aPolygon ) ) { - if( nPoints > 2L ) + if( nPoints > 2 ) DrawConvexPolygon( nPoints, pPtAry ); } else diff --git a/vcl/source/bitmap/bitmapscalesuper.cxx b/vcl/source/bitmap/bitmapscalesuper.cxx index 8008a56a8f29..dc7dcd56cbc2 100644 --- a/vcl/source/bitmap/bitmapscalesuper.cxx +++ b/vcl/source/bitmap/bitmapscalesuper.cxx @@ -30,11 +30,11 @@ namespace { void generateMap(long nW, long nDstW, bool bHMirr, long* pMapIX, long* pMapFX) { - const double fRevScaleX = (nDstW > 1L) ? (double) (nW - 1) / (nDstW - 1) : 0.0; + const double fRevScaleX = (nDstW > 1) ? (double) (nW - 1) / (nDstW - 1) : 0.0; - long nTemp = nW - 2L; - long nTempX = nW - 1L; - for (long nX = 0L; nX < nDstW; nX++) + long nTemp = nW - 2; + long nTempX = nW - 1; + for (long nX = 0; nX < nDstW; nX++) { double fTemp = nX * fRevScaleX; if (bHMirr) @@ -102,7 +102,7 @@ public: void scalePallete8bit(ScaleContext &rCtx, long nStartY, long nEndY) { - const long nStartX = 0, nEndX = rCtx.mnDestW - 1L; + const long nStartX = 0, nEndX = rCtx.mnDestW - 1; for( long nY = nStartY; nY <= nEndY; nY++ ) { @@ -111,7 +111,7 @@ void scalePallete8bit(ScaleContext &rCtx, long nStartY, long nEndY) Scanline pLine0 = rCtx.mpSrc->GetScanline( nTempY ); Scanline pLine1 = rCtx.mpSrc->GetScanline( ++nTempY ); - for(long nX = nStartX, nXDst = 0L; nX <= nEndX; nX++ ) + for(long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ ) { long nTempX = rCtx.mpMapIX[ nX ]; long nTempFX = rCtx.mpMapFX[ nX ]; @@ -139,14 +139,14 @@ void scalePallete8bit(ScaleContext &rCtx, long nStartY, long nEndY) void scalePalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY) { - const long nStartX = 0, nEndX = rCtx.mnDestW - 1L; + const long nStartX = 0, nEndX = rCtx.mnDestW - 1; for( long nY = nStartY; nY <= nEndY; nY++ ) { long nTempY = rCtx.mpMapIY[ nY ]; long nTempFY = rCtx.mpMapFY[ nY ]; - for( long nX = nStartX, nXDst = 0L; nX <= nEndX; nX++ ) + for( long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ ) { long nTempX = rCtx.mpMapIX[ nX ]; long nTempFX = rCtx.mpMapFX[ nX ]; @@ -173,7 +173,7 @@ void scalePalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY) void scale24bitBGR(ScaleContext &rCtx, long nStartY, long nEndY) { - const long nStartX = 0, nEndX = rCtx.mnDestW - 1L; + const long nStartX = 0, nEndX = rCtx.mnDestW - 1; for( long nY = nStartY; nY <= nEndY; nY++ ) { @@ -182,20 +182,20 @@ void scale24bitBGR(ScaleContext &rCtx, long nStartY, long nEndY) Scanline pLine0 = rCtx.mpSrc->GetScanline( nTempY ); Scanline pLine1 = rCtx.mpSrc->GetScanline( ++nTempY ); - for( long nX = nStartX, nXDst = 0L; nX <= nEndX; nX++ ) + for( long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ ) { - long nOff = 3L * rCtx.mpMapIX[ nX ]; + long nOff = 3 * rCtx.mpMapIX[ nX ]; long nTempFX = rCtx.mpMapFX[ nX ]; Scanline pTmp0 = pLine0 + nOff ; - Scanline pTmp1 = pTmp0 + 3L; + Scanline pTmp1 = pTmp0 + 3; sal_uInt8 cB0 = MAP( *pTmp0, *pTmp1, nTempFX ); pTmp0++; pTmp1++; sal_uInt8 cG0 = MAP( *pTmp0, *pTmp1, nTempFX ); pTmp0++; pTmp1++; sal_uInt8 cR0 = MAP( *pTmp0, *pTmp1, nTempFX ); - pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3L; + pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3; sal_uInt8 cB1 = MAP( *pTmp0, *pTmp1, nTempFX ); pTmp0++; pTmp1++; sal_uInt8 cG1 = MAP( *pTmp0, *pTmp1, nTempFX ); @@ -212,7 +212,7 @@ void scale24bitBGR(ScaleContext &rCtx, long nStartY, long nEndY) void scale24bitRGB(ScaleContext &rCtx, long nStartY, long nEndY) { - const long nStartX = 0, nEndX = rCtx.mnDestW - 1L; + const long nStartX = 0, nEndX = rCtx.mnDestW - 1; for( long nY = nStartY; nY <= nEndY; nY++ ) { @@ -221,20 +221,20 @@ void scale24bitRGB(ScaleContext &rCtx, long nStartY, long nEndY) Scanline pLine0 = rCtx.mpSrc->GetScanline( nTempY ); Scanline pLine1 = rCtx.mpSrc->GetScanline( ++nTempY ); - for( long nX = nStartX, nXDst = 0L; nX <= nEndX; nX++ ) + for( long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ ) { - long nOff = 3L * rCtx.mpMapIX[ nX ]; + long nOff = 3 * rCtx.mpMapIX[ nX ]; long nTempFX = rCtx.mpMapFX[ nX ]; Scanline pTmp0 = pLine0 + nOff; - Scanline pTmp1 = pTmp0 + 3L; + Scanline pTmp1 = pTmp0 + 3; sal_uInt8 cR0 = MAP( *pTmp0, *pTmp1, nTempFX ); pTmp0++; pTmp1++; sal_uInt8 cG0 = MAP( *pTmp0, *pTmp1, nTempFX ); pTmp0++; pTmp1++; sal_uInt8 cB0 = MAP( *pTmp0, *pTmp1, nTempFX ); - pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3L; + pTmp1 = ( pTmp0 = pLine1 + nOff ) + 3; sal_uInt8 cR1 = MAP( *pTmp0, *pTmp1, nTempFX ); pTmp0++; pTmp1++; sal_uInt8 cG1 = MAP( *pTmp0, *pTmp1, nTempFX ); @@ -251,14 +251,14 @@ void scale24bitRGB(ScaleContext &rCtx, long nStartY, long nEndY) void scaleNonPalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY) { - const long nStartX = 0, nEndX = rCtx.mnDestW - 1L; + const long nStartX = 0, nEndX = rCtx.mnDestW - 1; for( long nY = nStartY; nY <= nEndY; nY++ ) { long nTempY = rCtx.mpMapIY[ nY ]; long nTempFY = rCtx.mpMapFY[ nY ]; - for( long nX = nStartX, nXDst = 0L; nX <= nEndX; nX++ ) + for( long nX = nStartX, nXDst = 0; nX <= nEndX; nX++ ) { long nTempX = rCtx.mpMapIX[ nX ]; long nTempFX = rCtx.mpMapFX[ nX ]; @@ -285,7 +285,7 @@ void scaleNonPalleteGeneral(ScaleContext &rCtx, long nStartY, long nEndY) void scalePallete8bit2(ScaleContext &rCtx, long nStartY, long nEndY) { - const long nStartX = 0, nEndX = rCtx.mnDestW - 1L; + const long nStartX = 0, nEndX = rCtx.mnDestW - 1; const long nMax = 1 << 7; for( long nY = nStartY; nY <= nEndY; nY++ ) @@ -305,7 +305,7 @@ void scalePallete8bit2(ScaleContext &rCtx, long nStartY, long nEndY) nLineRange = ( rCtx.mpMapIY[ nBottom ] == rCtx.mpMapIY[ nTop ] ) ? 1 :( rCtx.mpMapIY[ nBottom ] - rCtx.mpMapIY[ nTop ] ); } - for( long nX = nStartX , nXDst = 0L; nX <= nEndX; nX++ ) + for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ ) { long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX; long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ; @@ -410,7 +410,7 @@ void scalePallete8bit2(ScaleContext &rCtx, long nStartY, long nEndY) void scalePalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY) { - const long nStartX = 0, nEndX = rCtx.mnDestW - 1L; + const long nStartX = 0, nEndX = rCtx.mnDestW - 1; const long nMax = 1 << 7; for( long nY = nStartY; nY <= nEndY; nY++ ) @@ -430,7 +430,7 @@ void scalePalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY) nLineRange = ( rCtx.mpMapIY[ nBottom ] == rCtx.mpMapIY[ nTop ] ) ? 1 :( rCtx.mpMapIY[ nBottom ] - rCtx.mpMapIY[ nTop ] ); } - for( long nX = nStartX , nXDst = 0L; nX <= nEndX; nX++ ) + for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ ) { long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX; long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ; @@ -537,7 +537,7 @@ void scalePalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY) void scale24bitBGR2(ScaleContext &rCtx, long nStartY, long nEndY) { - const long nStartX = 0, nEndX = rCtx.mnDestW - 1L; + const long nStartX = 0, nEndX = rCtx.mnDestW - 1; const long nMax = 1 << 7; for( long nY = nStartY; nY <= nEndY; nY++ ) @@ -558,7 +558,7 @@ void scale24bitBGR2(ScaleContext &rCtx, long nStartY, long nEndY) nLineRange = ( rCtx.mpMapIY[ nBottom ] == rCtx.mpMapIY[ nTop ] ) ? 1 :( rCtx.mpMapIY[ nBottom ] - rCtx.mpMapIY[ nTop ] ); } - for( long nX = nStartX , nXDst = 0L; nX <= nEndX; nX++ ) + for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ ) { long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX; long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ; @@ -584,7 +584,7 @@ void scale24bitBGR2(ScaleContext &rCtx, long nStartY, long nEndY) for(long i = 0; i<= nLineRange; i++) { Scanline pTmpY = rCtx.mpSrc->GetScanline( nLineStart + i ); - Scanline pTmpX = pTmpY + 3L * nRowStart; + Scanline pTmpX = pTmpY + 3 * nRowStart; long nSumRowR = 0; long nSumRowG = 0; long nSumRowB = 0; @@ -660,7 +660,7 @@ void scale24bitBGR2(ScaleContext &rCtx, long nStartY, long nEndY) void scale24bitRGB2(ScaleContext &rCtx, long nStartY, long nEndY) { - const long nStartX = 0, nEndX = rCtx.mnDestW - 1L; + const long nStartX = 0, nEndX = rCtx.mnDestW - 1; const long nMax = 1 << 7; for( long nY = nStartY; nY <= nEndY; nY++ ) @@ -680,7 +680,7 @@ void scale24bitRGB2(ScaleContext &rCtx, long nStartY, long nEndY) nLineRange = ( rCtx.mpMapIY[ nBottom ] == rCtx.mpMapIY[ nTop ] ) ? 1 :( rCtx.mpMapIY[ nBottom ] - rCtx.mpMapIY[ nTop ] ); } - for( long nX = nStartX , nXDst = 0L; nX <= nEndX; nX++ ) + for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ ) { long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX; long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ; @@ -705,7 +705,7 @@ void scale24bitRGB2(ScaleContext &rCtx, long nStartY, long nEndY) for(long i = 0; i<= nLineRange; i++) { Scanline pTmpY = rCtx.mpSrc->GetScanline( nLineStart + i ); - Scanline pTmpX = pTmpY + 3L * nRowStart; + Scanline pTmpX = pTmpY + 3 * nRowStart; long nSumRowR = 0; long nSumRowG = 0; long nSumRowB = 0; @@ -781,7 +781,7 @@ void scale24bitRGB2(ScaleContext &rCtx, long nStartY, long nEndY) void scaleNonPalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY) { - const long nStartX = 0, nEndX = rCtx.mnDestW - 1L; + const long nStartX = 0, nEndX = rCtx.mnDestW - 1; const long nMax = 1 << 7; for( long nY = nStartY; nY <= nEndY; nY++ ) @@ -801,7 +801,7 @@ void scaleNonPalleteGeneral2(ScaleContext &rCtx, long nStartY, long nEndY) nLineRange = ( rCtx.mpMapIY[ nBottom ] == rCtx.mpMapIY[ nTop ] ) ? 1 :( rCtx.mpMapIY[ nBottom ] - rCtx.mpMapIY[ nTop ] ); } - for( long nX = nStartX , nXDst = 0L; nX <= nEndX; nX++ ) + for( long nX = nStartX , nXDst = 0; nX <= nEndX; nX++ ) { long nLeft = rCtx.mbHMirr ? ( nX + 1 ) : nX; long nRight = rCtx.mbHMirr ? nX : ( nX + 1 ) ; @@ -932,7 +932,7 @@ bool BitmapScaleSuper::filter(Bitmap& rBitmap) const double fScaleThresh = 0.6; - if (nDstW <= 1L || nDstH <= 1L) + if (nDstW <= 1 || nDstH <= 1) return false; Bitmap::ScopedReadAccess pReadAccess(rBitmap); @@ -941,7 +941,7 @@ bool BitmapScaleSuper::filter(Bitmap& rBitmap) Bitmap::ScopedWriteAccess pWriteAccess(aOutBmp); const long nStartY = 0; - const long nEndY = nDstH - 1L; + const long nEndY = nDstH - 1; if (pReadAccess && pWriteAccess) { diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index 899677d87d61..bba05bcfd86b 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -64,7 +64,7 @@ OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt if ( !aInteger.IsZero() ) { aFraction += aTmp; - aTmp = 1000000000L; + aTmp = 1000000000; } if ( rNumber.IsNeg() ) aFraction *= -1; diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 2334e9d6e934..01fb8a393e64 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -557,7 +557,7 @@ bool SpinField::Notify(NotifyEvent& rNEvt) const CommandWheelData* pData = rNEvt.GetCommandEvent()->GetWheelData(); if (pData->GetMode() == CommandWheelMode::SCROLL) { - if (pData->GetDelta() < 0L) + if (pData->GetDelta() < 0) Down(); else Up(); diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx index 66c83e9cfc92..21622c33e10c 100644 --- a/vcl/source/filter/graphicfilter2.cxx +++ b/vcl/source/filter/graphicfilter2.cxx @@ -1041,7 +1041,7 @@ bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, bool bExtendedInfo ) } else { - rStm.SeekRel( -4L ); + rStm.SeekRel( -4 ); n32 = 0; rStm.ReadUInt32( n32 ); diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 0cf4b5062f54..857523f15402 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -255,7 +255,7 @@ bool GIFReader::ReadGlobalHeader() void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount ) { - sal_uLong nLen = 3UL * nCount; + sal_uLong nLen = 3 * nCount; const sal_uInt64 nMaxPossible = rIStm.remainingSize(); if (nLen > nMaxPossible) nLen = nMaxPossible; @@ -266,7 +266,7 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount ) { sal_uInt8* pTmp = pBuf.get(); - for (sal_uLong i = 0UL; i < nCount; ++i) + for (sal_uLong i = 0; i < nCount; ++i) { BitmapColor& rColor = (*pPal)[i]; @@ -276,11 +276,11 @@ void GIFReader::ReadPaletteEntries( BitmapPalette* pPal, sal_uLong nCount ) } // if possible accommodate some standard colours - if( nCount < 256UL ) + if( nCount < 256 ) { (*pPal)[ 255UL ] = Color( COL_WHITE ); - if( nCount < 255UL ) + if( nCount < 255 ) (*pPal)[ 254UL ] = Color( COL_BLACK ); } } @@ -469,18 +469,18 @@ bool GIFReader::ReadLocalHeader() sal_uLong GIFReader::ReadNextBlock() { - sal_uLong nRet = 0UL; + sal_uLong nRet = 0; sal_uLong nRead; sal_uInt8 cBlockSize; rIStm.ReadUChar( cBlockSize ); if ( rIStm.IsEof() ) - nRet = 4UL; + nRet = 4; else if ( NO_PENDING( rIStm ) ) { if ( cBlockSize == 0 ) - nRet = 2UL; + nRet = 2; else { rIStm.ReadBytes( aSrcBuf.data(), cBlockSize ); @@ -488,7 +488,7 @@ sal_uLong GIFReader::ReadNextBlock() if( NO_PENDING( rIStm ) ) { if( bOverreadBlock ) - nRet = 3UL; + nRet = 3; else { bool bEOI; @@ -510,7 +510,7 @@ sal_uLong GIFReader::ReadNextBlock() void GIFReader::FillImages( sal_uInt8* pBytes, sal_uLong nCount ) { - for( sal_uLong i = 0UL; i < nCount; i++ ) + for( sal_uLong i = 0; i < nCount; i++ ) { if( nImageX >= nImageWidth ) { @@ -777,7 +777,7 @@ bool GIFReader::ProcessGIF() { bRead = true; - if ( nRet == 1UL ) + if ( nRet == 1 ) { bImGraphicReady = true; eActAction = NEXT_BLOCK_READING; @@ -785,14 +785,14 @@ bool GIFReader::ProcessGIF() } else { - if( nRet == 2UL ) + if( nRet == 2 ) { pDecomp.reset(); CreateNewBitmaps(); eActAction = MARKER_READING; ClearImageExtensions(); } - else if( nRet == 3UL ) + else if( nRet == 3 ) { eActAction = NEXT_BLOCK_READING; bOverreadBlock = true; diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx index 6ffa172c3018..604308f05a65 100644 --- a/vcl/source/filter/jpeg/JpegWriter.cxx +++ b/vcl/source/filter/jpeg/JpegWriter.cxx @@ -147,7 +147,7 @@ void* JPEGWriter::GetScanline( long nY ) if( mpReadAccess->HasPalette() ) { - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nX = 0; nX < nWidth; nX++ ) { aColor = mpReadAccess->GetPaletteColor( mpReadAccess->GetPixelIndex( nY, nX ) ); *pTmp++ = aColor.GetRed(); @@ -160,7 +160,7 @@ void* JPEGWriter::GetScanline( long nY ) } else { - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nX = 0; nX < nWidth; nX++ ) { aColor = mpReadAccess->GetPixel( nY, nX ); *pTmp++ = aColor.GetRed(); @@ -208,7 +208,7 @@ bool JPEGWriter::Write( const Graphic& rGraphic ) for ( long nY = 0; bIsGrey && ( nY < mpReadAccess->Height() ); nY++ ) { BitmapColor aColor; - for( long nX = 0L; bIsGrey && ( nX < nWidth ); nX++ ) + for( long nX = 0; bIsGrey && ( nX < nWidth ); nX++ ) { aColor = mpReadAccess->HasPalette() ? mpReadAccess->GetPaletteColor( mpReadAccess->GetPixelIndex( nY, nX ) ) : mpReadAccess->GetPixel( nY, nX ); diff --git a/vcl/source/filter/jpeg/transupp.c b/vcl/source/filter/jpeg/transupp.c index a784ffb2a464..1588cd07c265 100644 --- a/vcl/source/filter/jpeg/transupp.c +++ b/vcl/source/filter/jpeg/transupp.c @@ -31,7 +31,7 @@ jdiv_round_up (long a, long b) /* Compute a/b rounded up to next integer, ie, ceil(a/b) */ /* Assumes a >= 0, b > 0 */ { - return (a + b - 1L) / b; + return (a + b - 1) / b; } #if JPEG_LIB_VERSION >= 70 diff --git a/vcl/source/filter/sgvmain.cxx b/vcl/source/filter/sgvmain.cxx index cc0207513233..fd0abd60dd7f 100644 --- a/vcl/source/filter/sgvmain.cxx +++ b/vcl/source/filter/sgvmain.cxx @@ -822,7 +822,7 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) ReadGrupType( rInp, aGrup ); if (!rInp.GetError()) { rInp.Seek(rInp.Tell()+aGrup.Last); // object appendix - if(aGrup.GetSubPtr()!=0L) nGrpCnt++; // DrawObjkList(rInp,rOut ); + if(aGrup.GetSubPtr()!=0) nGrpCnt++; // DrawObjkList(rInp,rOut ); } } break; default: { @@ -832,7 +832,7 @@ void DrawObjkList( SvStream& rInp, OutputDevice& rOut ) } } // if rInp if (!rInp.GetError()) { - if (aObjk.Next==0L) { + if (aObjk.Next==0) { if (nGrpCnt==0) bEnd=true; else nGrpCnt--; } @@ -852,11 +852,11 @@ void SkipObjkList(SvStream& rInp) GrupType aGrup; ReadGrupType( rInp, aGrup ); rInp.Seek(rInp.Tell()+aGrup.Last); // object appendix - if(aGrup.GetSubPtr()!=0L) SkipObjkList(rInp); + if(aGrup.GetSubPtr()!=0) SkipObjkList(rInp); } else { ObjkOverSeek(rInp,aObjk); // to next object } - } while (aObjk.Next!=0L && !rInp.GetError()); + } while (aObjk.Next!=0 && !rInp.GetError()); } bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) @@ -876,7 +876,7 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) do { // read standard page ReadPageType( rInp, aPage ); if (aPage.nList!=0) SkipObjkList(rInp); - } while (aPage.Next!=0L && !rInp.GetError()); + } while (aPage.Next!=0 && !rInp.GetError()); nCharPos=rInp.Tell(); ReadPageType( rInp, aPage ); @@ -885,17 +885,17 @@ bool SgfFilterSDrw( SvStream& rInp, SgfHeader&, SgfEntry&, GDIMetaFile& rMtf ) Num=aPage.StdPg; if (Num!=0) { rInp.Seek(nStdPos); - while(Num>1 && aPage.Next!=0L && !rInp.GetError()) { // search standard page + while(Num>1 && aPage.Next!=0 && !rInp.GetError()) { // search standard page ReadPageType( rInp, aPage ); if (aPage.nList!=0) SkipObjkList(rInp); Num--; } ReadPageType( rInp, aPage ); - if(Num==1 && aPage.nList!=0L) DrawObjkList( rInp,*pOutDev ); + if(Num==1 && aPage.nList!=0) DrawObjkList( rInp,*pOutDev ); rInp.Seek(nCharPos); ReadPageType( rInp, aPage ); } - if (aPage.nList!=0L) DrawObjkList(rInp,*pOutDev ); + if (aPage.nList!=0) DrawObjkList(rInp,*pOutDev ); rMtf.Stop(); rMtf.WindStart(); diff --git a/vcl/source/filter/wmf/wmfwr.hxx b/vcl/source/filter/wmf/wmfwr.hxx index c7d130e4020e..5531d694fee5 100644 --- a/vcl/source/filter/wmf/wmfwr.hxx +++ b/vcl/source/filter/wmf/wmfwr.hxx @@ -168,7 +168,7 @@ private: void WMFRecord_SetTextColor(const Color & rColor); void WMFRecord_SetWindowExt(const Size & rSize); void WMFRecord_SetWindowOrg(const Point & rPoint); - void WMFRecord_StretchDIB(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap, sal_uInt32 nROP = 0UL ); + void WMFRecord_StretchDIB(const Point & rPoint, const Size & rSize, const Bitmap & rBitmap, sal_uInt32 nROP = 0 ); void WMFRecord_TextOut(const Point & rPoint, const OUString & rString); void WMFRecord_IntersectClipRect( const Rectangle& rRect); diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx index 0ece422f591d..48e4c8c09b75 100644 --- a/vcl/source/gdi/alpha.cxx +++ b/vcl/source/gdi/alpha.cxx @@ -99,8 +99,8 @@ bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency ) const long nHeight = std::min( pMaskAcc->Height(), pAcc->Height() ); const BitmapColor aMaskWhite( pMaskAcc->GetBestMatchingColor( Color( COL_WHITE ) ) ); - for( long nY = 0L; nY < nHeight; nY++ ) - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nY = 0; nY < nHeight; nY++ ) + for( long nX = 0; nX < nWidth; nX++ ) if( pMaskAcc->GetPixel( nY, nX ) == aMaskWhite ) pAcc->SetPixel( nY, nX, aReplace ); } @@ -118,11 +118,11 @@ bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransp if( pAcc->GetScanlineFormat() == ScanlineFormat::N8BitPal ) { - for( long nY = 0L; nY < nHeight; nY++ ) + for( long nY = 0; nY < nHeight; nY++ ) { Scanline pScan = pAcc->GetScanline( nY ); - for( long nX = 0L; nX < nWidth; nX++, pScan++ ) + for( long nX = 0; nX < nWidth; nX++, pScan++ ) { if( *pScan == cSearchTransparency ) *pScan = cReplaceTransparency; @@ -133,9 +133,9 @@ bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransp { BitmapColor aReplace( cReplaceTransparency ); - for( long nY = 0L; nY < nHeight; nY++ ) + for( long nY = 0; nY < nHeight; nY++ ) { - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nX = 0; nX < nWidth; nX++ ) { if( pAcc->GetPixel( nY, nX ).GetIndex() == cSearchTransparency ) pAcc->SetPixel( nY, nX, aReplace ); diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx index 181ad8a9e972..02843df191b5 100644 --- a/vcl/source/gdi/animate.cxx +++ b/vcl/source/gdi/animate.cxx @@ -30,7 +30,7 @@ #define MIN_TIMEOUT 2 #define INC_TIMEOUT 0 -sal_uLong Animation::mnAnimCount = 0UL; +sal_uLong Animation::mnAnimCount = 0; BitmapChecksum AnimationBitmap::GetChecksum() const { @@ -262,7 +262,7 @@ bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDe { maTimer.Stop(); mbIsInAnimation = false; - mnPos = 0UL; + mnPos = 0; } if( !pMatch ) @@ -327,7 +327,7 @@ void Animation::Draw( OutputDevice* pOut, const Point& rDestPt, const Size& rDes else { const size_t nOldPos = mnPos; - const_cast<Animation*>(this)->mnPos = mbLoopTerminated ? ( nCount - 1UL ) : mnPos; + const_cast<Animation*>(this)->mnPos = mbLoopTerminated ? ( nCount - 1 ) : mnPos; delete new ImplAnimView( const_cast<Animation*>(this), pOut, rDestPt, rDestSz, 0 ); const_cast<Animation*>(this)->mnPos = nOldPos; } @@ -416,7 +416,7 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer *, void) { Stop(); mbLoopTerminated = true; - mnPos = nAnimCount - 1UL; + mnPos = nAnimCount - 1; maBitmapEx = maList[ mnPos ]->aBmpEx; return; } @@ -680,7 +680,7 @@ SvStream& WriteAnimation( SvStream& rOStm, const Animation& rAnimation ) if( nCount ) { - const sal_uInt32 nDummy32 = 0UL; + const sal_uInt32 nDummy32 = 0; // If no BitmapEx was set we write the first Bitmap of // the Animation diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 01dd7b42c784..7b8eb97e03a7 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -486,8 +486,8 @@ bool Bitmap::Invert() const long nWidth = pAcc->Width(); const long nHeight = pAcc->Height(); - for( long nX = 0L; nX < nWidth; nX++ ) - for( long nY = 0L; nY < nHeight; nY++ ) + for( long nX = 0; nX < nWidth; nX++ ) + for( long nY = 0; nY < nHeight; nY++ ) pAcc->SetPixel( nY, nX, pAcc->GetPixel( nY, nX ).Invert() ); } @@ -513,12 +513,12 @@ bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags ) { const long nWidth = pAcc->Width(); const long nHeight = pAcc->Height(); - const long nWidth1 = nWidth - 1L; + const long nWidth1 = nWidth - 1; const long nWidth_2 = nWidth >> 1; - for( long nY = 0L; nY < nHeight; nY++ ) + for( long nY = 0; nY < nHeight; nY++ ) { - for( long nX = 0L, nOther = nWidth1; nX < nWidth_2; nX++, nOther-- ) + for( long nX = 0, nOther = nWidth1; nX < nWidth_2; nX++, nOther-- ) { const BitmapColor aTemp( pAcc->GetPixel( nY, nX ) ); @@ -540,10 +540,10 @@ bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags ) const long nScanSize = pAcc->GetScanlineSize(); std::unique_ptr<sal_uInt8[]> pBuffer(new sal_uInt8[ nScanSize ]); const long nHeight = pAcc->Height(); - const long nHeight1 = nHeight - 1L; + const long nHeight1 = nHeight - 1; const long nHeight_2 = nHeight >> 1; - for( long nY = 0L, nOther = nHeight1; nY < nHeight_2; nY++, nOther-- ) + for( long nY = 0, nOther = nHeight1; nY < nHeight_2; nY++, nOther-- ) { memcpy( pBuffer.get(), pAcc->GetScanline( nY ), nScanSize ); memcpy( pAcc->GetScanline( nY ), pAcc->GetScanline( nOther ), nScanSize ); @@ -561,13 +561,13 @@ bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags ) if( pAcc ) { const long nWidth = pAcc->Width(); - const long nWidth1 = nWidth - 1L; + const long nWidth1 = nWidth - 1; const long nHeight = pAcc->Height(); long nHeight_2 = nHeight >> 1; - for( long nY = 0L, nOtherY = nHeight - 1L; nY < nHeight_2; nY++, nOtherY-- ) + for( long nY = 0, nOtherY = nHeight - 1; nY < nHeight_2; nY++, nOtherY-- ) { - for( long nX = 0L, nOtherX = nWidth1; nX < nWidth; nX++, nOtherX-- ) + for( long nX = 0, nOtherX = nWidth1; nX < nWidth; nX++, nOtherX-- ) { const BitmapColor aTemp( pAcc->GetPixel( nY, nX ) ); @@ -579,7 +579,7 @@ bool Bitmap::Mirror( BmpMirrorFlags nMirrorFlags ) // ggf. noch mittlere Zeile horizontal spiegeln if( nHeight & 1 ) { - for( long nX = 0L, nOtherX = nWidth1, nWidth_2 = nWidth >> 1; nX < nWidth_2; nX++, nOtherX-- ) + for( long nX = 0, nOtherX = nWidth1, nWidth_2 = nWidth >> 1; nX < nWidth_2; nX++, nOtherX-- ) { const BitmapColor aTemp( pAcc->GetPixel( nHeight_2, nX ) ); pAcc->SetPixel( nHeight_2, nX, pAcc->GetPixel( nHeight_2, nOtherX ) ); @@ -601,12 +601,12 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) { bool bRet = false; - nAngle10 %= 3600L; - nAngle10 = ( nAngle10 < 0L ) ? ( 3599L + nAngle10 ) : nAngle10; + nAngle10 %= 3600; + nAngle10 = ( nAngle10 < 0 ) ? ( 3599L + nAngle10 ) : nAngle10; if( !nAngle10 ) bRet = true; - else if( 1800L == nAngle10 ) + else if( 1800 == nAngle10 ) bRet = Mirror( BmpMirrorFlags::Horizontal | BmpMirrorFlags::Vertical ); else { @@ -617,7 +617,7 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) { const Size aSizePix( GetSizePixel() ); - if( ( 900L == nAngle10 ) || ( 2700L == nAngle10 ) ) + if( ( 900 == nAngle10 ) || ( 2700 == nAngle10 ) ) { const Size aNewSizePix( aSizePix.Height(), aSizePix.Width() ); Bitmap aNewBmp( aNewSizePix, GetBitCount(), &pReadAcc->GetPalette() ); @@ -626,22 +626,22 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) if( pWriteAcc ) { const long nWidth = aSizePix.Width(); - const long nWidth1 = nWidth - 1L; + const long nWidth1 = nWidth - 1; const long nHeight = aSizePix.Height(); - const long nHeight1 = nHeight - 1L; + const long nHeight1 = nHeight - 1; const long nNewWidth = aNewSizePix.Width(); const long nNewHeight = aNewSizePix.Height(); - if( 900L == nAngle10 ) + if( 900 == nAngle10 ) { - for( long nY = 0L, nOtherX = nWidth1; nY < nNewHeight; nY++, nOtherX-- ) - for( long nX = 0L, nOtherY = 0L; nX < nNewWidth; nX++ ) + for( long nY = 0, nOtherX = nWidth1; nY < nNewHeight; nY++, nOtherX-- ) + for( long nX = 0, nOtherY = 0; nX < nNewWidth; nX++ ) pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nOtherY++, nOtherX ) ); } - else if( 2700L == nAngle10 ) + else if( 2700 == nAngle10 ) { - for( long nY = 0L, nOtherX = 0L; nY < nNewHeight; nY++, nOtherX++ ) - for( long nX = 0L, nOtherY = nHeight1; nX < nNewWidth; nX++ ) + for( long nY = 0, nOtherX = 0; nY < nNewHeight; nY++, nOtherX++ ) + for( long nX = 0, nOtherY = nHeight1; nX < nNewWidth; nX++ ) pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nOtherY--, nOtherX ) ); } @@ -698,17 +698,17 @@ bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) pSinY[ nY ] = FRound( fSinAngle * fTmp ); } - for( nY = 0L; nY < nNewHeight; nY++ ) + for( nY = 0; nY < nNewHeight; nY++ ) { long nSinY = pSinY[ nY ]; long nCosY = pCosY[ nY ]; - for( nX = 0L; nX < nNewWidth; nX++ ) + for( nX = 0; nX < nNewWidth; nX++ ) { nRotX = ( pCosX[ nX ] - nSinY ) >> 6; nRotY = ( pSinX[ nX ] + nCosY ) >> 6; - if ( ( nRotX > -1L ) && ( nRotX < nWidth ) && ( nRotY > -1L ) && ( nRotY < nHeight ) ) + if ( ( nRotX > -1 ) && ( nRotX < nWidth ) && ( nRotY > -1 ) && ( nRotY < nHeight ) ) pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nRotY, nRotX ) ); else pWriteAcc->SetPixel( nY, nX, aFillColor ); @@ -887,7 +887,7 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst, pWriteAcc->SetPixel( nDstY, nDstX, pReadAcc->GetPixel( nSrcY, nSrcX ) ); pWriteAcc.reset(); - bRet = ( nWidth > 0L ) && ( nHeight > 0L ); + bRet = ( nWidth > 0 ) && ( nHeight > 0 ); } pReadAcc.reset(); @@ -910,12 +910,12 @@ bool Bitmap::CopyPixel( const Rectangle& rRectDst, const long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() ); const long nSrcX = aRectSrc.Left(); const long nSrcY = aRectSrc.Top(); - const long nSrcEndX1 = nSrcX + nWidth - 1L; - const long nSrcEndY1 = nSrcY + nHeight - 1L; + const long nSrcEndX1 = nSrcX + nWidth - 1; + const long nSrcEndY1 = nSrcY + nHeight - 1; const long nDstX = aRectDst.Left(); const long nDstY = aRectDst.Top(); - const long nDstEndX1 = nDstX + nWidth - 1L; - const long nDstEndY1 = nDstY + nHeight - 1L; + const long nDstEndX1 = nDstX + nWidth - 1; + const long nDstEndY1 = nDstY + nHeight - 1; if( ( nDstX <= nSrcX ) && ( nDstY <= nSrcY ) ) { @@ -994,7 +994,7 @@ bool Bitmap::CopyPixel_AlphaOptimized( const Rectangle& rRectDst, const Rectangl pWriteAcc->SetPixel( nDstY, nDstX, pReadAcc->GetPixel( nSrcY, nSrcX ) ); pWriteAcc.reset(); - bRet = ( nWidth > 0L ) && ( nHeight > 0L ); + bRet = ( nWidth > 0 ) && ( nHeight > 0 ); } pReadAcc.reset(); @@ -1017,12 +1017,12 @@ bool Bitmap::CopyPixel_AlphaOptimized( const Rectangle& rRectDst, const Rectangl const long nHeight = std::min( aRectSrc.GetHeight(), aRectDst.GetHeight() ); const long nSrcX = aRectSrc.Left(); const long nSrcY = aRectSrc.Top(); - const long nSrcEndX1 = nSrcX + nWidth - 1L; - const long nSrcEndY1 = nSrcY + nHeight - 1L; + const long nSrcEndX1 = nSrcX + nWidth - 1; + const long nSrcEndY1 = nSrcY + nHeight - 1; const long nDstX = aRectDst.Left(); const long nDstY = aRectDst.Top(); - const long nDstEndX1 = nDstX + nWidth - 1L; - const long nDstEndY1 = nDstY + nHeight - 1L; + const long nDstEndX1 = nDstX + nWidth - 1; + const long nDstEndY1 = nDstY + nHeight - 1; if( ( nDstX <= nSrcX ) && ( nDstY <= nSrcY ) ) { @@ -1091,7 +1091,7 @@ bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor ) if( pInitColor ) aColor = pWriteAcc->GetBestMatchingColor( *pInitColor ); - for( nY = 0L; nY < nHeight; nY++ ) + for( nY = 0; nY < nHeight; nY++ ) { pWriteAcc->CopyScanline( nY, *pReadAcc ); @@ -1157,12 +1157,12 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const aWhite.GetIndex() == 1 ) { // optimized for 1Bit-MSB destination palette - for( nY = 0L; nY < nHeight; nY++ ) + for( nY = 0; nY < nHeight; nY++ ) { Scanline pSrc = pReadAcc->GetScanline( nY ); Scanline pDst = pWriteAcc->GetScanline( nY ); long nShift = 0; - for( nX = 0L, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4 ) + for( nX = 0, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4 ) { if( cTest == ( ( pSrc[ nX >> 1 ] >> nShift ) & 0x0f ) ) pDst[ nX >> 3 ] |= 1 << ( 7 - ( nX & 7 ) ); @@ -1173,11 +1173,11 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const } else { - for( nY = 0L; nY < nHeight; nY++ ) + for( nY = 0; nY < nHeight; nY++ ) { Scanline pSrc = pReadAcc->GetScanline( nY ); long nShift = 0; - for( nX = 0L, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4 ) + for( nX = 0, nShift = nShiftInit; nX < nWidth; nX++, nShift ^= 4 ) { if( cTest == ( ( pSrc[ nX >> 1 ] >> nShift ) & 0x0f ) ) pWriteAcc->SetPixel( nY, nX, aWhite ); @@ -1196,11 +1196,11 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const aWhite.GetIndex() == 1 ) { // optimized for 1Bit-MSB destination palette - for( nY = 0L; nY < nHeight; nY++ ) + for( nY = 0; nY < nHeight; nY++ ) { Scanline pSrc = pReadAcc->GetScanline( nY ); Scanline pDst = pWriteAcc->GetScanline( nY ); - for( nX = 0L; nX < nWidth; nX++ ) + for( nX = 0; nX < nWidth; nX++ ) { if( cTest == pSrc[ nX ] ) pDst[ nX >> 3 ] |= 1 << ( 7 - ( nX & 7 ) ); @@ -1211,10 +1211,10 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const } else { - for( nY = 0L; nY < nHeight; nY++ ) + for( nY = 0; nY < nHeight; nY++ ) { Scanline pSrc = pReadAcc->GetScanline( nY ); - for( nX = 0L; nX < nWidth; nX++ ) + for( nX = 0; nX < nWidth; nX++ ) { if( cTest == pSrc[ nX ] ) pWriteAcc->SetPixel( nY, nX, aWhite ); @@ -1227,9 +1227,9 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const else { // not optimized - for( nY = 0L; nY < nHeight; nY++ ) + for( nY = 0; nY < nHeight; nY++ ) { - for( nX = 0L; nX < nWidth; nX++ ) + for( nX = 0; nX < nWidth; nX++ ) { if( aTest == pReadAcc->GetPixel( nY, nX ) ) pWriteAcc->SetPixel( nY, nX, aWhite ); @@ -1252,9 +1252,9 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const if( pReadAcc->HasPalette() ) { - for( long nY = 0L; nY < nHeight; nY++ ) + for( long nY = 0; nY < nHeight; nY++ ) { - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nX = 0; nX < nWidth; nX++ ) { aCol = pReadAcc->GetPaletteColor( pReadAcc->GetPixelIndex( nY, nX ) ); nR = aCol.GetRed(); @@ -1274,9 +1274,9 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const } else { - for( long nY = 0L; nY < nHeight; nY++ ) + for( long nY = 0; nY < nHeight; nY++ ) { - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nX = 0; nX < nWidth; nX++ ) { aCol = pReadAcc->GetPixel( nY, nX ); nR = aCol.GetRed(); @@ -1356,7 +1356,7 @@ vcl::Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) while( ( nX <= nRight ) && ( aMatch == pReadAcc->GetPixel( nY, nX ) ) ) nX++; - //aSubRect.Right() = nX - 1L; + //aSubRect.Right() = nX - 1; aNewLine.push_back(nX - 1); //aRegion.ImplAddRect( aSubRect ); @@ -1457,11 +1457,11 @@ bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) // Set all entries to false std::fill( pFlags.get(), pFlags.get()+nMaxColors, false ); - for( long nY = 0L; nY < nHeight; nY++ ) - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nY = 0; nY < nHeight; nY++ ) + for( long nX = 0; nX < nWidth; nX++ ) pFlags[ pAcc->GetPixelIndex( nY, nX ) ] = true; - for( sal_uInt16 i = 0UL; i < nMaxColors; i++ ) + for( sal_uInt16 i = 0; i < nMaxColors; i++ ) { // Hurray, we do have an unused entry if( !pFlags[ i ] ) @@ -1476,8 +1476,8 @@ bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) else aReplace = rReplaceColor; - for( long nY = 0L; nY < nHeight; nY++ ) - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nY = 0; nY < nHeight; nY++ ) + for( long nX = 0; nX < nWidth; nX++ ) if( pMaskAcc->GetPixel( nY, nX ) == aMaskWhite ) pAcc->SetPixel( nY, nX, aReplace ); @@ -1501,9 +1501,9 @@ bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor ) const long nWidth = std::min( pAlphaAcc->Width(), pAcc->Width() ); const long nHeight = std::min( pAlphaAcc->Height(), pAcc->Height() ); - for( long nY = 0L; nY < nHeight; nY++ ) + for( long nY = 0; nY < nHeight; nY++ ) { - for( long nX = 0L; nX < nWidth; nX++ ) + for( long nX = 0; nX < nWidth; nX++ ) { aCol = pAcc->GetColor( nY, nX ); pNewAcc->SetPixel( nY, nX, aCol.Merge( rMergeColor, 255 - pAlphaAcc->GetPixelIndex( nY, nX ) ) ); @@ -1582,9 +1582,9 @@ bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal BitmapColor aCol; const BitmapColor aReplace( pAcc->GetBestMatchingColor( rReplaceColor ) ); - for( long nY = 0L, nHeight = pAcc->Height(); nY < nHeight; nY++ ) + for( long nY = 0, nHeight = pAcc->Height(); nY < nHeight; nY++ ) { - for( long nX = 0L, nWidth = pAcc->Width(); nX < nWidth; nX++ ) + for( long nX = 0, nWidth = pAcc->Width(); nX < nWidth; nX++ ) { aCol = pAcc->GetPixel( nY, nX ); @@ -1635,7 +1635,7 @@ bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors, else pTols = reinterpret_cast<long*>(_pTols); - for( i = 0UL; i < nColorCount; i++ ) + for( i = 0; i < nColorCount; i++ ) { const Color& rCol = pSearchColors[ i ]; const long nTol = pTols[ i ]; @@ -1654,7 +1654,7 @@ bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors, { const BitmapColor& rCol = pAcc->GetPaletteColor( nEntry ); - for( i = 0UL; i < nColorCount; i++ ) + for( i = 0; i < nColorCount; i++ ) { if( pMinR[ i ] <= rCol.GetRed() && pMaxR[ i ] >= rCol.GetRed() && pMinG[ i ] <= rCol.GetGreen() && pMaxG[ i ] >= rCol.GetGreen() && @@ -1671,16 +1671,16 @@ bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors, BitmapColor aCol; std::unique_ptr<BitmapColor[]> pReplaces(new BitmapColor[ nColorCount ]); - for( i = 0UL; i < nColorCount; i++ ) + for( i = 0; i < nColorCount; i++ ) pReplaces[ i ] = pAcc->GetBestMatchingColor( pReplaceColors[ i ] ); - for( long nY = 0L, nHeight = pAcc->Height(); nY < nHeight; nY++ ) + for( long nY = 0, nHeight = pAcc->Height(); nY < nHeight; nY++ ) { - for( long nX = 0L, nWidth = pAcc->Width(); nX < nWidth; nX++ ) + for( long nX = 0, nWidth = pAcc->Width(); nX < nWidth; nX++ ) { aCol = pAcc->GetPixel( nY, nX ); - for( i = 0UL; i < nColorCount; i++ ) + for( i = 0; i < nColorCount; i++ ) { if( pMinR[ i ] <= aCol.GetRed() && pMaxR[ i ] >= aCol.GetRed() && pMinG[ i ] <= aCol.GetGreen() && pMaxG[ i ] >= aCol.GetGreen() && @@ -1741,7 +1741,7 @@ bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine ) { case BmpCombine::And: { - for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ ) + for( long nY = 0; nY < nHeight; nY++ ) for( long nX = 0; nX < nWidth; nX++ ) { if( pMaskAcc->GetPixel( nY, nX ) != aMaskBlack && pAcc->GetPixel( nY, nX ) != aBlack ) pAcc->SetPixel( nY, nX, aWhite ); @@ -1753,7 +1753,7 @@ bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine ) case BmpCombine::Or: { - for( long nY = 0L; nY < nHeight; nY++ ) for( long nX = 0L; nX < nWidth; nX++ ) + for( long nY = 0; nY < nHeight; nY++ ) for( long nX = 0; nX < nWidth; nX++ ) { if( pMaskAcc->GetPixel( nY, nX ) != aMaskBlack || pAcc->GetPixel( nY, nX ) != aBlack ) pAcc->SetPixel( nY, nX, aWhite ); @@ -1790,8 +1790,8 @@ bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) const long nWidth = std::min( pAlphaAcc->Width(), pAcc->Width() ); const long nHeight = std::min( pAlphaAcc->Height(), pAcc->Height() ); - for( long nY = 0L; nY < nHeight; ++nY ) - for( long nX = 0L; nX < nWidth; ++nX ) + for( long nY = 0; nY < nHeight; ++nY ) + for( long nX = 0; nX < nWidth; ++nX ) pAcc->SetPixel( nY, nX, pAcc->GetPixel( nY, nX ).Merge( rBackgroundColor, 255 - pAlphaAcc->GetPixelIndex( nY, nX ) ) ); diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index b0d2843639b2..48fe0db1a112 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -37,7 +37,7 @@ #include "octree.hxx" #include "BitmapScaleConvolution.hxx" -#define RGB15( _def_cR, _def_cG, _def_cB ) (((sal_uLong)(_def_cR)<<10UL)|((sal_uLong)(_def_cG)<<5UL)|(sal_uLong)(_def_cB)) +#define RGB15( _def_cR, _def_cG, _def_cB ) (((sal_uLong)(_def_cR)<<10)|((sal_uLong)(_def_cG)<<5)|(sal_uLong)(_def_cB)) #define GAMMA( _def_cVal, _def_InvGamma ) ((sal_uInt8)MinMax(FRound(pow( _def_cVal/255.0,_def_InvGamma)*255.0),0,255)) #define CALC_ERRORS \ @@ -1342,9 +1342,9 @@ bool Bitmap::ImplDitherMatrix() if( pReadAcc->HasPalette() ) { - for( sal_uLong nY = 0UL; nY < nHeight; nY++ ) + for( sal_uLong nY = 0; nY < nHeight; nY++ ) { - for( sal_uLong nX = 0UL, nModY = ( nY & 0x0FUL ) << 4; nX < nWidth; nX++ ) + for( sal_uLong nX = 0, nModY = ( nY & 0x0FUL ) << 4; nX < nWidth; nX++ ) { const BitmapColor aCol( pReadAcc->GetPaletteColor( pReadAcc->GetPixelIndex( nY, nX ) ) ); const sal_uLong nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ]; @@ -1359,9 +1359,9 @@ bool Bitmap::ImplDitherMatrix() } else { - for( sal_uLong nY = 0UL; nY < nHeight; nY++ ) + for( sal_uLong nY = 0; nY < nHeight; nY++ ) { - for( sal_uLong nX = 0UL, nModY = ( nY & 0x0FUL ) << 4; nX < nWidth; nX++ ) + for( sal_uLong nX = 0, nModY = ( nY & 0x0FUL ) << 4; nX < nWidth; nX++ ) { const BitmapColor aCol( pReadAcc->GetPixel( nY, nX ) ); const sal_uLong nD = nVCLDitherLut[ nModY + ( nX & 0x0FUL ) ]; @@ -1891,7 +1891,7 @@ bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount ) if( pWAcc ) { - const sal_uLong nSize = 32768UL * sizeof( sal_uLong ); + const sal_uLong nSize = 32768 * sizeof( sal_uLong ); sal_uLong* pColBuf = static_cast<sal_uLong*>(rtl_allocateMemory( nSize )); const long nWidth = pWAcc->Width(); const long nHeight = pWAcc->Height(); diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index bd88eb9d5725..d22c61276813 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -84,17 +84,17 @@ struct DIBInfoHeader sal_uInt32 nColsImportant; DIBInfoHeader() - : nSize(0UL), - nWidth(0UL), - nHeight(0UL), + : nSize(0), + nWidth(0), + nHeight(0), nPlanes(0), nBitCount(0), nCompression(0), nSizeImage(0), - nXPelsPerMeter(0UL), - nYPelsPerMeter(0UL), - nColsUsed(0UL), - nColsImportant(0UL) + nXPelsPerMeter(0), + nYPelsPerMeter(0), + nColsUsed(0), + nColsImportant(0) {} }; @@ -116,19 +116,19 @@ struct DIBV5Header : public DIBInfoHeader DIBV5Header() : DIBInfoHeader(), - nV5RedMask(0UL), - nV5GreenMask(0UL), - nV5BlueMask(0UL), - nV5AlphaMask(0UL), - nV5CSType(0UL), + nV5RedMask(0), + nV5GreenMask(0), + nV5BlueMask(0), + nV5AlphaMask(0), + nV5CSType(0), aV5Endpoints(), - nV5GammaRed(0UL), - nV5GammaGreen(0UL), - nV5GammaBlue(0UL), - nV5Intent(0UL), - nV5ProfileData(0UL), - nV5ProfileSize(0UL), - nV5Reserved(0UL) + nV5GammaRed(0), + nV5GammaGreen(0), + nV5GammaBlue(0), + nV5Intent(0), + nV5ProfileData(0), + nV5ProfileSize(0), + nV5Reserved(0) {} }; @@ -355,7 +355,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header& rHeader, BitmapWriteAccess& const sal_uLong nWidth = rAcc.Width(); sal_uLong nCountByte; sal_uLong nRunByte; - sal_uLong nX = 0UL; + sal_uLong nX = 0; sal_uInt8 cTmp; bool bEndDecoding = false; @@ -375,7 +375,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header& rHeader, BitmapWriteAccess& { nCountByte = nRunByte >> 1; - for( sal_uLong i = 0UL; i < nCountByte; i++ ) + for( sal_uLong i = 0; i < nCountByte; i++ ) { if (pRLE == pEndRLE) return false; @@ -410,7 +410,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header& rHeader, BitmapWriteAccess& } else { - for( sal_uLong i = 0UL; i < nRunByte; i++ ) + for( sal_uLong i = 0; i < nRunByte; i++ ) { if (pRLE == pEndRLE) return false; @@ -433,7 +433,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header& rHeader, BitmapWriteAccess& else if( !nRunByte ) { nY--; - nX = 0UL; + nX = 0; } else if( nRunByte == 1 ) bEndDecoding = true; @@ -460,7 +460,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header& rHeader, BitmapWriteAccess& { nRunByte = nCountByte >> 1; - for( sal_uLong i = 0UL; i < nRunByte; i++ ) + for( sal_uLong i = 0; i < nRunByte; i++ ) { if( nX < nWidth ) rAcc.SetPixelIndex(nY, nX++, SanitizePaletteIndex(cTmp >> 4, rPalette, bForceToMonoWhileReading)); @@ -474,7 +474,7 @@ bool ImplDecodeRLE(sal_uInt8* pBuffer, DIBV5Header& rHeader, BitmapWriteAccess& } else { - for( sal_uLong i = 0UL; ( i < nCountByte ) && ( nX < nWidth ); i++ ) + for( sal_uLong i = 0; ( i < nCountByte ) && ( nX < nWidth ); i++ ) rAcc.SetPixelIndex(nY, nX++, SanitizePaletteIndex(cTmp, rPalette, bForceToMonoWhileReading)); } } @@ -611,7 +611,7 @@ bool ImplReadDIBBits(SvStream& rIStm, DIBV5Header& rHeader, BitmapWriteAccess& r { if( !nShift ) { - nShift = 2UL; + nShift = 2; cTmp = *pTmp++; } @@ -1030,7 +1030,7 @@ bool ImplReadDIBFileHeader( SvStream& rIStm, sal_uLong& rOffset ) rIStm.ReadUInt16( nTmp16 ); rIStm.SeekRel( 8 ); rIStm.ReadUInt32( nTmp32 ); - rOffset = nTmp32 - 28UL; + rOffset = nTmp32 - 28; bRet = ( 0x4D42 == nTmp16 ); } else // 0x4D42 == nTmp16, 'MB' from BITMAPFILEHEADER @@ -1094,7 +1094,7 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, bool bRLE4 ) for ( long nY = nHeight - 1; nY >= 0; nY-- ) { sal_uInt8* pTmp = pBuf.get(); - nX = nBufCount = 0UL; + nX = nBufCount = 0; while( nX < nWidth ) { @@ -1117,7 +1117,7 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, bool bRLE4 ) else { cLast = cPix; - nSaveIndex = nX - 1UL; + nSaveIndex = nX - 1; bFound = false; while( ( nX < nWidth ) && ( nCount < 256 ) @@ -1150,7 +1150,7 @@ bool ImplWriteRLE( SvStream& rOStm, BitmapReadAccess& rAcc, bool bRLE4 ) } else { - for( sal_uLong i = 0UL; i < nCount; i++ ) + for( sal_uLong i = 0; i < nCount; i++ ) *pTmp++ = rAcc.GetPixelIndex( nY, nSaveIndex++ ); } diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index 29a0e9021278..b15b096b05be 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -2698,7 +2698,7 @@ SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile ) ImplMetaReadData aReadData; aReadData.meActualCharSet = rIStm.GetStreamCharSet(); - for( sal_uInt32 nAction = 0UL; ( nAction < nCount ) && !rIStm.IsEof(); nAction++ ) + for( sal_uInt32 nAction = 0; ( nAction < nCount ) && !rIStm.IsEof(); nAction++ ) { MetaAction* pAction = MetaAction::ReadMetaAction( rIStm, &aReadData ); if( pAction ) diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx index c8616ef3ce49..2ea6824d9ae2 100644 --- a/vcl/source/gdi/impanmvw.cxx +++ b/vcl/source/gdi/impanmvw.cxx @@ -169,9 +169,9 @@ void ImplAnimView::drawToPos( sal_uLong nPos ) std::unique_ptr<vcl::Region> xOldClip(!maClip.IsNull() ? new vcl::Region( pRenderContext->GetClipRegion() ) : nullptr); aVDev->SetOutputSizePixel( maSzPix, false ); - nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1UL ); + nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1 ); - for( sal_uLong i = 0UL; i <= nPos; i++ ) + for( sal_uLong i = 0; i <= nPos; i++ ) draw( i, aVDev.get() ); if (xOldClip) diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index 73cbe2d1f437..c03733d09f44 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -161,7 +161,7 @@ void ImplPointArray::ImplSetSize( sal_uLong nSize ) const sal_uLong nTotal = nSize * sizeof( Point ); mnSize = nSize; - mnRealSize = 0UL; + mnRealSize = 0; if( mpArray ) rtl_freeMemory( mpArray ); @@ -311,7 +311,7 @@ void ImplChain::ImplBeginAdd( const Point& rStartPt ) { maPoly = tools::Polygon(); maStartPt = rStartPt; - mnCount = 0UL; + mnCount = 0; } inline void ImplChain::ImplAdd( sal_uInt8 nCode ) @@ -997,12 +997,12 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain long nActX = rStartPt.X(); long nActY = rStartPt.Y(); sal_uLong nFound; - sal_uLong nLastDir = 0UL; + sal_uLong nLastDir = 0; sal_uLong nDir; do { - nFound = 0UL; + nFound = 0; // first try last direction long nTryX = nActX + aImplMove[ nLastDir ].nDX; @@ -1012,12 +1012,12 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain { rChain.ImplAdd( (sal_uInt8) nLastDir ); pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX ); - nFound = 1UL; + nFound = 1; } else { // try other directions - for( nDir = 0UL; nDir < 8UL; nDir++ ) + for( nDir = 0; nDir < 8; nDir++ ) { // we already tried nLastDir if( nDir != nLastDir ) @@ -1029,7 +1029,7 @@ bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain { rChain.ImplAdd( (sal_uInt8) nDir ); pMap->Set( nActY = nTryY, nActX = nTryX, VECT_DONE_INDEX ); - nFound = 1UL; + nFound = 1; nLastDir = nDir; break; } diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx index aa1cb1cd21f6..468cb3d034f5 100644 --- a/vcl/source/gdi/pngwrite.cxx +++ b/vcl/source/gdi/pngwrite.cxx @@ -346,7 +346,7 @@ void PNGWriterImpl::ImplWriteTransparent() ImplOpenChunk(PNGCHUNK_tRNS); - for (sal_uLong n = 0UL; n <= nTransIndex; n++) + for (sal_uLong n = 0; n <= nTransIndex; n++) { ImplWriteChunk((nTransIndex == n) ? static_cast<sal_uInt8>(0x0) : static_cast<sal_uInt8>(0xff)); } diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 3e538d13e1b6..77fe27c6ee9c 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -642,13 +642,13 @@ void OutputDevice::DrawDeviceAlphaBitmap( const Bitmap& rBmp, const AlphaMask& r if (bHMirr) { aOutSz.Width() = -aOutSz.Width(); - aOutPt.X() -= aOutSz.Width() - 1L; + aOutPt.X() -= aOutSz.Width() - 1; } if (bVMirr) { aOutSz.Height() = -aOutSz.Height(); - aOutPt.Y() -= aOutSz.Height() - 1L; + aOutPt.Y() -= aOutSz.Height() - 1; } if (!aDstRect.Intersection(Rectangle(aOutPt, aOutSz)).IsEmpty()) @@ -744,11 +744,11 @@ private: long nOutDimention, long nOffset, long* pMap, long* pMapOffset) { - const double fReverseScale = (std::abs(nOutDimention) > 1L) ? (nSrcDimension - 1L) / double(std::abs(nOutDimention) - 1L) : 0.0; + const double fReverseScale = (std::abs(nOutDimention) > 1) ? (nSrcDimension - 1) / double(std::abs(nOutDimention) - 1) : 0.0; - long nSampleRange = std::max(0L, nSrcDimension - 2L); + long nSampleRange = std::max(0L, nSrcDimension - 2); - for (long i = 0L; i < nDstDimension; i++) + for (long i = 0; i < nDstDimension; i++) { double fTemp = std::abs((nOffset + i) * fReverseScale); @@ -807,7 +807,7 @@ public: sal_uInt8 nColor1, nColor2, nColor3, nAlpha; - for (long nY = 0L; nY < nDstHeight; nY++) + for (long nY = 0; nY < nDstHeight; nY++) { const long nMapY = mpMapY[nY]; const long nMapFY = mpMapYOffset[nY]; @@ -822,13 +822,13 @@ public: pDestScanline = pDestination->GetScanline(nY); - for (long nX = 0L; nX < nDstWidth; nX++) + for (long nX = 0; nX < nDstWidth; nX++) { const long nMapX = mpMapX[nX]; const long nMapFX = mpMapXOffset[nX]; - pColorSample1 = pLine0 + 3L * nMapX; - pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3L : pColorSample1; + pColorSample1 = pLine0 + 3 * nMapX; + pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3 : pColorSample1; nColor1Line1 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1); pColorSample1++; @@ -839,8 +839,8 @@ public: pColorSample2++; nColor3Line1 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1); - pColorSample1 = pLine1 + 3L * nMapX; - pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3L : pColorSample1; + pColorSample1 = pLine1 + 3 * nMapX; + pColorSample2 = (nMapX + 1 < pSource->Width()) ? pColorSample1 + 3 : pColorSample1; nColor1Line2 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1); pColorSample1++; @@ -852,11 +852,11 @@ public: nColor3Line2 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1); pColorSample1 = pLineAlpha0 + nMapX; - pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1L : pColorSample1; + pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1 : pColorSample1; nAlphaLine1 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1); pColorSample1 = pLineAlpha1 + nMapX; - pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1L : pColorSample1; + pColorSample2 = (nMapX + 1 < pSourceAlpha->Width()) ? pColorSample1 + 1 : pColorSample1; nAlphaLine2 = (static_cast<long>(*pColorSample1) << 7) + nMapFX * (static_cast<long>(*pColorSample2) - *pColorSample1); nColor1 = (nColor1Line1 + nMapFY * ((nColor1Line2 >> 7) - (nColor1Line1 >> 7))) >> 7; @@ -911,9 +911,9 @@ private: long nMirrorOffset = 0; if (bMirror) - nMirrorOffset = (nDstLocation << 1) + nSrcDimension - 1L; + nMirrorOffset = (nDstLocation << 1) + nSrcDimension - 1; - for (long i = 0L; i < nDstDimension; ++i, ++nOffset) + for (long i = 0; i < nDstDimension; ++i, ++nOffset) { pMap[i] = nDstLocation + nOffset * nSrcDimension / nOutDimention; if (bMirror) diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx index 5cb45be03b09..f7c2e594053d 100644 --- a/vcl/source/outdev/outdev.cxx +++ b/vcl/source/outdev/outdev.cxx @@ -339,7 +339,7 @@ void OutputDevice::SetRefPoint() mpMetaFile->AddAction( new MetaRefPointAction( Point(), false ) ); mbRefPoint = false; - maRefPoint.X() = maRefPoint.Y() = 0L; + maRefPoint.X() = maRefPoint.Y() = 0; if( mpAlphaVDev ) mpAlphaVDev->SetRefPoint(); diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index 61cbeaa4f4af..62c5853bdf38 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -254,15 +254,15 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGrid const long nEndX = ImplLogicXToDevicePixel( nRight ); const long nStartY = ImplLogicYToDevicePixel( nY ); const long nEndY = ImplLogicYToDevicePixel( nBottom ); - long nHorzCount = 0L; - long nVertCount = 0L; + long nHorzCount = 0; + long nVertCount = 0; std::vector< sal_Int32 > aVertBuf; std::vector< sal_Int32 > aHorzBuf; if( ( nFlags & DrawGridFlags::Dots ) || ( nFlags & DrawGridFlags::HorzLines ) ) { - aVertBuf.resize( aDstRect.GetHeight() / nDistY + 2L ); + aVertBuf.resize( aDstRect.GetHeight() / nDistY + 2 ); aVertBuf[ nVertCount++ ] = nStartY; while( ( nY += nDistY ) <= nBottom ) { @@ -272,7 +272,7 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGrid if( ( nFlags & DrawGridFlags::Dots ) || ( nFlags & DrawGridFlags::VertLines ) ) { - aHorzBuf.resize( aDstRect.GetWidth() / nDistX + 2L ); + aHorzBuf.resize( aDstRect.GetWidth() / nDistX + 2 ); aHorzBuf[ nHorzCount++ ] = nStartX; while( ( nX += nDistX ) <= nRight ) { @@ -291,9 +291,9 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGrid if( nFlags & DrawGridFlags::Dots ) { - for( long i = 0L; i < nVertCount; i++ ) + for( long i = 0; i < nVertCount; i++ ) { - for( long j = 0L, Y = aVertBuf[ i ]; j < nHorzCount; j++ ) + for( long j = 0, Y = aVertBuf[ i ]; j < nHorzCount; j++ ) { mpGraphics->DrawPixel( aHorzBuf[ j ], Y, this ); } @@ -303,7 +303,7 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGrid { if( nFlags & DrawGridFlags::HorzLines ) { - for( long i = 0L; i < nVertCount; i++ ) + for( long i = 0; i < nVertCount; i++ ) { nY = aVertBuf[ i ]; mpGraphics->DrawLine( nStartX, nY, nEndX, nY, this ); @@ -312,7 +312,7 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, DrawGrid if( nFlags & DrawGridFlags::VertLines ) { - for( long i = 0L; i < nHorzCount; i++ ) + for( long i = 0; i < nHorzCount; i++ ) { nX = aHorzBuf[ i ]; mpGraphics->DrawLine( nX, nStartY, nX, nEndY, this ); diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 94f0be2f0ff5..30bcf52f1cae 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -260,8 +260,8 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) long nOldOffY = mnOutOffY; bool bOldMap = mbMap; - mnOutOffX = 0L; - mnOutOffY = 0L; + mnOutOffX = 0; + mnOutOffY = 0; mpMetaFile = nullptr; EnableMapMode( false ); diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx index d742e8fcf098..80423068b436 100644 --- a/vcl/source/outdev/textline.cxx +++ b/vcl/source/outdev/textline.cxx @@ -1011,7 +1011,7 @@ void OutputDevice::DrawWaveLine( const Point& rStartPos, const Point& rEndPos ) if ( (nStartY != nEndY) || (nStartX > nEndX) ) { long nDX = nEndX - nStartX; - double nO = atan2( -nEndY + nStartY, ((nDX == 0L) ? 0.000000001 : nDX) ); + double nO = atan2( -nEndY + nStartY, ((nDX == 0) ? 0.000000001 : nDX) ); nO /= F_PI1800; nOrientation = (short)nO; aStartPt.RotateAround( nEndX, nEndY, -nOrientation ); diff --git a/vcl/source/outdev/transparent.cxx b/vcl/source/outdev/transparent.cxx index e7aad12b23da..3510c36dd248 100644 --- a/vcl/source/outdev/transparent.cxx +++ b/vcl/source/outdev/transparent.cxx @@ -132,18 +132,18 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask aMask.Convert( BmpConversion::N1BitThreshold ); // mirrored horizontically - if( aDestSz.Width() < 0L ) + if( aDestSz.Width() < 0 ) { aDestSz.Width() = -aDestSz.Width(); - aDestPt.X() -= ( aDestSz.Width() - 1L ); + aDestPt.X() -= ( aDestSz.Width() - 1 ); nMirrFlags |= BmpMirrorFlags::Horizontal; } // mirrored vertically - if( aDestSz.Height() < 0L ) + if( aDestSz.Height() < 0 ) { aDestSz.Height() = -aDestSz.Height(); - aDestPt.Y() -= ( aDestSz.Height() - 1L ); + aDestPt.Y() -= ( aDestSz.Height() - 1 ); nMirrFlags |= BmpMirrorFlags::Vertical; } @@ -178,10 +178,10 @@ void OutputDevice::ImplPrintTransparent( const Bitmap& rBmp, const Bitmap& rMask mbMap = false; // create forward mapping tables - for( nX = 0L; nX <= nSrcWidth; nX++ ) + for( nX = 0; nX <= nSrcWidth; nX++ ) pMapX[ nX ] = aDestPt.X() + FRound( (double) aDestSz.Width() * nX / nSrcWidth ); - for( nY = 0L; nY <= nSrcHeight; nY++ ) + for( nY = 0; nY <= nSrcHeight; nY++ ) pMapY[ nY ] = aDestPt.Y() + FRound( (double) aDestSz.Height() * nY / nSrcHeight ); // walk through all rectangles of mask diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx index e4d89716f28d..b20339add0aa 100644 --- a/vcl/source/outdev/wallpaper.cxx +++ b/vcl/source/outdev/wallpaper.cxx @@ -240,8 +240,8 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, default: { - const long nRight = nX + nWidth - 1L; - const long nBottom = nY + nHeight - 1L; + const long nRight = nX + nWidth - 1; + const long nBottom = nY + nHeight - 1; long nFirstX; long nFirstY; @@ -261,10 +261,10 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY, long nStartX = nX + nOffX; long nStartY = nY + nOffY; - if( nOffX > 0L ) + if( nOffX > 0 ) nStartX -= nBmpWidth; - if( nOffY > 0L ) + if( nOffY > 0 ) nStartY -= nBmpHeight; for( long nBmpY = nStartY; nBmpY <= nBottom; nBmpY += nBmpHeight ) diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 3bb0801b0a8c..cfa8b7521c38 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -1291,7 +1291,7 @@ void MenuFloatingWindow::Command( const CommandEvent& rCEvt ) const CommandWheelData* pData = rCEvt.GetWheelData(); if( !pData->GetModifier() && ( pData->GetMode() == CommandWheelMode::SCROLL ) ) { - ImplScroll( pData->GetDelta() > 0L ); + ImplScroll( pData->GetDelta() > 0 ); MouseMove( MouseEvent( GetPointerPosPixel(), 0 ) ); } } diff --git a/vcl/source/window/scrwnd.cxx b/vcl/source/window/scrwnd.cxx index e776140d2347..60aa082c107d 100644 --- a/vcl/source/window/scrwnd.cxx +++ b/vcl/source/window/scrwnd.cxx @@ -185,7 +185,7 @@ void ImplWheelWindow::ImplRecalcScrollValues() { if( mnActDist < WHEEL_RADIUS ) { - mnActDeltaX = mnActDeltaY = 0L; + mnActDeltaX = mnActDeltaY = 0; mnTimeout = DEF_TIMEOUT; } else @@ -202,7 +202,7 @@ void ImplWheelWindow::ImplRecalcScrollValues() nCurTime = MAX_TIME; if( !nCurTime ) - nCurTime = 1UL; + nCurTime = 1; if( mnRepaintTime <= nCurTime ) mnTimeout = nCurTime - mnRepaintTime; @@ -211,7 +211,7 @@ void ImplWheelWindow::ImplRecalcScrollValues() sal_uInt64 nMult = mnRepaintTime / nCurTime; if( !( mnRepaintTime % nCurTime ) ) - mnTimeout = 0UL; + mnTimeout = 0; else mnTimeout = ++nMult * nCurTime - mnRepaintTime; @@ -326,14 +326,14 @@ void ImplWheelWindow::MouseMove( const MouseEvent& rMEvt ) { switch( eActStyle ) { - case( PointerStyle::AutoScrollN ): mnActDeltaX = +0L; mnActDeltaY = +1L; break; - case( PointerStyle::AutoScrollS ): mnActDeltaX = +0L; mnActDeltaY = -1L; break; - case( PointerStyle::AutoScrollW ): mnActDeltaX = +1L; mnActDeltaY = +0L; break; - case( PointerStyle::AutoScrollE ): mnActDeltaX = -1L; mnActDeltaY = +0L; break; - case( PointerStyle::AutoScrollNW ): mnActDeltaX = +1L; mnActDeltaY = +1L; break; - case( PointerStyle::AutoScrollNE ): mnActDeltaX = -1L; mnActDeltaY = +1L; break; - case( PointerStyle::AutoScrollSW ): mnActDeltaX = +1L; mnActDeltaY = -1L; break; - case( PointerStyle::AutoScrollSE ): mnActDeltaX = -1L; mnActDeltaY = -1L; break; + case( PointerStyle::AutoScrollN ): mnActDeltaX = +0; mnActDeltaY = +1; break; + case( PointerStyle::AutoScrollS ): mnActDeltaX = +0; mnActDeltaY = -1; break; + case( PointerStyle::AutoScrollW ): mnActDeltaX = +1; mnActDeltaY = +0; break; + case( PointerStyle::AutoScrollE ): mnActDeltaX = -1; mnActDeltaY = +0; break; + case( PointerStyle::AutoScrollNW ): mnActDeltaX = +1; mnActDeltaY = +1; break; + case( PointerStyle::AutoScrollNE ): mnActDeltaX = -1; mnActDeltaY = +1; break; + case( PointerStyle::AutoScrollSW ): mnActDeltaX = +1; mnActDeltaY = -1; break; + case( PointerStyle::AutoScrollSE ): mnActDeltaX = -1; mnActDeltaY = -1; break; default: break; diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx index 07378386a0f6..77a29025cd78 100644 --- a/vcl/win/gdi/salbmp.cxx +++ b/vcl/win/gdi/salbmp.cxx @@ -880,7 +880,7 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( BitmapAccessMode /*nMode*/ ) } else if( ( pBIH->biBitCount == 16 ) || ( pBIH->biBitCount == 32 ) ) { - sal_uLong nOffset = 0UL; + sal_uLong nOffset = 0; if( pBIH->biCompression == BI_BITFIELDS ) { @@ -978,7 +978,7 @@ void WinSalBitmap::ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf, { nRunByte = *pRLE++; - if( nRunByte > 2UL ) + if( nRunByte > 2 ) { if( bRLE4 ) { @@ -1010,7 +1010,7 @@ void WinSalBitmap::ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf, else if( !nRunByte ) { pDIB = ( pRow += nWidthAl ); - nX = 0UL; + nX = 0; } else if( nRunByte == 1 ) bEndDecoding = TRUE; diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx index 2956fed9f6a6..2f402c1b1ecd 100644 --- a/vcl/win/gdi/salgdi.cxx +++ b/vcl/win/gdi/salgdi.cxx @@ -171,14 +171,14 @@ void ImplInitSalGDI() pBIH->biPlanes = 1; pBIH->biBitCount = 24; - for( n = 0; n < 256L; n++ ) + for( n = 0; n < 256; n++ ) pSalData->mpDitherDiff[ n ] = n - ( n & 248L ); - for( n = 0; n < 256L; n++ ) + for( n = 0; n < 256; n++ ) pSalData->mpDitherLow[ n ] = (BYTE) ( n & 248 ); - for( n = 0; n < 256L; n++ ) - pSalData->mpDitherHigh[ n ] = (BYTE) std::min( pSalData->mpDitherLow[ n ] + 8L, 255L ); + for( n = 0; n < 256; n++ ) + pSalData->mpDitherHigh[ n ] = (BYTE) std::min( pSalData->mpDitherLow[ n ] + 8, 255 ); } } else if ( (nRasterCaps & RC_PALETTE) && (nBitCount == 8) ) @@ -249,13 +249,13 @@ void ImplInitSalGDI() for( n = 0; n < nDitherPalCount; n++ ) pColors[ n ] = (short)( n + DITHER_MAX_SYSCOLOR ); - for( n = 0; n < 256L; n++ ) + for( n = 0; n < 256; n++ ) pSalData->mpDitherDiff[ n ] = n % 51L; - for( n = 0; n < 256L; n++ ) + for( n = 0; n < 256; n++ ) pSalData->mpDitherLow[ n ] = (BYTE) ( n / 51L ); - for( n = 0; n < 256L; n++ ) + for( n = 0; n < 256; n++ ) pSalData->mpDitherHigh[ n ] = (BYTE)std::min( pSalData->mpDitherLow[ n ] + 1, 5 ); } diff --git a/winaccessibility/source/UAccCOM/MAccessible.cxx b/winaccessibility/source/UAccCOM/MAccessible.cxx index fd495a1a520f..d613859c044d 100644 --- a/winaccessibility/source/UAccCOM/MAccessible.cxx +++ b/winaccessibility/source/UAccCOM/MAccessible.cxx @@ -1824,7 +1824,7 @@ STDMETHODIMP CMAccessible:: get_nActions(long __RPC_FAR *nActions) { return E_INVALIDARG; } - *nActions = 0L; + *nActions = 0; IAccessibleAction* pAcc = nullptr; HRESULT hr = QueryInterface(IID_IAccessibleAction, reinterpret_cast<void**>(&pAcc)); if( hr == S_OK ) @@ -1837,7 +1837,7 @@ STDMETHODIMP CMAccessible:: get_nActions(long __RPC_FAR *nActions) } catch(...) { - *nActions = 0L; + *nActions = 0; return S_OK; } } diff --git a/writerperfect/source/common/WPXSvInputStream.cxx b/writerperfect/source/common/WPXSvInputStream.cxx index 2c6b062d990b..ddb976b94018 100644 --- a/writerperfect/source/common/WPXSvInputStream.cxx +++ b/writerperfect/source/common/WPXSvInputStream.cxx @@ -499,12 +499,12 @@ const unsigned char *WPXSvInputStreamImpl::read(unsigned long numBytes, unsigned long WPXSvInputStreamImpl::tell() { if ((mnLength == 0) || !mxStream.is() || !mxSeekable.is()) - return -1L; + return -1; else { sal_Int64 tmpPosition = mxSeekable->getPosition(); if ((tmpPosition < 0) || (tmpPosition > LONG_MAX)) - return -1L; + return -1; return (long)tmpPosition; } } diff --git a/xmloff/source/core/nmspmap.cxx b/xmloff/source/core/nmspmap.cxx index 8f6cb4801aca..800262a71582 100644 --- a/xmloff/source/core/nmspmap.cxx +++ b/xmloff/source/core/nmspmap.cxx @@ -310,7 +310,7 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName_( const OUString& rAttrName, rtl::Reference<NameSpaceEntry> xEntry(new NameSpaceEntry()); sal_Int32 nColonPos = rAttrName.indexOf( ':' ); - if( -1L == nColonPos ) + if( -1 == nColonPos ) { // case: no ':' found -> default namespace (xEntry->sPrefix).clear(); @@ -320,7 +320,7 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName_( const OUString& rAttrName, { // normal case: ':' found -> get prefix/suffix xEntry->sPrefix = rAttrName.copy( 0L, nColonPos ); - xEntry->sName = rAttrName.copy( nColonPos + 1L ); + xEntry->sName = rAttrName.copy( nColonPos + 1 ); } if( pPrefix ) @@ -339,7 +339,7 @@ sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName_( const OUString& rAttrName, else if ( xEntry->sPrefix == sXMLNS ) // not found, but xmlns prefix: return xmlns 'namespace' nKey = xEntry->nKey = XML_NAMESPACE_XMLNS; - else if( nColonPos == -1L ) + else if( nColonPos == -1 ) // not found, and no namespace: 'namespace' none nKey = xEntry->nKey = XML_NAMESPACE_NONE; diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx index fec3e48fa4ae..1d62b4e109d0 100644 --- a/xmloff/source/core/unoatrcn.cxx +++ b/xmloff/source/core/unoatrcn.cxx @@ -64,7 +64,7 @@ sal_uInt16 SvUnoAttributeContainer::getIndexByName(const OUString& aName ) const const sal_uInt16 nAttrCount = mpContainer->GetAttrCount(); sal_Int32 nPos = aName.indexOf( ':' ); - if( nPos == -1L ) + if( nPos == -1 ) { for( sal_uInt16 nAttr = 0; nAttr < nAttrCount; nAttr++ ) { @@ -76,7 +76,7 @@ sal_uInt16 SvUnoAttributeContainer::getIndexByName(const OUString& aName ) const else { const OUString aPrefix( aName.copy( 0L, nPos ) ); - const OUString aLName( aName.copy( nPos+1L ) ); + const OUString aLName( aName.copy( nPos+1 ) ); for( sal_uInt16 nAttr = 0; nAttr < nAttrCount; nAttr++ ) { @@ -161,10 +161,10 @@ void SAL_CALL SvUnoAttributeContainer::replaceByName(const OUString& aName, cons throw container::NoSuchElementException(); sal_Int32 nPos = aName.indexOf( ':' ); - if( nPos != -1L ) + if( nPos != -1 ) { const OUString aPrefix( aName.copy( 0L, nPos )); - const OUString aLName( aName.copy( nPos+1L )); + const OUString aLName( aName.copy( nPos+1 )); if( pData->Namespace.isEmpty() ) { @@ -203,10 +203,10 @@ throw( lang::IllegalArgumentException, container::ElementExistException, lang::W throw container::ElementExistException(); sal_Int32 nPos = aName.indexOf( ':' ); - if( nPos != -1L ) + if( nPos != -1 ) { const OUString aPrefix( aName.copy( 0L, nPos )); - const OUString aLName( aName.copy( nPos+1L )); + const OUString aLName( aName.copy( nPos+1 )); if( pData->Namespace.isEmpty() ) { diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index 925d7966958d..e2e930419b2a 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.cxx @@ -334,7 +334,7 @@ const OUString& SdXMLImExTransform2D::GetExportString(const SvXMLUnitConverter& } // if not the last entry, add one space to next tag - if(a + 1UL != maList.size()) + if(a + 1 != maList.size()) { aNewString += aEmptySpace; } @@ -741,7 +741,7 @@ const OUString& SdXMLImExTransform3D::GetExportString(const SvXMLUnitConverter& } // if not the last entry, add one space to next tag - if(a + 1UL != maList.size()) + if(a + 1 != maList.size()) { aNewString += aEmptySpace; } diff --git a/xmloff/source/style/fonthdl.cxx b/xmloff/source/style/fonthdl.cxx index a5aa39b826e5..29f80c776be6 100644 --- a/xmloff/source/style/fonthdl.cxx +++ b/xmloff/source/style/fonthdl.cxx @@ -127,13 +127,13 @@ bool XMLFontFamilyNamePropHdl::exportXML( OUString& rStrExpValue, const uno::Any // Set position to the character behind the ';', so we won't // forget this. - if( -1L != nPos ) + if( -1 != nPos ) nPos++; // If the property value was empty, we stop now. // If there is a ';' at the first position, the empty name // at the start will be removed. - if( 0L == nLast ) + if( 0 == nLast ) continue; // nFirst and nLast now denote the first and last character of @@ -174,7 +174,7 @@ bool XMLFontFamilyNamePropHdl::exportXML( OUString& rStrExpValue, const uno::Any sValue.append( '\'' ); } } - while( -1L != nPos ); + while( -1 != nPos ); rStrExpValue = sValue.makeStringAndClear(); diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index f35637276c1c..f7d047f23229 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -307,7 +307,7 @@ SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl( { case XML_TOK_TEXT_LEVEL_ATTR_LEVEL: nLevel = rValue.toInt32(); - if( nLevel >= 1L ) + if( nLevel >= 1 ) nLevel--; else nLevel = 0; diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 0ba5f9ddce6f..4da6e0014424 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -768,7 +768,7 @@ OUString XMLTextParagraphExport::FindTextStyleAndHyperlink( ppAddStates++; } } - if( (aPropStates.size() - nIgnoreProps) > 0L ) + if( (aPropStates.size() - nIgnoreProps) > 0 ) { // erase the character style, otherwise the autostyle cannot be found! // erase the hyperlink, otherwise the autostyle cannot be found! diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index b37db9a9d551..31f0560192e6 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -117,7 +117,7 @@ XMLCharContext::XMLCharContext( IsXMLToken( aLocalName, XML_C ) ) { sal_Int32 nTmp = xAttrList->getValueByIndex(i).toInt32(); - if( nTmp > 0L ) + if( nTmp > 0 ) { if( nTmp > USHRT_MAX ) m_nCount = USHRT_MAX; @@ -1873,7 +1873,7 @@ XMLParaContext::XMLParaContext( case XML_TOK_TEXT_P_LEVEL: { sal_Int32 nTmp = rValue.toInt32(); - if( nTmp > 0L ) + if( nTmp > 0 ) { if( nTmp > 127 ) nTmp = 127; |