summaryrefslogtreecommitdiff
path: root/svx/source
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/source
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/source')
-rw-r--r--svx/source/accessibility/AccessibleTextHelper.cxx7
-rw-r--r--svx/source/customshapes/EnhancedCustomShape2d.cxx5
-rw-r--r--svx/source/engine3d/scene3d.cxx7
3 files changed, 11 insertions, 8 deletions
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 625a9034831b..f11ce49b3beb 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -17,10 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
-// Global header
-
-
+#include <cstdlib>
#include <memory>
#include <utility>
#include <algorithm>
@@ -1043,7 +1042,7 @@ namespace accessibility
// repeat that later on, e.g. for PARA_MOVED events)
bool bEverythingUpdated( false );
- if( labs( nNewParas - nCurrParas ) == 1 &&
+ if( std::abs( nNewParas - nCurrParas ) == 1 &&
aFunctor.GetNumberOfParasChanged() == 1 )
{
// #103483# Exactly one paragraph added/removed. This is
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 8ef5a6ebec4f..a509520ba08c 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -58,6 +58,7 @@
#include <sal/log.hxx>
#include <algorithm>
+#include <cstdlib>
#include <math.h>
#include <unordered_set>
@@ -552,8 +553,8 @@ void EnhancedCustomShape2d::ApplyShapeAttributes( const SdrCustomShapeGeometryIt
{
nCoordLeft = aViewBox.X;
nCoordTop = aViewBox.Y;
- nCoordWidthG = labs( aViewBox.Width );
- nCoordHeightG = labs( aViewBox.Height);
+ nCoordWidthG = std::abs( aViewBox.Width );
+ nCoordHeightG = std::abs( aViewBox.Height);
}
const OUString sPath( "Path" );
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index abd592d6ce01..5c9989320695 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cstdlib>
#include <svx/strings.hrc>
#include <svx/dialmgr.hxx>
@@ -529,9 +532,9 @@ void E3dScene::RotateScene (const Point& rRef, double sn, double cs)
UpperLeft = aOutRect.TopLeft();
LowerRight = aOutRect.BottomRight();
- tools::Long dxOutRectHalf = labs(UpperLeft.X() - LowerRight.X());
+ tools::Long dxOutRectHalf = std::abs(UpperLeft.X() - LowerRight.X());
dxOutRectHalf /= 2;
- tools::Long dyOutRectHalf = labs(UpperLeft.Y() - LowerRight.Y());
+ tools::Long dyOutRectHalf = std::abs(UpperLeft.Y() - LowerRight.Y());
dyOutRectHalf /= 2;
// Only the center is moved. The corners are moved by NbcMove. For the