From 1cc6fca4927b9684b1f5acedee7b60c0c7518e25 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 18 Nov 2021 23:42:32 +0300 Subject: Drop F_2PI Change-Id: Ie98606607b2ce262e4eed76bb8cd86fbfe846f76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125506 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- svx/source/customshapes/EnhancedCustomShape2d.cxx | 6 +++--- svx/source/dialog/dlgctl3d.cxx | 8 ++++---- svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx | 2 +- svx/source/svdraw/svdocapt.cxx | 2 +- svx/source/svdraw/svdopath.cxx | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'svx/source') diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 2fb4df76bd1e..1f05a3782a7c 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -2008,7 +2008,7 @@ static double lcl_getNormalizedCircleAngleRad(const double fWR, const double fHR { fRet = atan2(fY, fX); if (fRet < 0.0) - fRet += F_2PI; + fRet += 2 * M_PI; } return fRet; } @@ -2494,7 +2494,7 @@ void EnhancedCustomShape2d::CreateSubPath( } else // right, down { - aArc = basegfx::utils::createPolygonFromEllipseSegment(aCenter, fRadiusX, fRadiusY, 1.5*M_PI, F_2PI); + aArc = basegfx::utils::createPolygonFromEllipseSegment(aCenter, fRadiusX, fRadiusY, 1.5*M_PI, 2*M_PI); } } } @@ -2505,7 +2505,7 @@ void EnhancedCustomShape2d::CreateSubPath( { if (aEnd.getY()= F_2PI) + while(fNewRotY >= 2 * M_PI) { - fNewRotY -= F_2PI; + fNewRotY -= 2 * M_PI; } // cut vertical diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx index 32ad5764db7e..d96d640a70cc 100644 --- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx @@ -105,7 +105,7 @@ namespace drawinglayer::primitive2d if(getTextAutoAngle() && fTestAngle < -M_PI) { - fTestAngle += F_2PI; + fTestAngle += 2 * M_PI; } } diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index 54889a9dde28..85d4a721a066 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -710,7 +710,7 @@ void handleNegativeScale(basegfx::B2DTuple & scale, double * rotate) { { scale.setX(fabs(scale.getX())); scale.setY(fabs(scale.getY())); - *rotate = fmod(*rotate + M_PI, F_2PI); + *rotate = fmod(*rotate + M_PI, 2 * M_PI); } } diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 17cf7f4a431e..efeefc79dcea 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -2907,7 +2907,7 @@ void SdrPathObj::TRSetBaseGeometry(const basegfx::B2DHomMatrix& rMatrix, const b { aScale.setX(fabs(aScale.getX())); aScale.setY(fabs(aScale.getY())); - fRotate = fmod(fRotate + M_PI, F_2PI); + fRotate = fmod(fRotate + M_PI, 2 * M_PI); } // copy poly -- cgit