summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-01-26 09:50:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-04-03 10:37:51 +0200
commit8bc951daf79decbd8a599a409c6d33c5456710e0 (patch)
tree61d220d83e90a176fbcbe667827eee4b9631a4ca /tools/source
parent10eefdfa6c0250c6069e641e404f34e5a91fe993 (diff)
long->sal_Int32 in tools/gen.hxx
which triggered a lot of changes in sw/ Change-Id: Ia2aa22ea3f76463a85ea077a411246fcfed00bf6 Reviewed-on: https://gerrit.libreoffice.org/48806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/generic/gen.cxx4
-rw-r--r--tools/source/generic/point.cxx22
2 files changed, 13 insertions, 13 deletions
diff --git a/tools/source/generic/gen.cxx b/tools/source/generic/gen.cxx
index ea855f98e9f0..a7c649cecd7d 100644
--- a/tools/source/generic/gen.cxx
+++ b/tools/source/generic/gen.cxx
@@ -85,13 +85,13 @@ void tools::Rectangle::SaturatingSetSize(const Size& rSize)
nBottom = RECT_EMPTY;
}
-void tools::Rectangle::SaturatingSetX(long x)
+void tools::Rectangle::SaturatingSetX(sal_Int32 x)
{
nRight = o3tl::saturating_add(nRight, x - nLeft);
nLeft = x;
}
-void tools::Rectangle::SaturatingSetY(long y)
+void tools::Rectangle::SaturatingSetY(sal_Int32 y)
{
nBottom = o3tl::saturating_add(nBottom, y - nTop);
nTop = y;
diff --git a/tools/source/generic/point.cxx b/tools/source/generic/point.cxx
index 1b470c6065ec..7530baf4fdc9 100644
--- a/tools/source/generic/point.cxx
+++ b/tools/source/generic/point.cxx
@@ -25,18 +25,18 @@
void Point::RotateAround( Point& rPoint,
short nOrientation ) const
{
- long nX = rPoint.X();
- long nY = rPoint.Y();
+ sal_Int32 nX = rPoint.X();
+ sal_Int32 nY = rPoint.Y();
RotateAround(nX, nY, nOrientation);
rPoint.setX(nX);
rPoint.setY(nY);
}
-void Point::RotateAround( long& rX, long& rY,
+void Point::RotateAround( sal_Int32& rX, sal_Int32& rY,
short nOrientation ) const
{
- const long nOriginX = X();
- const long nOriginY = Y();
+ const sal_Int32 nOriginX = X();
+ const sal_Int32 nOriginY = Y();
if ( (nOrientation >= 0) && !(nOrientation % 900) )
{
@@ -50,7 +50,7 @@ void Point::RotateAround( long& rX, long& rY,
if ( nOrientation == 900 )
{
- long nTemp = rX;
+ sal_Int32 nTemp = rX;
rX = rY;
rY = -nTemp;
}
@@ -61,7 +61,7 @@ void Point::RotateAround( long& rX, long& rY,
}
else /* ( nOrientation == 2700 ) */
{
- long nTemp = rX;
+ sal_Int32 nTemp = rX;
rX = -rY;
rY = nTemp;
}
@@ -77,12 +77,12 @@ void Point::RotateAround( long& rX, long& rY,
double nSin = sin( nRealOrientation );
// Translation...
- long nX = rX-nOriginX;
- long nY = rY-nOriginY;
+ sal_Int32 nX = rX-nOriginX;
+ sal_Int32 nY = rY-nOriginY;
// Rotation...
- rX = + static_cast<long>(nCos*nX + nSin*nY) + nOriginX;
- rY = - static_cast<long>(nSin*nX - nCos*nY) + nOriginY;
+ rX = + static_cast<sal_Int32>(nCos*nX + nSin*nY) + nOriginX;
+ rY = - static_cast<sal_Int32>(nSin*nX - nCos*nY) + nOriginY;
}
}