summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/qa/cppunit/test_rectangle.cxx24
-rw-r--r--tools/source/generic/gen.cxx4
-rw-r--r--tools/source/generic/point.cxx22
3 files changed, 25 insertions, 25 deletions
diff --git a/tools/qa/cppunit/test_rectangle.cxx b/tools/qa/cppunit/test_rectangle.cxx
index c4b321d388eb..4729d3140df4 100644
--- a/tools/qa/cppunit/test_rectangle.cxx
+++ b/tools/qa/cppunit/test_rectangle.cxx
@@ -32,28 +32,28 @@ void Test::test_rectangle()
{
tools::Rectangle aRect(1,1,1,1);
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetWidth());
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetHeight());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aRect.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aRect.GetHeight());
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.getWidth());
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.getHeight());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aRect.getWidth());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aRect.getHeight());
}
{
tools::Rectangle aRect(Point(), Size(1,1));
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.Left());
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.Top());
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.Right());
- CPPUNIT_ASSERT_EQUAL(long(0), aRect.Bottom());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aRect.Left());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aRect.Top());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aRect.Right());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aRect.Bottom());
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetWidth());
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetHeight());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aRect.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aRect.GetHeight());
aRect.setX(12);
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetHeight());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aRect.GetHeight());
aRect.setY(12);
- CPPUNIT_ASSERT_EQUAL(long(1), aRect.GetWidth());
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aRect.GetWidth());
}
}
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;
}
}