summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorOnur Yilmaz <onuryilmaz0750@gmail.com>2020-01-27 12:04:16 +0300
committerStephan Bergmann <sbergman@redhat.com>2020-01-28 14:54:10 +0100
commit2065cbf576e7d3257e7da2151419404928326df3 (patch)
tree6158b349b13e2270d6f6bff9a6bd02ee6543f2e7 /svx
parent6dc77b9f16e0b3fba6f801a3c307786a7c8a8ddd (diff)
tdf#96505: Get rid of cargo cult long integer literals
I checked return values. Long variables didn't affect the calculation. Change-Id: I1d5b5cffa291c20f7940dc14efa05cc64f3ff1ed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87499 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/_bmpmask.cxx2
-rw-r--r--svx/source/dialog/_contdlg.cxx2
-rw-r--r--svx/source/dialog/framelinkarray.cxx8
-rw-r--r--svx/source/sdr/animation/scheduler.cxx2
-rw-r--r--svx/source/sdr/contact/viewcontactofsdrobj.cxx2
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofpageobj.cxx4
-rw-r--r--svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx4
7 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 38c931434fd2..27c5d3a4de07 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -676,7 +676,7 @@ GDIMetaFile SvxBmpMask::ImpMask( const GDIMetaFile& rMtf )
// Prepare Color comparison array
for( i = 0; i < nCount; i++ )
{
- long nTol = ( pTols[i] * 255L ) / 100L;
+ long nTol = ( pTols[i] * 255 ) / 100;
long nVal = static_cast<long>(pSrcCols[i].GetRed());
pMinR[i] = std::max( nVal - nTol, 0L );
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 1ca714868c17..fe08cad1fed7 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -631,7 +631,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void )
if( aGraphic.GetType() == GraphicType::Bitmap )
{
const Bitmap & rBmp( aGraphic.GetBitmapEx().GetBitmap() );
- const long nTol = static_cast<long>(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255L / 100L);
+ const long nTol = static_cast<long>(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255 / 100);
aMask = rBmp.CreateMask( rColor, nTol );
diff --git a/svx/source/dialog/framelinkarray.cxx b/svx/source/dialog/framelinkarray.cxx
index c94bd5817233..752778bff896 100644
--- a/svx/source/dialog/framelinkarray.cxx
+++ b/svx/source/dialog/framelinkarray.cxx
@@ -246,10 +246,10 @@ ArrayImpl::ArrayImpl( size_t nWidth, size_t nHeight ) :
{
// default-construct all vectors
maCells.resize( mnWidth * mnHeight );
- maWidths.resize( mnWidth, 0L );
- maHeights.resize( mnHeight, 0L );
- maXCoords.resize( mnWidth + 1, 0L );
- maYCoords.resize( mnHeight + 1, 0L );
+ maWidths.resize( mnWidth, 0 );
+ maHeights.resize( mnHeight, 0 );
+ maXCoords.resize( mnWidth + 1, 0 );
+ maYCoords.resize( mnHeight + 1, 0 );
}
const Cell& ArrayImpl::GetCell( size_t nCol, size_t nRow ) const
diff --git a/svx/source/sdr/animation/scheduler.cxx b/svx/source/sdr/animation/scheduler.cxx
index a9e93d01ce45..0efac9e6fac0 100644
--- a/svx/source/sdr/animation/scheduler.cxx
+++ b/svx/source/sdr/animation/scheduler.cxx
@@ -100,7 +100,7 @@ namespace sdr::animation
{
mnDeltaTime = mvEvents.front()->GetTime() - mnTime;
- if(0L != mnDeltaTime)
+ if(0 != mnDeltaTime)
{
SetTimeout(mnDeltaTime);
Start();
diff --git a/svx/source/sdr/contact/viewcontactofsdrobj.cxx b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
index cf5bd082f74e..72025557c5f0 100644
--- a/svx/source/sdr/contact/viewcontactofsdrobj.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrobj.cxx
@@ -72,7 +72,7 @@ sal_uInt32 ViewContactOfSdrObj::GetObjectCount() const
return GetSdrObject().GetSubList()->GetObjCount();
}
- return 0L;
+ return 0;
}
ViewContact& ViewContactOfSdrObj::GetViewContact(sal_uInt32 nIndex) const
diff --git a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
index 5da45eabed5c..aac38032875b 100644
--- a/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofpageobj.cxx
@@ -229,11 +229,11 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageObj::crea
const basegfx::B2DPolygon aOutline(basegfx::utils::createPolygonFromRect(aPageBound));
// add replacement fill
- xPageContent[0L] = drawinglayer::primitive2d::Primitive2DReference(
+ xPageContent[0] = drawinglayer::primitive2d::Primitive2DReference(
new drawinglayer::primitive2d::PolyPolygonColorPrimitive2D(basegfx::B2DPolyPolygon(aOutline), aDocColor.getBColor()));
// add replacement border
- xPageContent[1L] = drawinglayer::primitive2d::Primitive2DReference(
+ xPageContent[1] = drawinglayer::primitive2d::Primitive2DReference(
new drawinglayer::primitive2d::PolygonHairlinePrimitive2D(aOutline, aBorderColor.getBColor()));
}
else
diff --git a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
index 1e6102f114dc..fc9c06959044 100644
--- a/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofsdrpage.cxx
@@ -464,8 +464,8 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContactOfPageGrid::cre
const Size aFine(rView.GetGridFine());
const double fWidthX(aRaw.getWidth());
const double fWidthY(aRaw.getHeight());
- const sal_uInt32 nSubdivisionsX(aFine.getWidth() ? aRaw.getWidth() / aFine.getWidth() : 0L);
- const sal_uInt32 nSubdivisionsY(aFine.getHeight() ? aRaw.getHeight() / aFine.getHeight() : 0L);
+ const sal_uInt32 nSubdivisionsX(aFine.getWidth() ? aRaw.getWidth() / aFine.getWidth() : 0);
+ const sal_uInt32 nSubdivisionsY(aFine.getHeight() ? aRaw.getHeight() / aFine.getHeight() : 0);
xRetval.resize(1);
xRetval[0] = drawinglayer::primitive2d::Primitive2DReference(new drawinglayer::primitive2d::GridPrimitive2D(