diff options
author | Onur Yilmaz <onuryilmaz0750@gmail.com> | 2020-01-27 12:20:31 +0300 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-01-28 17:00:45 +0100 |
commit | 4a88e0c6e90c1c2cba33b8626564429f54b74c0b (patch) | |
tree | b275462c04ac2b19d4f4a6fef9174abb3550e36b /svx/source/svdraw | |
parent | ece847579e606efc0398c01b5a91101111623935 (diff) |
tdf#96505: Get rid of cargo cult long integer literals
I checked return values.
Long variables didn't affect the calculation.
Change-Id: I0c33c20b872ff6b1dc6c87c4032ccf19705db8e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87503
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdedtv1.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv2.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdmark.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextpathdecomposition.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdpagv.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdxcgv.cxx | 2 |
8 files changed, 13 insertions, 13 deletions
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index cf29f4a268df..35676d9faaf2 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -522,7 +522,7 @@ void SdrEditView::ImpCrookObj(SdrObject* pO, const Point& rRef, const Point& rRa bDone = true; } - if(!bDone && !pPath && pO->IsPolyObj() && 0L != pO->GetPointCount()) + if(!bDone && !pPath && pO->IsPolyObj() && 0 != pO->GetPointCount()) { // for PolyObj's, but NOT for SdrPathObj's, e.g. the measurement object sal_uInt32 nPointCount(pO->GetPointCount()); diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 72a743fda6c8..8736da464544 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -1351,7 +1351,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly) // involved polygon data to curve segments, even if not necessary. // It is better to try to reduce to more simple polygons. basegfx::B2DPolyPolygon aTmpPoly(basegfx::utils::simplifyCurveSegments(ImpGetPolyPolygon(pObj))); - aPolyPolygon.insert(0L, aTmpPoly); + aPolyPolygon.insert(0, aTmpPoly); if(!pInsOL) { diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index 6f07641c1953..cce452b5b702 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -44,7 +44,7 @@ void SdrMark::setTime() { TimeValue aNow; osl_getSystemTime(&aNow); - mnTimeStamp = sal_Int64(aNow.Seconds) * 1000000000L + aNow.Nanosec; + mnTimeStamp = sal_Int64(aNow.Seconds) * 1000000000 + aNow.Nanosec; } SdrMark::SdrMark(SdrObject* pNewObj, SdrPageView* pNewPageView) diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index a897887ec708..b333c3023928 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1542,7 +1542,7 @@ basegfx::B2DPolyPolygon ImpPathForDragAndCreate::TakeObjectPolyPolygon(const Sdr const sal_uInt32 nChangeIndex(aNewPolygon.count() - 2); const basegfx::B2DPoint aSavedPrevCtrlPoint(aNewPolygon.getPrevControlPoint(nChangeIndex)); - aNewPolygon.remove(nChangeIndex, 2L); + aNewPolygon.remove(nChangeIndex, 2); aNewPolygon.append(pU->GetFormPoly().getB2DPolygon()); if(nChangeIndex < aNewPolygon.count()) @@ -2538,7 +2538,7 @@ sal_uInt32 SdrPathObj::NbcInsPoint(const Point& rPos, bool bNewObj) if(bBefore) { // before first point - aCandidate.insert(0L, aTestPoint); + aCandidate.insert(0, aTestPoint); if(aCandidate.areControlPointsUsed()) { @@ -2655,7 +2655,7 @@ SdrObject* SdrPathObj::RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index) if(nPointCount >= 3 && nPnt != 0 && nPnt + 1 < nPointCount) { // split in two objects at point nPnt - basegfx::B2DPolygon aSplitPolyA(aCandidate, 0L, nPnt + 1); + basegfx::B2DPolygon aSplitPolyA(aCandidate, 0, nPnt + 1); SetPathPoly(basegfx::B2DPolyPolygon(aSplitPolyA)); pNewObj = CloneSdrObject(getSdrModelFromSdrObject()); diff --git a/svx/source/svdraw/svdotextdecomposition.cxx b/svx/source/svdraw/svdotextdecomposition.cxx index ff3b839710b2..541827536223 100644 --- a/svx/source/svdraw/svdotextdecomposition.cxx +++ b/svx/source/svdraw/svdotextdecomposition.cxx @@ -1236,7 +1236,7 @@ void SdrTextObj::impGetBlinkTextTiming(drawinglayer::animation::AnimationEntryLi rAnimList.append(aLoop); // add stopped state if loop is not endless - if(0L != nRepeat) + if(0 != nRepeat) { bool bVisibleWhenStopped(rSet.Get(SDRATTR_TEXT_ANISTOPINSIDE).GetValue()); drawinglayer::animation::AnimationEntryFixed aStop(ENDLESS_TIME, bVisibleWhenStopped ? 0.0 : 1.0); @@ -1263,7 +1263,7 @@ static void impCreateScrollTiming(const SfxItemSet& rSet, drawinglayer::animatio aLoop.append(aThrough); rAnimList.append(aLoop); - if(0L != nRepeat && bVisibleWhenStopped) + if(0 != nRepeat && bVisibleWhenStopped) { // move from outside to center drawinglayer::animation::AnimationEntryLinear aOutIn(fTimeFullPath * 0.5, fFrequency, bForward ? 0.0 : 1.0, 0.5); @@ -1325,7 +1325,7 @@ static void impCreateAlternateTiming(const SfxItemSet& rSet, drawinglayer::anima rAnimList.append(aTime1); } - if(0L != nRepeat) + if(0 != nRepeat) { bool bVisibleWhenStopped(rSet.Get(SDRATTR_TEXT_ANISTOPINSIDE).GetValue()); if(bVisibleWhenStopped) @@ -1365,7 +1365,7 @@ static void impCreateSlideTiming(const SfxItemSet& rSet, drawinglayer::animation } // always visible when stopped, so add timing for staying at the end when not endless - if(0L != nRepeat) + if(0 != nRepeat) { drawinglayer::animation::AnimationEntryFixed aEnd(ENDLESS_TIME, 0.5); rAnimList.append(aEnd); diff --git a/svx/source/svdraw/svdotextpathdecomposition.cxx b/svx/source/svdraw/svdotextpathdecomposition.cxx index 9b1cce14f361..52081470f2c3 100644 --- a/svx/source/svdraw/svdotextpathdecomposition.cxx +++ b/svx/source/svdraw/svdotextpathdecomposition.cxx @@ -222,7 +222,7 @@ namespace if(pCandidate && pCandidate->getTextLength()) { aTextLayouter.setFont(pCandidate->getFont()); - fRetval += pCandidate->getDisplayLength(0L, pCandidate->getTextLength()); + fRetval += pCandidate->getDisplayLength(0, pCandidate->getTextLength()); } } diff --git a/svx/source/svdraw/svdpagv.cxx b/svx/source/svdraw/svdpagv.cxx index 2daa1961b598..ad8e3a94c295 100644 --- a/svx/source/svdraw/svdpagv.cxx +++ b/svx/source/svdraw/svdpagv.cxx @@ -500,7 +500,7 @@ void SdrPageView::DrawPageViewGrid(OutputDevice& rOut, const tools::Rectangle& r { DrawGridFlags nGridFlags = ( bHoriSolid ? DrawGridFlags::HorzLines : DrawGridFlags::Dots ); sal_uInt16 nSteps = sal_uInt16(nx1 / nx2); - sal_uInt32 nRestPerStepMul1000 = nSteps ? ( ((nx1 * 1000L)/ nSteps) - (nx2 * 1000L) ) : 0; + sal_uInt32 nRestPerStepMul1000 = nSteps ? ( ((nx1 * 1000)/ nSteps) - (nx2 * 1000) ) : 0; sal_uInt32 nStepOffset = 0; sal_uInt16 nPointOffset = 0; diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index f18d536b7bf2..5641e0c73a2d 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -371,7 +371,7 @@ bool SdrExchangeView::Paste( // New mechanism to re-create the connections of cloned connectors aCloneList.CopyConnections(); - if(0L != nCloneErrCnt) + if(0 != nCloneErrCnt) { #ifdef DBG_UTIL OStringBuffer aStr("SdrExchangeView::Paste(): Error when cloning "); |