svx/source/sdr/primitive2d/sdrdecompositiontools.cxx |    4 +--
 svx/source/svdraw/svdocapt.cxx                       |    2 -
 svx/source/svdraw/svdotextdecomposition.cxx          |   20 +++++++++----------
 3 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 458353be11417448a5318cd69a9e3677cf9a34fc
Author:     Bogdan Buzea <buzea.bog...@libreoffice.org>
AuthorDate: Tue Nov 19 17:00:36 2024 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Jan 2 11:59:13 2025 +0100

    tdf#160084 Simplify comparison for basegfx::fTools
    
    Change-Id: I5db5200f59f32e428963a2c5bd6f70da42ec078f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176780
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx 
b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 920b3026ac02..617dcba30631 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -634,8 +634,8 @@ sal_uInt32 
SlideBackgroundFillPrimitive2D::getPrimitive2DID() const
                 rObjectTransform.decompose(aScale, aTranslate, fRotate, 
fShearX);
 
                 // extract mirroring
-                const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
-                const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
+                const bool bMirrorX(aScale.getX() < 0.0);
+                const bool bMirrorY(aScale.getY() < 0.0);
                 aScale = basegfx::absolute(aScale);
 
                 // Get the real size, since polygon outline and scale
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index f2528d588216..f4f8bf828291 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -706,7 +706,7 @@ void handleNegativeScale(basegfx::B2DTuple & scale, double 
* rotate) {
 
     // #i75086# Old DrawingLayer (GeoStat and geometry) does not support 
holding negative scalings
     // in X and Y which equal a 180 degree rotation. Recognize it and react 
accordingly
-    if(basegfx::fTools::less(scale.getX(), 0.0) && 
basegfx::fTools::less(scale.getY(), 0.0))
+    if(scale.getX() < 0.0 && scale.getY() < 0.0)
     {
         scale.setX(fabs(scale.getX()));
         scale.setY(fabs(scale.getY()));
diff --git a/svx/source/svdraw/svdotextdecomposition.cxx 
b/svx/source/svdraw/svdotextdecomposition.cxx
index 9d2fe097a84a..c9fd31f04148 100644
--- a/svx/source/svdraw/svdotextdecomposition.cxx
+++ b/svx/source/svdraw/svdotextdecomposition.cxx
@@ -901,8 +901,8 @@ void SdrTextObj::impDecomposeContourTextPrimitive(
 
     // mirroring. We are now in the polygon sizes. When mirroring in X and Y,
     // move the null point which was top left to bottom right.
-    const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
-    const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
+    const bool bMirrorX(aScale.getX() < 0.0);
+    const bool bMirrorY(aScale.getY() < 0.0);
 
     // in-between the translations of the single primitives will take place. 
Afterwards,
     // the object's transformations need to be applied
@@ -1050,8 +1050,8 @@ void SdrTextObj::impDecomposeAutoFitTextPrimitive(
 
     // mirroring. We are now in aAnchorTextRange sizes. When mirroring in X 
and Y,
     // move the null point which was top left to bottom right.
-    const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
-    const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
+    const bool bMirrorX(aScale.getX() < 0.0);
+    const bool bMirrorY(aScale.getY() < 0.0);
     aNewTransformB.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0);
 
     // in-between the translations of the single primitives will take place. 
Afterwards,
@@ -1350,8 +1350,8 @@ void SdrTextObj::impDecomposeBlockTextPrimitive(
 
     // mirroring. We are now in aAnchorTextRange sizes. When mirroring in X 
and Y,
     // move the null point which was top left to bottom right.
-    const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
-    const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
+    const bool bMirrorX(aScale.getX() < 0.0);
+    const bool bMirrorY(aScale.getY() < 0.0);
 
     // in-between the translations of the single primitives will take place. 
Afterwards,
     // the object's transformations need to be applied
@@ -1437,8 +1437,8 @@ void SdrTextObj::impDecomposeStretchTextPrimitive(
 
     // When mirroring in X and Y,
     // move the null point which was top left to bottom right.
-    const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
-    const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
+    const bool bMirrorX(aScale.getX() < 0.0);
+    const bool bMirrorY(aScale.getY() < 0.0);
 
     // in-between the translations of the single primitives will take place. 
Afterwards,
     // the object's transformations need to be applied
@@ -1863,8 +1863,8 @@ void SdrTextObj::impDecomposeChainedTextPrimitive(
 
     // mirroring. We are now in aAnchorTextRange sizes. When mirroring in X 
and Y,
     // move the null point which was top left to bottom right.
-    const bool bMirrorX(basegfx::fTools::less(aScale.getX(), 0.0));
-    const bool bMirrorY(basegfx::fTools::less(aScale.getY(), 0.0));
+    const bool bMirrorX(aScale.getX() < 0.0);
+    const bool bMirrorY(aScale.getY() < 0.0);
     aNewTransformB.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0);
 
     // in-between the translations of the single primitives will take place. 
Afterwards,

Reply via email to