diff options
author | Bogdan Buzea <buzea.bogdan@libreoffice.org> | 2024-11-19 17:00:36 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2025-01-02 11:59:13 +0100 |
commit | 458353be11417448a5318cd69a9e3677cf9a34fc (patch) | |
tree | 431479336b9552e58c8d8c363549e15462b4f95a /svx | |
parent | 10b0ab7ba8f792198b2f84f845a388fb86440c2c (diff) |
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/primitive2d/sdrdecompositiontools.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdocapt.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdotextdecomposition.cxx | 20 |
3 files changed, 13 insertions, 13 deletions
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, |