summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
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 /vcl/source/outdev
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 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/bitmap.cxx3
-rw-r--r--vcl/source/outdev/hatch.cxx5
2 files changed, 5 insertions, 3 deletions
diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx
index 7d3d6485d2e7..519f975a0f12 100644
--- a/vcl/source/outdev/bitmap.cxx
+++ b/vcl/source/outdev/bitmap.cxx
@@ -18,6 +18,7 @@
*/
#include <cassert>
+#include <cstdlib>
#include <vcl/bitmap.hxx>
#include <vcl/bitmapex.hxx>
@@ -203,7 +204,7 @@ Bitmap OutputDevice::GetDownsampledBitmap( const Size& rDstSz,
Size aDstSizeTwip( PixelToLogic(LogicToPixel(rDstSz), MapMode(MapUnit::MapTwip)) );
// #103209# Normalize size (mirroring has to happen outside of this method)
- aDstSizeTwip = Size( labs(aDstSizeTwip.Width()), labs(aDstSizeTwip.Height()) );
+ aDstSizeTwip = Size( std::abs(aDstSizeTwip.Width()), std::abs(aDstSizeTwip.Height()) );
const Size aBmpSize( aBmp.GetSizePixel() );
const double fBmpPixelX = aBmpSize.Width();
diff --git a/vcl/source/outdev/hatch.cxx b/vcl/source/outdev/hatch.cxx
index 44cf941149bb..374282c374df 100644
--- a/vcl/source/outdev/hatch.cxx
+++ b/vcl/source/outdev/hatch.cxx
@@ -18,6 +18,7 @@
*/
#include <cassert>
+#include <cstdlib>
#include <osl/diagnose.h>
#include <tools/line.hxx>
@@ -255,7 +256,7 @@ void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, tools::Long n
}
else if( nAngle >= Degree10(-450) && nAngle <= Degree10(450) )
{
- const double fAngle = F_PI1800 * labs( nAngle.get() );
+ const double fAngle = F_PI1800 * std::abs( nAngle.get() );
const double fTan = tan( fAngle );
const tools::Long nYOff = FRound( ( rRect.Right() - rRect.Left() ) * fTan );
tools::Long nPY;
@@ -288,7 +289,7 @@ void OutputDevice::CalcHatchValues( const tools::Rectangle& rRect, tools::Long n
}
else
{
- const double fAngle = F_PI1800 * labs( nAngle.get() );
+ const double fAngle = F_PI1800 * std::abs( nAngle.get() );
const double fTan = tan( fAngle );
const tools::Long nXOff = FRound( ( rRect.Bottom() - rRect.Top() ) / fTan );
tools::Long nPX;