summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorBogdan Buzea <buzea.bogdan@libreoffice.org>2024-03-26 17:43:26 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-03-27 14:27:14 +0100
commitd396aa36b0a91117345ef749396e6f20a5edb20a (patch)
tree11bb54d2ae9581a4f87b3c59bd198352d82e5e6f /drawinglayer
parenta69e32a0ca800642a3fb542c0a49a13ba04faecc (diff)
tdf#160084 Simplify comparison for basegfx::fTools
Change-Id: I853cab70d24e4813d979f507dc5b66049cbca53b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165316 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/attribute/sdrlightingattribute3d.cxx4
-rw-r--r--drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx2
-rw-r--r--drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx2
-rw-r--r--drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx6
4 files changed, 7 insertions, 7 deletions
diff --git a/drawinglayer/source/attribute/sdrlightingattribute3d.cxx b/drawinglayer/source/attribute/sdrlightingattribute3d.cxx
index 4f9b75cd1ff2..0f625756383c 100644
--- a/drawinglayer/source/attribute/sdrlightingattribute3d.cxx
+++ b/drawinglayer/source/attribute/sdrlightingattribute3d.cxx
@@ -140,7 +140,7 @@ namespace drawinglayer::attribute
const Sdr3DLightAttribute& rLight(rLightVector[a]);
const double fCosFac(rLight.getDirection().scalar(aEyeNormal));
- if(basegfx::fTools::more(fCosFac, 0.0))
+ if(fCosFac > 0.0)
{
aRetval += (rLight.getColor() * rColor) * fCosFac;
@@ -151,7 +151,7 @@ namespace drawinglayer::attribute
aSpecularNormal.normalize();
double fCosFac2(aSpecularNormal.scalar(aEyeNormal));
- if(basegfx::fTools::more(fCosFac2, 0.0))
+ if(fCosFac2 > 0.0)
{
fCosFac2 = pow(fCosFac2, static_cast<double>(nSpecularIntensity));
aRetval += rSpecular * fCosFac2;
diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index 58df9f4a7b28..e2c76a79bbc6 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -99,7 +99,7 @@ namespace drawinglayer::unorenderer
const double fWidth(aRange.getWidth());
const double fHeight(aRange.getHeight());
- if(basegfx::fTools::more(fWidth, 0.0) && basegfx::fTools::more(fHeight, 0.0))
+ if(fWidth > 0.0 && fHeight > 0.0)
{
if(0 == DPI_X)
{
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index 018c74450717..d756e6e3b74f 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -528,7 +528,7 @@ namespace drawinglayer::primitive2d
// embedded Vector Graphic Data fill, create embed transform
const basegfx::B2DRange& rSvgRange(rGraphic.getVectorGraphicData()->getRange());
- if(basegfx::fTools::more(rSvgRange.getWidth(), 0.0) && basegfx::fTools::more(rSvgRange.getHeight(), 0.0))
+ if(rSvgRange.getWidth() > 0.0 && rSvgRange.getHeight() > 0.0)
{
// translate back to origin, scale to unit coordinates
basegfx::B2DHomMatrix aEmbedVectorGraphic(
diff --git a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
index 447be709185e..a4280ea1aba0 100644
--- a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx
@@ -37,8 +37,8 @@ namespace drawinglayer::primitive2d
Primitive2DContainer aContent(getPageContent());
if(!(!aContent.empty()
- && basegfx::fTools::more(getContentWidth(), 0.0)
- && basegfx::fTools::more(getContentHeight(), 0.0)))
+ && getContentWidth() > 0.0)
+ && getContentHeight() > 0.0)
return nullptr;
// the decomposed matrix will be needed
@@ -46,7 +46,7 @@ namespace drawinglayer::primitive2d
double fRotate, fShearX;
getTransform().decompose(aScale, aTranslate, fRotate, fShearX);
- if(!(basegfx::fTools::more(aScale.getX(), 0.0) && basegfx::fTools::more(aScale.getY(), 0.0)))
+ if(!(aScale.getX() > 0.0 && aScale.getY() > 0.0))
return nullptr;
// check if content overlaps with target size and needs to be embedded with a