summaryrefslogtreecommitdiff
path: root/svx/source/sdr/primitive2d
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-11-18 17:43:46 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-11-19 09:59:43 +0100
commit37429f2690a96491ad0e4fa2a04f2fa88a66da87 (patch)
tree9963c1f531f22306edaf2ce8b41d5636f5e191f3 /svx/source/sdr/primitive2d
parent0afd2d3bfa9d55249ffd1408681ff04decf2d8fa (diff)
Use M_PI* instead of F_PI*
Change-Id: Ie2b7a1c74fc516781a17a20157b8217bc41e383d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125504 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/source/sdr/primitive2d')
-rw-r--r--svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx6
-rw-r--r--svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx10
2 files changed, 8 insertions, 8 deletions
diff --git a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
index 8b40bc78fab3..448640591ce6 100644
--- a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
@@ -209,8 +209,8 @@ namespace
return;
// create angle between both. angle() needs vectors pointing away from the same point,
- // so take the mirrored one. Add F_PI to get from -pi..+pi to [0..F_PI2] for sorting
- const double fAngle(basegfx::B2DVector(-rMyVector.getX(), -rMyVector.getY()).angle(rOtherVector) + F_PI);
+ // so take the mirrored one. Add M_PI to get from -pi..+pi to [0..M_PI_2] for sorting
+ const double fAngle(basegfx::B2DVector(-rMyVector.getX(), -rMyVector.getY()).angle(rOtherVector) + M_PI);
maEntries.emplace_back(
rStyle,
rOtherVector,
@@ -433,7 +433,7 @@ namespace
{
// sort: min to start, max to end
std::sort(aCutSets.begin(), aCutSets.end());
- const bool bOtherUpper(rStyleCandidate.getAngle() > F_PI);
+ const bool bOtherUpper(rStyleCandidate.getAngle() > M_PI);
// check if we need min or max
// bUpper bOtherUpper MinMax
diff --git a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
index aba7bf008fd6..32ad5764db7e 100644
--- a/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrmeasureprimitive2d.cxx
@@ -100,10 +100,10 @@ namespace drawinglayer::primitive2d
if(getTextRotation())
{
- aTextMatrix.rotate(-F_PI2);
- fTestAngle -= (F_PI2);
+ aTextMatrix.rotate(-M_PI_2);
+ fTestAngle -= (M_PI_2);
- if(getTextAutoAngle() && fTestAngle < -F_PI)
+ if(getTextAutoAngle() && fTestAngle < -M_PI)
{
fTestAngle += F_2PI;
}
@@ -111,7 +111,7 @@ namespace drawinglayer::primitive2d
if(getTextAutoAngle())
{
- if(fTestAngle > (F_PI / 4.0) || fTestAngle < (-F_PI * (3.0 / 4.0)))
+ if(fTestAngle > (M_PI / 4.0) || fTestAngle < (-M_PI * (3.0 / 4.0)))
{
bAutoUpsideDown = true;
}
@@ -403,7 +403,7 @@ namespace drawinglayer::primitive2d
// handle auto text rotation
if(bAutoUpsideDown)
{
- aChange.rotate(F_PI);
+ aChange.rotate(M_PI);
}
// move from aTextRange.TopLeft to fTextX, fTextY