[Libreoffice-commits] core.git: svx/source
apurvapriyadarshi
apriyadarshi.1995 at gmail.com
Tue Jun 14 13:49:03 UTC 2016
svx/source/svdraw/gradtrns.cxx | 70 ++++++++++++++++++++---------------------
1 file changed, 35 insertions(+), 35 deletions(-)
New commits:
commit 4537a027c5c734e094191d01a46c2da734dbfe5b
Author: apurvapriyadarshi <apriyadarshi.1995 at gmail.com>
Date: Sun May 29 15:43:56 2016 +0530
tdf#96505 Get rid of cargo cult long integer literals
removed 0L and make it 0
Change-Id: I7adf48009bf67c2cf0ac43cc05285075bb1d85ce
Reviewed-on: https://gerrit.libreoffice.org/25600
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Mark Page <aptitude at btconnect.com>
Reviewed-by: jan iversen <jani at documentfoundation.org>
Tested-by: jan iversen <jani at documentfoundation.org>
diff --git a/svx/source/svdraw/gradtrns.cxx b/svx/source/svdraw/gradtrns.cxx
index e9cbb38..0ea08d9 100644
--- a/svx/source/svdraw/gradtrns.cxx
+++ b/svx/source/svdraw/gradtrns.cxx
@@ -253,17 +253,17 @@ void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, Grad
const double fFullLen(aFullVec.getLength());
const double fOldLen(aOldVec.getLength());
const double fNewBorder((fFullLen * 100.0) / fOldLen);
- sal_Int32 nNewBorder(100L - FRound(fNewBorder));
+ sal_Int32 nNewBorder(100 - FRound(fNewBorder));
// clip
- if(nNewBorder < 0L)
+ if(nNewBorder < 0)
{
- nNewBorder = 0L;
+ nNewBorder = 0;
}
- if(nNewBorder > 100L)
+ if(nNewBorder > 100)
{
- nNewBorder = 100L;
+ nNewBorder = 100;
}
// set
@@ -287,14 +287,14 @@ void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, Grad
sal_Int32 nNewBorder = 100 - FRound(fNewBorder);
// clip
- if(nNewBorder < 0L)
+ if(nNewBorder < 0)
{
- nNewBorder = 0L;
+ nNewBorder = 0;
}
- if(nNewBorder > 100L)
+ if(nNewBorder > 100)
{
- nNewBorder = 100L;
+ nNewBorder = 100;
}
// set
@@ -342,24 +342,24 @@ void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, Grad
sal_Int32 nNewYOffset(FRound((aOffset.getY() * 100.0) / aRange.getHeight()));
// clip
- if(nNewXOffset < 0L)
+ if(nNewXOffset < 0)
{
- nNewXOffset = 0L;
+ nNewXOffset = 0;
}
- if(nNewXOffset > 100L)
+ if(nNewXOffset > 100)
{
- nNewXOffset = 100L;
+ nNewXOffset = 100;
}
- if(nNewYOffset < 0L)
+ if(nNewYOffset < 0)
{
- nNewYOffset = 0L;
+ nNewYOffset = 0;
}
- if(nNewYOffset > 100L)
+ if(nNewYOffset > 100)
{
- nNewYOffset = 100L;
+ nNewYOffset = 100;
}
rG.aGradient.SetXOffset((sal_uInt16)nNewXOffset);
@@ -378,17 +378,17 @@ void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, Grad
const double fFullLen(aFullVec.getLength());
const double fOldLen(aOldVec.getLength());
const double fNewBorder((fFullLen * 100.0) / fOldLen);
- sal_Int32 nNewBorder(100L - FRound(fNewBorder));
+ sal_Int32 nNewBorder(100 - FRound(fNewBorder));
// clip
- if(nNewBorder < 0L)
+ if(nNewBorder < 0)
{
- nNewBorder = 0L;
+ nNewBorder = 0;
}
- if(nNewBorder > 100L)
+ if(nNewBorder > 100)
{
- nNewBorder = 100L;
+ nNewBorder = 100;
}
// set
@@ -438,24 +438,24 @@ void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, Grad
sal_Int32 nNewYOffset(FRound((aOffset.getY() * 100.0) / aRange.getHeight()));
// clip
- if(nNewXOffset < 0L)
+ if(nNewXOffset < 0)
{
- nNewXOffset = 0L;
+ nNewXOffset = 0;
}
- if(nNewXOffset > 100L)
+ if(nNewXOffset > 100)
{
- nNewXOffset = 100L;
+ nNewXOffset = 100;
}
- if(nNewYOffset < 0L)
+ if(nNewYOffset < 0)
{
- nNewYOffset = 0L;
+ nNewYOffset = 0;
}
- if(nNewYOffset > 100L)
+ if(nNewYOffset > 100)
{
- nNewYOffset = 100L;
+ nNewYOffset = 100;
}
rG.aGradient.SetXOffset((sal_uInt16)nNewXOffset);
@@ -474,17 +474,17 @@ void GradTransformer::VecToGrad(GradTransVector& rV, GradTransGradient& rG, Grad
const double fFullLen(aFullVec.getLength());
const double fOldLen(aOldVec.getLength());
const double fNewBorder((fFullLen * 100.0) / fOldLen);
- sal_Int32 nNewBorder(100L - FRound(fNewBorder));
+ sal_Int32 nNewBorder(100 - FRound(fNewBorder));
// clip
- if(nNewBorder < 0L)
+ if(nNewBorder < 0)
{
- nNewBorder = 0L;
+ nNewBorder = 0;
}
- if(nNewBorder > 100L)
+ if(nNewBorder > 100)
{
- nNewBorder = 100L;
+ nNewBorder = 100;
}
// set
More information about the Libreoffice-commits
mailing list