summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorudareechk <udareeck@gmail.com>2017-09-27 12:05:23 +0530
committerMichael Stahl <mstahl@redhat.com>2017-10-30 15:57:00 +0100
commitf9b3a1db585e103bb93be0b5954de6858ad42c51 (patch)
tree3aabfc429b5c8e0362f0cb2216d09645dbff7428
parent4913a117f8be045b3b1e2f2ef09d7f6a85ff076b (diff)
tdf#96505 Get rid of cargo cult long integer literals
Removing unnecessary 1L occurrences Change-Id: I85d4949eacde0dfc0ff7a513f4bf42324e6d34c1 Reviewed-on: https://gerrit.libreoffice.org/42840 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r--filter/source/graphicfilter/ipcd/ipcd.cxx6
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--svx/source/sdr/contact/objectcontactofobjlistpainter.cxx2
-rw-r--r--svx/source/svdraw/svdfmtf.cxx8
-rw-r--r--svx/source/svdraw/svdocirc.cxx4
-rw-r--r--svx/source/unodraw/unoshape.cxx2
-rw-r--r--tools/source/generic/poly.cxx8
-rw-r--r--vcl/qa/cppunit/canvasbitmaptest.cxx2
-rw-r--r--vcl/source/helper/canvastools.cxx2
9 files changed, 19 insertions, 19 deletions
diff --git a/filter/source/graphicfilter/ipcd/ipcd.cxx b/filter/source/graphicfilter/ipcd/ipcd.cxx
index b83af75cec9a..d4a49be998e4 100644
--- a/filter/source/graphicfilter/ipcd/ipcd.cxx
+++ b/filter/source/graphicfilter/ipcd/ipcd.cxx
@@ -308,17 +308,17 @@ void PCDReader::ReadImage()
nL *= 89024;
nCb -= 156;
nCr -= 137;
- nRed = ( nL + nCr * 119374L + 0x8000 ) >> 16;
+ nRed = ( nL + nCr * 119374 + 0x8000 ) >> 16;
if ( nRed < 0 )
nRed = 0;
if ( nRed > 255)
nRed = 255;
- nGreen = ( nL - nCb * 28198L - nCr * 60761L + 0x8000 ) >> 16;
+ nGreen = ( nL - nCb * 28198 - nCr * 60761 + 0x8000 ) >> 16;
if ( nGreen < 0 )
nGreen = 0;
if ( nGreen > 255 )
nGreen = 255;
- nBlue = ( nL + nCb * 145352L + 0x8000 ) >> 16;
+ nBlue = ( nL + nCb * 145352 + 0x8000 ) >> 16;
if ( nBlue < 0 )
nBlue = 0;
if ( nBlue > 255 )
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 5f2dab8ec0f2..f2d424de9f02 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4763,8 +4763,8 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
nSpFlags &= ~ShapeFlag::FlipV;
}
- pRet->NbcSetPoint(aPoint1, 0L); // start point
- pRet->NbcSetPoint(aPoint2, 1L); // endpoint
+ pRet->NbcSetPoint(aPoint1, 0); // start point
+ pRet->NbcSetPoint(aPoint2, 1); // endpoint
sal_Int32 n1HorzDist, n1VertDist, n2HorzDist, n2VertDist;
n1HorzDist = n1VertDist = n2HorzDist = n2VertDist = 0;
diff --git a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
index f3362376fac1..ee202580b252 100644
--- a/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
+++ b/svx/source/sdr/contact/objectcontactofobjlistpainter.cxx
@@ -154,7 +154,7 @@ OutputDevice* ObjectContactOfObjListPainter::TryToGetOutputDevice() const
sal_uInt32 ObjectContactOfPagePainter::GetPaintObjectCount() const
{
- return (GetStartPage() ? 1L : 0L);
+ return (GetStartPage() ? 1 : 0);
}
ViewContact& ObjectContactOfPagePainter::GetPaintObjectViewContact(sal_uInt32 /*nIndex*/)
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index 60fe1ed4c867..b88a0485577b 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -793,27 +793,27 @@ bool ImpSdrGDIMetaFileImport::CheckLastLineMerge(const basegfx::B2DPolygon& rSrc
if(aDstPoly.getB2DPoint(nMaxDstPnt) == rSrcPoly.getB2DPoint(0))
{
- aDstPoly.append(rSrcPoly, 1L, rSrcPoly.count() - 1);
+ aDstPoly.append(rSrcPoly, 1, rSrcPoly.count() - 1);
bOk = true;
}
else if(aDstPoly.getB2DPoint(0) == rSrcPoly.getB2DPoint(nMaxSrcPnt))
{
basegfx::B2DPolygon aNew(rSrcPoly);
- aNew.append(aDstPoly, 1L, aDstPoly.count() - 1);
+ aNew.append(aDstPoly, 1, aDstPoly.count() - 1);
aDstPoly = aNew;
bOk = true;
}
else if(aDstPoly.getB2DPoint(0) == rSrcPoly.getB2DPoint(0))
{
aDstPoly.flip();
- aDstPoly.append(rSrcPoly, 1L, rSrcPoly.count() - 1);
+ aDstPoly.append(rSrcPoly, 1, 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() - 1);
+ aDstPoly.append(aNew, 1, aNew.count() - 1);
bOk = true;
}
}
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 6809d0cd95b5..6d93e8b04452 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -1030,9 +1030,9 @@ void SdrCircObj::NbcSetSnapRect(const tools::Rectangle& rRect)
sal_uInt32 SdrCircObj::GetSnapPointCount() const
{
if (meCircleKind==OBJ_CIRC) {
- return 1L;
+ return 1;
} else {
- return 3L;
+ return 3;
}
}
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 9b32265423c5..98bb162a0b0d 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2262,7 +2262,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
if( mpModel->IsWriter() )
aPoint += mpObj->GetAnchorPos();
- pMeasureObj->NbcSetPoint( aPoint, pProperty->nWID == OWN_ATTR_MEASURE_START_POS ? 0L : 1L );
+ pMeasureObj->NbcSetPoint( aPoint, pProperty->nWID == OWN_ATTR_MEASURE_START_POS ? 0 : 1 );
pMeasureObj->SetChanged();
pMeasureObj->BroadcastObjectChange();
return true;
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index c44c5ecf7b69..1904d85d5a9d 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1837,14 +1837,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) - 1))
+ if(nB2DLocalCount > ((0x0000ffff / 3) - 1))
{
OSL_FAIL("Polygon::Polygon: Too many points in given B2DPolygon, need to reduce hard to maximum of tools Polygon (!)");
- nB2DLocalCount = ((0x0000ffff / 3L) - 1);
+ nB2DLocalCount = ((0x0000ffff / 3) - 1);
}
// calculate target point count
- const sal_uInt32 nLoopCount(bClosed ? nB2DLocalCount : (nB2DLocalCount ? nB2DLocalCount - 1 : 0L ));
+ const sal_uInt32 nLoopCount(bClosed ? nB2DLocalCount : (nB2DLocalCount ? nB2DLocalCount - 1 : 0 ));
if(nLoopCount)
{
@@ -1940,7 +1940,7 @@ Polygon::Polygon(const basegfx::B2DPolygon& rPolygon)
if(nB2DLocalCount)
{
// point list creation
- const sal_uInt32 nTargetCount(nB2DLocalCount + (bClosed ? 1L : 0L));
+ const sal_uInt32 nTargetCount(nB2DLocalCount + (bClosed ? 1 : 0));
mpImplPolygon = new ImplPolygon( static_cast< sal_uInt16 >(nTargetCount) );
sal_uInt16 nIndex(0);
diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx
index 734e3ca28fed..f8ad6160d256 100644
--- a/vcl/qa/cppunit/canvasbitmaptest.cxx
+++ b/vcl/qa/cppunit/canvasbitmaptest.cxx
@@ -190,7 +190,7 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp,
CPPUNIT_ASSERT_MESSAGE( "8bit or less: missing palette",
xPal.is());
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Palette incorrect entry count",
- static_cast<sal_Int32>(1L << nOriginalDepth), xPal->getNumberOfEntries());
+ static_cast<sal_Int32>(1 << nOriginalDepth), xPal->getNumberOfEntries());
uno::Sequence<double> aIndex;
CPPUNIT_ASSERT_MESSAGE( "Palette is not read-only",
!xPal->setIndex(aIndex,true,0));
diff --git a/vcl/source/helper/canvastools.cxx b/vcl/source/helper/canvastools.cxx
index ef2732c6443c..8920265af010 100644
--- a/vcl/source/helper/canvastools.cxx
+++ b/vcl/source/helper/canvastools.cxx
@@ -293,7 +293,7 @@ namespace vcl
aAlpha = ::Bitmap( aPixelSize,
sal::static_int_cast<sal_uInt16>(nAlphaDepth),
&::Bitmap::GetGreyPalette(
- sal::static_int_cast<sal_uInt16>(1L << nAlphaDepth)) );
+ sal::static_int_cast<sal_uInt16>(1 << nAlphaDepth)) );
{ // limit scoped access
Bitmap::ScopedWriteAccess pWriteAccess( aBitmap );