diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-19 20:04:22 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-19 19:33:53 +0100 |
commit | 7ff2c9cfc5fa8c261b1f7f959172f60255fcf617 (patch) | |
tree | 97f31f71314f88e81c99a66d205b951f3ddf2d47 /svx/source | |
parent | f8790b1d586b3865cfdc56e8f4cdab55a8617769 (diff) |
Use more basegfx::deg2rad<N> and basegfx::rad2deg<N>
Change-Id: I9dc57628b98f67994d546f6887e96389be1efe62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125568
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/dialcontrol.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index 0a62215fd60e..fe88a426649d 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -452,7 +452,7 @@ void DialControl::HandleMouseEvent( const Point& rPos, bool bInitial ) if( fH != 0.0 ) { double fAngle = acos( nX / fH ); - sal_Int32 nAngle = static_cast<sal_Int32>(basegfx::rad2deg(fAngle) * 100.0); + sal_Int32 nAngle = basegfx::rad2deg<100>(fAngle); if( nY < 0 ) nAngle = 36000 - nAngle; if( bInitial ) // round to entire 15 degrees diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 30c5524288e9..91a0870630e0 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1562,8 +1562,8 @@ bool SdrTextObj::IsTopToBottom() const bool SdrTextObj::TRGetBaseGeometry(basegfx::B2DHomMatrix& rMatrix, basegfx::B2DPolyPolygon& /*rPolyPolygon*/) const { // get turn and shear - double fRotate = basegfx::deg2rad(maGeo.nRotationAngle.get() / 100.0); - double fShearX = basegfx::deg2rad(maGeo.nShearAngle.get() / 100.0); + double fRotate = toRadians(maGeo.nRotationAngle); + double fShearX = toRadians(maGeo.nShearAngle); // get aRect, this is the unrotated snaprect tools::Rectangle aRectangle(maRect); |