diff options
author | Aaron Bourdeaux <abourdeaux@csumb.edu> | 2024-03-29 19:12:59 -0400 |
---|---|---|
committer | Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> | 2024-04-05 13:15:46 +0200 |
commit | ee9a21da6aa0872855f78a4464d6952e11a9aa54 (patch) | |
tree | 384761c36fd9e345135f0de45d36cdd358799f4d /svx | |
parent | 2f15866d8502c74513e19f7a6e3074c97f162725 (diff) |
tdf#160084 Simplify comparison for basegfx::fTools
Change-Id: I61bcc0054c71273945d3004839be92a25a26d261
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165563
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sdr/contact/viewcontactofsdrole2obj.cxx | 4 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlaybitmapex.cxx | 2 | ||||
-rw-r--r-- | svx/source/sdr/overlay/overlaytools.cxx | 6 |
3 files changed, 5 insertions, 7 deletions
diff --git a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx index e6386e7c0a92..0c206f6edb07 100644 --- a/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx +++ b/svx/source/sdr/contact/viewcontactofsdrole2obj.cxx @@ -99,9 +99,7 @@ void ViewContactOfSdrOle2Obj::createPrimitive2DSequenceWithParameters(drawinglay const double fWidth(aChartContentRange.getWidth()); const double fHeight(aChartContentRange.getHeight()); - if(!aChartSequence.empty() - && basegfx::fTools::more(fWidth, 0.0) - && basegfx::fTools::more(fHeight, 0.0)) + if(!aChartSequence.empty() && fWidth > 0.0 && fHeight > 0.0) { // create embedding transformation basegfx::B2DHomMatrix aEmbed( diff --git a/svx/source/sdr/overlay/overlaybitmapex.cxx b/svx/source/sdr/overlay/overlaybitmapex.cxx index 3ffba9e05747..6dc31ff8eb2c 100644 --- a/svx/source/sdr/overlay/overlaybitmapex.cxx +++ b/svx/source/sdr/overlay/overlaybitmapex.cxx @@ -35,7 +35,7 @@ namespace sdr::overlay mfShearX, mfRotation)); - if(basegfx::fTools::more(mfAlpha, 0.0)) + if(mfAlpha > 0.0) { drawinglayer::primitive2d::Primitive2DContainer aNewTransPrimitiveVector { aReference }; aReference = new drawinglayer::primitive2d::UnifiedTransparencePrimitive2D(std::move(aNewTransPrimitiveVector), mfAlpha); diff --git a/svx/source/sdr/overlay/overlaytools.cxx b/svx/source/sdr/overlay/overlaytools.cxx index 8b857ad53ee8..2755b7fa3030 100644 --- a/svx/source/sdr/overlay/overlaytools.cxx +++ b/svx/source/sdr/overlay/overlaytools.cxx @@ -62,7 +62,7 @@ Primitive2DReference OverlayStaticRectanglePrimitive::create2DDecomposition(cons maPosition.getX() - fHalfWidth, maPosition.getY() - fHalfHeight, maPosition.getX() + fHalfWidth, maPosition.getY() + fHalfHeight); - if (!basegfx::fTools::more(getDiscreteUnit(), 0.0) || mfTransparence > 1.0) + if (getDiscreteUnit() <= 0.0 || mfTransparence > 1.0) return nullptr; basegfx::B2DPolygon aPolygon( @@ -138,7 +138,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const { const Size aBitmapSize(getBitmapEx().GetSizePixel()); - if(!aBitmapSize.Width() || !aBitmapSize.Height() || !basegfx::fTools::more(getDiscreteUnit(), 0.0)) + if(!aBitmapSize.Width() || !aBitmapSize.Height() || getDiscreteUnit() <= 0.0) return nullptr; // calculate back from internal bitmap's extreme coordinates (the edges) @@ -287,7 +287,7 @@ sal_uInt32 OverlayStaticRectanglePrimitive::getPrimitive2DID() const Primitive2DReference aRetval; basegfx::B2DRange aInnerRange(getObjectRange()); - if(aInnerRange.isEmpty() || !basegfx::fTools::more(getDiscreteUnit(), 0.0) || getTransparence() > 1.0) + if(aInnerRange.isEmpty() || getDiscreteUnit() <= 0.0 || getTransparence() > 1.0) return nullptr; if (!Application::GetSettings().GetStyleSettings().GetHighContrastMode()) |