summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorOnur Yilmaz <onuryilmaz0750@gmail.com>2020-01-27 12:20:31 +0300
committerStephan Bergmann <sbergman@redhat.com>2020-01-28 17:00:45 +0100
commit4a88e0c6e90c1c2cba33b8626564429f54b74c0b (patch)
treeb275462c04ac2b19d4f4a6fef9174abb3550e36b /svx
parentece847579e606efc0398c01b5a91101111623935 (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')
-rw-r--r--svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx2
-rw-r--r--svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx4
-rw-r--r--svx/source/stbctrls/pszctrl.cxx2
-rw-r--r--svx/source/svdraw/svdedtv1.cxx2
-rw-r--r--svx/source/svdraw/svdedtv2.cxx2
-rw-r--r--svx/source/svdraw/svdmark.cxx2
-rw-r--r--svx/source/svdraw/svdopath.cxx6
-rw-r--r--svx/source/svdraw/svdotextdecomposition.cxx8
-rw-r--r--svx/source/svdraw/svdotextpathdecomposition.cxx2
-rw-r--r--svx/source/svdraw/svdpagv.cxx2
-rw-r--r--svx/source/svdraw/svdxcgv.cxx2
-rw-r--r--svx/source/unodraw/unoshape.cxx2
12 files changed, 18 insertions, 18 deletions
diff --git a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
index d09c03dff575..76b5aa716330 100644
--- a/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrellipseprimitive2d.cxx
@@ -153,7 +153,7 @@ namespace drawinglayer::primitive2d
{
// for compatibility, insert the center point at polygon start to get the same
// line stroking pattern as the old painting mechanisms.
- aUnitOutline.insert(0L, basegfx::B2DPoint(0.0, 0.0));
+ aUnitOutline.insert(0, basegfx::B2DPoint(0.0, 0.0));
}
aUnitOutline.setClosed(true);
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index 837df2f3bc13..4de23bd5c780 100644
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
@@ -51,7 +51,7 @@ namespace drawinglayer::primitive2d
}
// add graphic content
- if(255L != getGraphicAttr().GetTransparency())
+ if(255 != getGraphicAttr().GetTransparency())
{
// standard graphic fill
const Primitive2DReference xGraphicContentPrimitive(
@@ -158,7 +158,7 @@ namespace drawinglayer::primitive2d
bool SdrGrafPrimitive2D::isTransparent() const
{
- return ((0L != getGraphicAttr().GetTransparency())
+ return ((0 != getGraphicAttr().GetTransparency())
|| (getGraphicObject().IsTransparent()));
}
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx
index d55b895af65c..8d2c4110863d 100644
--- a/svx/source/stbctrls/pszctrl.cxx
+++ b/svx/source/stbctrls/pszctrl.cxx
@@ -70,7 +70,7 @@ OUString SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal )
OUString sMetric;
const sal_Unicode cSep = Application::GetSettings().GetLocaleDataWrapper().getNumDecimalSep()[0];
- sal_Int64 nConvVal = MetricField::ConvertValue( nVal * 100, 0L, 0, FieldUnit::MM_100TH, eOutUnit );
+ sal_Int64 nConvVal = MetricField::ConvertValue( nVal * 100, 0, 0, FieldUnit::MM_100TH, eOutUnit );
if ( nConvVal < 0 && ( nConvVal / 100 == 0 ) )
sMetric += "-";
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 ");
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 835c2e61d6d6..d765654a4716 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2827,7 +2827,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
if(pPageObj)
{
SdrPage* pPage = pPageObj->GetReferencedPage();
- sal_Int32 nPageNumber = pPage ? pPage->GetPageNum() : 0L;
+ sal_Int32 nPageNumber = pPage ? pPage->GetPageNum() : 0;
nPageNumber++;
nPageNumber >>= 1;
rValue <<= nPageNumber;