From 11e52fe2979b0947814a49b9c17ec373795cbf8e Mon Sep 17 00:00:00 2001 From: Noel Date: Tue, 22 Dec 2020 15:42:08 +0200 Subject: introduce Degree100 strong_int type Change-Id: I78f837a1340be0ca5c49097f543a481b7b43a632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108367 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/customshapes/EnhancedCustomShape2d.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'svx/source/customshapes/EnhancedCustomShape2d.cxx') diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index fb8fce63bc61..57d622eb6acc 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -749,7 +749,7 @@ EnhancedCustomShape2d::EnhancedCustomShape2d(SdrObjCustomShape& rSdrObjCustomSha if ( pAny ) *pAny >>= bFlipV; - nRotateAngle = static_cast(mrSdrObjCustomShape.GetObjectRotation() * 100.0); + nRotateAngle = Degree100(static_cast(mrSdrObjCustomShape.GetObjectRotation() * 100.0)); /*const sal_Int32* pDefData =*/ ApplyShapeAttributes( rGeometryItem ); SetPathSize(); @@ -1174,7 +1174,7 @@ bool EnhancedCustomShape2d::GetHandlePosition( const sal_uInt32 nIndex, Point& r } if ( nRotateAngle ) { - double a = nRotateAngle * F_PI18000; + double a = toRadians(nRotateAngle); RotatePoint( rReturnPosition, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), sin( a ), cos( a ) ); } if ( bFlipH ) @@ -1488,7 +1488,7 @@ bool EnhancedCustomShape2d::SetHandleControllerPosition( const sal_uInt32 nIndex aP.setY( aLogicRect.GetHeight() - aP.Y() ); if ( nRotateAngle ) { - double a = -nRotateAngle * F_PI18000; + double a = -toRadians(nRotateAngle); RotatePoint( aP, Point( aLogicRect.GetWidth() / 2, aLogicRect.GetHeight() / 2 ), sin( a ), cos( a ) ); } const GeoStat aGeoStat(mrSdrObjCustomShape.GetGeoStat()); -- cgit