summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-01-27 11:05:54 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-04 06:24:00 +0000
commit8ffd2c8dd032e718bc8c3d574cd47e82a2c07261 (patch)
treee3c9fac49456feaa5402d3c0f3593c94a4fb3370 /sdext
parentdc889a9a3054e99f997c2377b7e312396366f4ba (diff)
loplugin:fpcomparison in sdext/
Change-Id: If2ae6c3399ef3aceffc2080fcd790e91dc594d9b Reviewed-on: https://gerrit.libreoffice.org/21864 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/misc/pdfihelper.cxx2
-rw-r--r--sdext/source/pdfimport/tree/drawtreevisiting.cxx11
2 files changed, 6 insertions, 7 deletions
diff --git a/sdext/source/pdfimport/misc/pdfihelper.cxx b/sdext/source/pdfimport/misc/pdfihelper.cxx
index c1f7c41fa112..65b4a859042c 100644
--- a/sdext/source/pdfimport/misc/pdfihelper.cxx
+++ b/sdext/source/pdfimport/misc/pdfihelper.cxx
@@ -54,7 +54,7 @@ void pdfi::FillDashStyleProps(PropertyMap& props, const std::vector<double>& das
for (size_t i = 0; i < pairCount; i++)
{
- if (dotLengths[dotStage] != dashArray[i * 2])
+ if (!rtl::math::approxEqual(dotLengths[dotStage], dashArray[i * 2]))
{
dotStage++;
if (dotStage == 3)
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
index a38050ad30b1..46ed9b460a98 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
@@ -663,12 +663,11 @@ bool isSpaces(TextElement* pTextElem)
bool notTransformed(const GraphicsContext& GC)
{
- return (
- GC.Transformation.get(0,0) == 100.00 &&
- GC.Transformation.get(1,0) == 0.00 &&
- GC.Transformation.get(0,1) == 0.00 &&
- GC.Transformation.get(1,1) == -100.00
- );
+ return
+ rtl::math::approxEqual(GC.Transformation.get(0,0), 100.00) &&
+ GC.Transformation.get(1,0) == 0.00 &&
+ GC.Transformation.get(0,1) == 0.00 &&
+ rtl::math::approxEqual(GC.Transformation.get(1,1), -100.00);
}
void DrawXmlOptimizer::optimizeTextElements(Element& rParent)