summaryrefslogtreecommitdiff
path: root/emfio/source
diff options
context:
space:
mode:
Diffstat (limited to 'emfio/source')
-rw-r--r--emfio/source/reader/mtftools.cxx3
-rw-r--r--emfio/source/reader/wmfreader.cxx8
2 files changed, 7 insertions, 4 deletions
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index cd3110ba9cbc..e376e6f501c1 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -19,6 +19,7 @@
#include <mtftools.hxx>
+#include <cstdlib>
#include <memory>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <basegfx/polygon/b2dpolypolygontools.hxx>
@@ -1160,7 +1161,7 @@ namespace emfio
UpdateClipRegion();
UpdateLineStyle();
UpdateFillStyle();
- mpGDIMetaFile->AddAction( new MetaRoundRectAction( ImplMap( rRect ), labs( ImplMap( rSize ).Width() ), labs( ImplMap( rSize ).Height() ) ) );
+ mpGDIMetaFile->AddAction( new MetaRoundRectAction( ImplMap( rRect ), std::abs( ImplMap( rSize ).Width() ), std::abs( ImplMap( rSize ).Height() ) ) );
}
void MtfTools::DrawEllipse( const tools::Rectangle& rRect )
diff --git a/emfio/source/reader/wmfreader.cxx b/emfio/source/reader/wmfreader.cxx
index 1473930e83ec..0022fe9b1cb6 100644
--- a/emfio/source/reader/wmfreader.cxx
+++ b/emfio/source/reader/wmfreader.cxx
@@ -20,6 +20,7 @@
#include <wmfreader.hxx>
#include <emfreader.hxx>
+#include <cstdlib>
#include <memory>
#include <optional>
#include <o3tl/safeint.hxx>
@@ -1328,18 +1329,19 @@ namespace emfio
}
SetWinOrg( aPlaceableBound.TopLeft() );
- Size aWMFSize( labs( aPlaceableBound.GetWidth() ), labs( aPlaceableBound.GetHeight() ) );
+ Size aWMFSize(
+ std::abs( aPlaceableBound.GetWidth() ), std::abs( aPlaceableBound.GetHeight() ) );
SetWinExt( aWMFSize );
SAL_INFO("vcl.wmf", "WMF size w: " << aWMFSize.Width() << " h: " << aWMFSize.Height());
Size aDevExt( 10000, 10000 );
- if( ( labs( aWMFSize.Width() ) > 1 ) && ( labs( aWMFSize.Height() ) > 1 ) )
+ if( ( std::abs( aWMFSize.Width() ) > 1 ) && ( std::abs( aWMFSize.Height() ) > 1 ) )
{
const Fraction aFrac( 1, mnUnitsPerInch);
MapMode aWMFMap( MapUnit::MapInch, Point(), aFrac, aFrac );
Size aSize100(OutputDevice::LogicToLogic(aWMFSize, aWMFMap, MapMode(MapUnit::Map100thMM)));
- aDevExt = Size( labs( aSize100.Width() ), labs( aSize100.Height() ) );
+ aDevExt = Size( std::abs( aSize100.Width() ), std::abs( aSize100.Height() ) );
}
SetDevExt( aDevExt );