summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-12-23 14:09:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-24 12:00:07 +0100
commit88c0e46e139fe44f7f2a6f9fbaa6b3fd7a827a8d (patch)
treef41e0a3e856a8dd9dba6bbac7d08e62518b53420 /tools
parent17aea7c41c95186c03c173a8c6f26cd2ebce4c54 (diff)
custom literal for Degree10
Change-Id: Id13869138a622e62d9ffebf2c89bddccda6aff01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/point.cxx10
-rw-r--r--tools/source/generic/poly.cxx2
-rw-r--r--tools/source/generic/poly2.cxx2
3 files changed, 7 insertions, 7 deletions
diff --git a/tools/source/generic/point.cxx b/tools/source/generic/point.cxx
index 13171a070228..7308d25f7878 100644
--- a/tools/source/generic/point.cxx
+++ b/tools/source/generic/point.cxx
@@ -36,23 +36,23 @@ void Point::RotateAround( tools::Long& rX, tools::Long& rY,
const tools::Long nOriginX = X();
const tools::Long nOriginY = Y();
- if ( (nOrientation >= Degree10(0)) && !(nOrientation % Degree10(900)) )
+ if ( (nOrientation >= 0_deg10) && !(nOrientation % 900_deg10) )
{
- if ( nOrientation >= Degree10(3600) )
- nOrientation %= Degree10(3600);
+ if ( nOrientation >= 3600_deg10 )
+ nOrientation %= 3600_deg10;
if ( nOrientation )
{
rX -= nOriginX;
rY -= nOriginY;
- if ( nOrientation == Degree10(900) )
+ if ( nOrientation == 900_deg10 )
{
tools::Long nTemp = rX;
rX = rY;
rY = -nTemp;
}
- else if ( nOrientation == Degree10(1800) )
+ else if ( nOrientation == 1800_deg10 )
{
rX = -rX;
rY = -rY;
diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx
index f4631dfb1d86..7e09e2a75566 100644
--- a/tools/source/generic/poly.cxx
+++ b/tools/source/generic/poly.cxx
@@ -1398,7 +1398,7 @@ void Polygon::Scale( double fScaleX, double fScaleY )
void Polygon::Rotate( const Point& rCenter, Degree10 nAngle10 )
{
- nAngle10 %= Degree10(3600);
+ nAngle10 %= 3600_deg10;
if( nAngle10 )
{
diff --git a/tools/source/generic/poly2.cxx b/tools/source/generic/poly2.cxx
index 8825ad049841..285044b6fcc6 100644
--- a/tools/source/generic/poly2.cxx
+++ b/tools/source/generic/poly2.cxx
@@ -257,7 +257,7 @@ void PolyPolygon::Scale( double fScaleX, double fScaleY )
void PolyPolygon::Rotate( const Point& rCenter, Degree10 nAngle10 )
{
- nAngle10 %= Degree10(3600);
+ nAngle10 %= 3600_deg10;
if( nAngle10 )
{