summaryrefslogtreecommitdiff
path: root/svx/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-11-16 16:07:30 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-11-16 21:43:09 +0100
commit50d3ad9127aaf63afcfa299adcea060c9b09faa4 (patch)
treeaf3bf48ae8e31e180003c9f998831dd7777d1f5b /svx/qa
parentcd4a239063a77d49fe178255c20f0558e337a82f (diff)
Instead of labs, use overloaded abs
...more likely to pick an appropriate version for the involved integer types, esp. after the recent long -> tools::Long changes Change-Id: Ia91259ca35aaf74b0e907de6831fc926f30057f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx/qa')
-rw-r--r--svx/qa/unit/customshapes.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/svx/qa/unit/customshapes.cxx b/svx/qa/unit/customshapes.cxx
index 3007806c61af..737ab5bdf6d0 100644
--- a/svx/qa/unit/customshapes.cxx
+++ b/svx/qa/unit/customshapes.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <cstdlib>
+
#include <test/bootstrapfixture.hxx>
#include <unotest/macros_test.hxx>
#include <rtl/ustring.hxx>
@@ -104,7 +108,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testViewBoxLeftTop)
awt::Rectangle aBoundRectLR;
xShapeLRProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectLR;
// difference should be zero, but allow some rounding errors
- CPPUNIT_ASSERT_LESS(3L, labs(aFrameRectLR.X - aBoundRectLR.X));
+ CPPUNIT_ASSERT_LESS(sal_Int32(3), std::abs(aFrameRectLR.X - aBoundRectLR.X));
// Get the shape "topbottom". Error was, that the identifier "top" was always set to zero, thus
// the path was outside the frame rectangle for a viewBox having a positive "top" value.
@@ -116,7 +120,7 @@ CPPUNIT_TEST_FIXTURE(CustomshapesTest, testViewBoxLeftTop)
awt::Rectangle aBoundRectTB;
xShapeTBProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectTB;
// difference should be zero, but allow some rounding errors
- CPPUNIT_ASSERT_LESS(3L, labs(aFrameRectTB.Y - aBoundRectTB.Y));
+ CPPUNIT_ASSERT_LESS(sal_Int32(3), std::abs(aFrameRectTB.Y - aBoundRectTB.Y));
}
CPPUNIT_TEST_FIXTURE(CustomshapesTest, testAccuracyCommandX)