summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx6
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx5
2 files changed, 7 insertions, 4 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index fba5f93f5499..4c7dc3d0eb42 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -41,6 +41,8 @@
#include <sdpage.hxx>
#include <cfloat>
+#include <cstdlib>
+
#include <rtl/character.hxx>
using namespace css;
@@ -2695,14 +2697,14 @@ void SdOOXMLExportTest2::testTdf1225573_FontWorkScaleX()
awt::Rectangle aBoundRectArch;
xShapeArchProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectArch;
// difference should be zero, but allow some range for stroke thickness
- CPPUNIT_ASSERT_LESS(50L, labs(aBoundRectArch.Width - 13081));
+ CPPUNIT_ASSERT_LESS(sal_Int32(50), std::abs(aBoundRectArch.Width - 13081));
// Error was, that text in shapes of category "Warp" was not scaled to the path.
uno::Reference<beans::XPropertySet> xShapeWaveProps(getShapeFromPage(0, 1, xDocShRef));
awt::Rectangle aBoundRectWave;
xShapeWaveProps->getPropertyValue(UNO_NAME_MISC_OBJ_BOUNDRECT) >>= aBoundRectWave;
// difference should be zero, but allow some range for stroke thickness
- CPPUNIT_ASSERT_LESS(50L, labs(aBoundRectWave.Width - 11514));
+ CPPUNIT_ASSERT_LESS(sal_Int32(50), std::abs(aBoundRectWave.Width - 11514));
xDocShRef->DoClose();
}
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index c45e782be567..25e2aaea7b56 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <cassert>
+#include <cstdlib>
#include <controller/SlsClipboard.hxx>
@@ -699,9 +700,9 @@ sal_Int8 Clipboard::ExecuteDrop (
SdTransferable* pDragTransferable = SD_MOD()->pTransferDrag;
const Point aEventModelPosition (
pTargetWindow->PixelToLogic (rEvent.maPosPixel));
- const sal_Int32 nXOffset (labs (pDragTransferable->GetStartPos().X()
+ const sal_Int32 nXOffset (std::abs (pDragTransferable->GetStartPos().X()
- aEventModelPosition.X()));
- const sal_Int32 nYOffset (labs (pDragTransferable->GetStartPos().Y()
+ const sal_Int32 nYOffset (std::abs (pDragTransferable->GetStartPos().Y()
- aEventModelPosition.Y()));
bool bContinue =
( pDragTransferable->GetView() != &mrSlideSorter.GetView() )