chart2/source/view/charttypes/PieChart.cxx | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-)
New commits: commit 5d516b4cd60dc8a1749f4cba1b6ab2f5ef995fc9 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Aug 4 00:04:52 2018 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Aug 4 07:34:22 2018 +0200 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.kagan...@collabora.com> 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", _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits