diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-03-07 08:54:59 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-03-07 10:59:18 +0100 |
commit | 860548e23e2ae737d7bd5840f71f776b1239f997 (patch) | |
tree | 3a9ad53d5db9360bd092f0bfee577d92d618124d /svx/source/sdr/contact | |
parent | 825dde03999a55d02e4d5bc88a4d5beacb65e67f (diff) |
Simplify a comparison
Comparing with zero is simple - the implementation of basegfx::fTools::moreOrEqual
calls rtl_math_approxEqual eventually, which special-zases zero.
Change-Id: I47c6059b56426c93e0c244036edeb5632037e093
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164492
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'svx/source/sdr/contact')
-rw-r--r-- | svx/source/sdr/contact/viewcontactofgraphic.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx index eee994c583cc..1135bd48bc91 100644 --- a/svx/source/sdr/contact/viewcontactofgraphic.cxx +++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx @@ -112,7 +112,7 @@ namespace sdr::contact const double fOffsetX((aScale.getX() - aPrefSize.getWidth()) / 2.0); const double fOffsetY((aScale.getY() - aPrefSize.getHeight()) / 2.0); - if(basegfx::fTools::moreOrEqual(fOffsetX, 0.0) && basegfx::fTools::moreOrEqual(fOffsetY, 0.0)) + if (fOffsetX >= 0.0 && fOffsetY >= 0.0) { // create the EmptyPresObj fallback visualisation. The fallback graphic // is already provided in rGraphicObject in this case, use it |