summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-12-28 21:09:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-29 19:10:41 +0100
commit388c0893a2defa4296fbad31c2add980079b4fee (patch)
tree4b53f7ea682ab8f705b891f44c03134346f9d3a7
parent8c87e3d63a6e9d498a4e5da1bcc4a10451c1a7f9 (diff)
use new toRadians function in more places
Change-Id: Id9da8dadab277b62053071a59813d7a4bd38f345 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108432 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rw-r--r--vcl/source/gdi/sallayout.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index eea91a021e6b..bf93f6bf2e3e 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -574,7 +574,7 @@ namespace cppcanvas::internal
const ::basegfx::B2DVector aOffset(
rGradient.GetOfsX() / 100.0,
rGradient.GetOfsY() / 100.0);
- double fRotation( rGradient.GetAngle().get() * M_PI / 1800.0 );
+ double fRotation = toRadians( rGradient.GetAngle() );
const double fBorder( rGradient.GetBorder() / 100.0 );
basegfx::B2DHomMatrix aRot90;
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 3ba778e09d49..cb1efa987c60 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6065,7 +6065,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
while( nAngle < 0_deg10 )
nAngle += 3600_deg10;
nAngle = nAngle % 3600_deg10;
- double fAngle = static_cast<double>(nAngle.get()) * M_PI / 1800.0;
+ double fAngle = toRadians(nAngle);
Matrix3 aRotScale;
aRotScale.scale( fXScale, 1.0 );
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index fc3338929ec5..067672dc5366 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -572,7 +572,7 @@ Point SalLayout::GetDrawPosition( const Point& rRelative ) const
if( nOldOrientation != mnOrientation )
{
nOldOrientation = mnOrientation;
- double fRad = mnOrientation.get() * (M_PI / 1800.0);
+ double fRad = toRadians(mnOrientation);
fCos = cos( fRad );
fSin = sin( fRad );
}