diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-19 00:22:31 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-11-19 15:42:03 +0100 |
commit | bc0ab08634f59e1a1814e575fe6ad5e50bf1aee1 (patch) | |
tree | 8691eec1adefd9e4def8245898e8a3e5c5542037 /chart2/source | |
parent | 168ae4c00a86b7534dedd303f9ef008e19822b99 (diff) |
Drop F_PI1800/F_PI18000, and unify deg2rad/rad2deg conversions
Change-Id: Ib89b00c3dc8cd440e8a88906eea133becd1cef64
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125509
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/view/main/ShapeFactory.cxx | 4 | ||||
-rw-r--r-- | chart2/source/view/main/VTitle.cxx | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx index fe9bfe783615..a7011527dfc6 100644 --- a/chart2/source/view/main/ShapeFactory.cxx +++ b/chart2/source/view/main/ShapeFactory.cxx @@ -426,7 +426,7 @@ uno::Reference<drawing::XShape> //Matrix for position basegfx::B3DHomMatrix aHomMatrix; if (nRotateZAngleHundredthDegree != 0) - aHomMatrix.rotate(0.0, 0.0, -nRotateZAngleHundredthDegree / 18000.00 * M_PI); + aHomMatrix.rotate(0.0, 0.0, -basegfx::deg2rad<100>(nRotateZAngleHundredthDegree)); aHomMatrix.translate(rPosition.PositionX, rPosition.PositionY, rPosition.PositionZ - (fDepth / 2.0)); @@ -669,7 +669,7 @@ uno::Reference<drawing::XShape> //Matrix for position basegfx::B3DHomMatrix aHomMatrix; if (nRotateZAngleHundredthDegree != 0) - aHomMatrix.rotate(0.0,0.0,-nRotateZAngleHundredthDegree/18000.00*M_PI); + aHomMatrix.rotate(0.0,0.0,-basegfx::deg2rad<100>(nRotateZAngleHundredthDegree)); //stretch the symmetric objects to given depth aHomMatrix.scale(1.0,1.0,rSize.DirectionZ/rSize.DirectionX); aHomMatrix.translate(rPosition.PositionX, rPosition.PositionY, rPosition.PositionZ); diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx index 44c2556ad989..b6ed5866a311 100644 --- a/chart2/source/view/main/VTitle.cxx +++ b/chart2/source/view/main/VTitle.cxx @@ -86,7 +86,7 @@ void VTitle::changePosition( const awt::Point& rPos ) //set position matrix //the matrix needs to be set at the end behind autogrow and such position influencing properties ::basegfx::B2DHomMatrix aM; - aM.rotate( -m_fRotationAngleDegree*M_PI/180.0 );//#i78696#->#i80521# + aM.rotate( basegfx::deg2rad(-m_fRotationAngleDegree) );//#i78696#->#i80521# aM.translate( m_nXPos, m_nYPos); xShapeProp->setPropertyValue( "Transformation", uno::Any( B2DHomMatrixToHomogenMatrix3(aM) ) ); } |