diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-08-04 00:04:52 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-08-04 07:34:22 +0200 |
commit | 5d516b4cd60dc8a1749f4cba1b6ab2f5ef995fc9 (patch) | |
tree | dc3c25afe2dd0b3aaa8f2a18ad8bafba05d3b7d0 /chart2 | |
parent | 554e090538bd8aa0948b010d2d80dc54b8e1d3bd (diff) |
Remove local deg<->rad functions: use what we already have in basegfx
Change-Id: I33848d0b973999f486bb980e78b51e3d109ed1bf
Reviewed-on: https://gerrit.libreoffice.org/58582
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/charttypes/PieChart.cxx | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx index 19f978ee8301..06e70c59180f 100644 --- a/chart2/source/view/charttypes/PieChart.cxx +++ b/chart2/source/view/charttypes/PieChart.cxx @@ -748,18 +748,6 @@ bool lcl_isInsidePage( const awt::Point& rPos, const awt::Size& rSize, const awt return true; } -inline -double lcl_radToDeg(double fAngleRad) -{ - return (fAngleRad / M_PI) * 180.0; -} - -inline -double lcl_degToRad(double fAngleDeg) -{ - return (fAngleDeg / 180) * M_PI; -} - }//end anonymous namespace PieChart::PieLabelInfo::PieLabelInfo() @@ -1326,7 +1314,7 @@ bool PieChart::performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLab // -45 <= fAlphaDeg < 315 double fAlphaDeg = NormAngle360(fBisectingRayAngleDeg + 45) - 45; - double fAlphaRad = lcl_degToRad(fAlphaDeg); + double fAlphaRad = basegfx::deg2rad(fAlphaDeg); // compute nearest edge index // 0 left @@ -1470,9 +1458,9 @@ bool PieChart::performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLab aVertexG[nOrthogonalAxisIndex] += aDirection[nOrthogonalAxisIndex] * fOrthogonalEdgeLength; SAL_INFO( "chart2.pie.label.bestfit.inside", - " beta = " << lcl_radToDeg(fBetaRad) ); + " beta = " << basegfx::rad2deg(fBetaRad) ); SAL_INFO( "chart2.pie.label.bestfit.inside", - " theta = " << lcl_radToDeg(fThetaRad) ); + " theta = " << basegfx::rad2deg(fThetaRad) ); SAL_INFO( "chart2.pie.label.bestfit.inside", " fAlphaMod90 = " << fAlphaMod90 ); SAL_INFO( "chart2.pie.label.bestfit.inside", @@ -1498,7 +1486,7 @@ bool PieChart::performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLab // check the angle between CP and CM double fAngleRad = aPositionalVector.angle(aVertexM); - double fAngleDeg = NormAngle360(lcl_radToDeg(fAngleRad)); + double fAngleDeg = NormAngle360(basegfx::rad2deg(fAngleRad)); if( fAngleDeg > 180 ) // in case the wrong angle has been computed fAngleDeg = 360 - fAngleDeg; SAL_INFO( "chart2.pie.label.bestfit.inside", @@ -1513,7 +1501,7 @@ bool PieChart::performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLab { // check the angle between CP and CN fAngleRad = aPositionalVector.angle(aNearestVertex); - fAngleDeg = NormAngle360(lcl_radToDeg(fAngleRad)); + fAngleDeg = NormAngle360(basegfx::rad2deg(fAngleRad)); if( fAngleDeg > 180 ) // in case the wrong angle has been computed fAngleDeg = 360 - fAngleDeg; SAL_INFO( "chart2.pie.label.bestfit.inside", @@ -1527,7 +1515,7 @@ bool PieChart::performLabelBestFitInnerPlacement(ShapeParam& rShapeParam, PieLab { // check the angle between CP and CG fAngleRad = aPositionalVector.angle(aVertexG); - fAngleDeg = NormAngle360(lcl_radToDeg(fAngleRad)); + fAngleDeg = NormAngle360(basegfx::rad2deg(fAngleRad)); if( fAngleDeg > 180 ) // in case the wrong angle has been computed fAngleDeg = 360 - fAngleDeg; SAL_INFO( "chart2.pie.label.bestfit.inside", |