summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/generic/point.cxx16
-rw-r--r--tools/source/generic/poly.cxx6
-rw-r--r--tools/source/generic/poly2.cxx6
3 files changed, 14 insertions, 14 deletions
diff --git a/tools/source/generic/point.cxx b/tools/source/generic/point.cxx
index c38e0f183451..13171a070228 100644
--- a/tools/source/generic/point.cxx
+++ b/tools/source/generic/point.cxx
@@ -21,7 +21,7 @@
#include <basegfx/numeric/ftools.hxx>
void Point::RotateAround( Point& rPoint,
- short nOrientation ) const
+ Degree10 nOrientation ) const
{
tools::Long nX = rPoint.X();
tools::Long nY = rPoint.Y();
@@ -31,28 +31,28 @@ void Point::RotateAround( Point& rPoint,
}
void Point::RotateAround( tools::Long& rX, tools::Long& rY,
- short nOrientation ) const
+ Degree10 nOrientation ) const
{
const tools::Long nOriginX = X();
const tools::Long nOriginY = Y();
- if ( (nOrientation >= 0) && !(nOrientation % 900) )
+ if ( (nOrientation >= Degree10(0)) && !(nOrientation % Degree10(900)) )
{
- if ( nOrientation >= 3600 )
- nOrientation %= 3600;
+ if ( nOrientation >= Degree10(3600) )
+ nOrientation %= Degree10(3600);
if ( nOrientation )
{
rX -= nOriginX;
rY -= nOriginY;
- if ( nOrientation == 900 )
+ if ( nOrientation == Degree10(900) )
{
tools::Long nTemp = rX;
rX = rY;
rY = -nTemp;
}
- else if ( nOrientation == 1800 )
+ else if ( nOrientation == Degree10(1800) )
{
rX = -rX;
rY = -rY;
@@ -70,7 +70,7 @@ void Point::RotateAround( tools::Long& rX, tools::Long& rY,
}
else
{
- double nRealOrientation = nOrientation*F_PI1800;
+ double nRealOrientation = nOrientation.get() * F_PI1800;
double nCos = cos( nRealOrientation );
double nSin = sin( nRealOrientation );
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index 7e972714ad2a..c25783764f27 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1395,13 +1395,13 @@ void Polygon::Scale( double fScaleX, double fScaleY )
}
}
-void Polygon::Rotate( const Point& rCenter, sal_uInt16 nAngle10 )
+void Polygon::Rotate( const Point& rCenter, Degree10 nAngle10 )
{
- nAngle10 %= 3600;
+ nAngle10 %= Degree10(3600);
if( nAngle10 )
{
- const double fAngle = F_PI1800 * nAngle10;
+ const double fAngle = F_PI1800 * nAngle10.get();
Rotate( rCenter, sin( fAngle ), cos( fAngle ) );
}
}
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index a1c4fe0cbe69..2534fb63b029 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -254,13 +254,13 @@ void PolyPolygon::Scale( double fScaleX, double fScaleY )
mpImplPolyPolygon->mvPolyAry[ i ].Scale( fScaleX, fScaleY );
}
-void PolyPolygon::Rotate( const Point& rCenter, sal_uInt16 nAngle10 )
+void PolyPolygon::Rotate( const Point& rCenter, Degree10 nAngle10 )
{
- nAngle10 %= 3600;
+ nAngle10 %= Degree10(3600);
if( nAngle10 )
{
- const double fAngle = F_PI1800 * nAngle10;
+ const double fAngle = F_PI1800 * nAngle10.get();
Rotate( rCenter, sin( fAngle ), cos( fAngle ) );
}
}