summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-03-28 10:19:26 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2024-03-28 15:50:36 +0100
commit696e405a8d734e1440e3178a04cbb10190bbc4d7 (patch)
treeda7e33fc16a8b984043a07f0e16b4ed0ff18e384
parent0343d7153e77ba79a59bc5f6c51159af9010813e (diff)
Simplify a comparison
Similar to commit 860548e23e2ae737d7bd5840f71f776b1239f997 (Simplify a comparison, 2024-03-07). Change-Id: Ia2ae4a9d23558842626b6e52a13bc1582bc35741 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165422 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx12
1 files changed, 5 insertions, 7 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 9049bec591b2..d99893dbab98 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -142,8 +142,7 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
// especially if the effect is less than a pixel.
if (std::abs(aFontScaling.getY() * fShearX) < 1)
{
- if (basegfx::fTools::less(aFontScaling.getX(), 0.0)
- && basegfx::fTools::less(aFontScaling.getY(), 0.0))
+ if (aFontScaling.getX() < 0.0 && aFontScaling.getY() < 0.0)
{
// handle special case: If scale is negative in (x,y) (3rd quadrant), it can
// be expressed as rotation by PI. Use this since the Font rendering will not
@@ -152,8 +151,7 @@ void VclProcessor2D::RenderTextSimpleOrDecoratedPortionPrimitive2D(
fRotate += M_PI;
}
- if (basegfx::fTools::more(aFontScaling.getX(), 0.0)
- && basegfx::fTools::more(aFontScaling.getY(), 0.0))
+ if (aFontScaling.getX() > 0.0 && aFontScaling.getY() > 0.0)
{
double fIgnoreRotate, fIgnoreShearX;
@@ -1099,7 +1097,7 @@ void VclProcessor2D::RenderPolygonStrokePrimitive2D(
const double fLineWidth(rLineAttribute.getWidth());
bool bDone(false);
- if (basegfx::fTools::more(fLineWidth, 0.0))
+ if (fLineWidth > 0.0)
{
const basegfx::B2DVector aDiscreteUnit(maCurrentTransformation
* basegfx::B2DVector(fLineWidth, 0.0));
@@ -1348,7 +1346,7 @@ void VclProcessor2D::RenderSvgLinearAtomPrimitive2D(
{
const double fDelta(rCandidate.getOffsetB() - rCandidate.getOffsetA());
- if (!basegfx::fTools::more(fDelta, 0.0))
+ if (fDelta <= 0.0)
return;
const basegfx::BColor aColorA(maBColorModifierStack.getModifiedColor(rCandidate.getColorA()));
@@ -1392,7 +1390,7 @@ void VclProcessor2D::RenderSvgRadialAtomPrimitive2D(
{
const double fDeltaScale(rCandidate.getScaleB() - rCandidate.getScaleA());
- if (!basegfx::fTools::more(fDeltaScale, 0.0))
+ if (fDeltaScale <= 0.0)
return;
const basegfx::BColor aColorA(maBColorModifierStack.getModifiedColor(rCandidate.getColorA()));