summaryrefslogtreecommitdiffstats
path: root/sc/source/ui/view/gridwin.cxx
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 /sc/source/ui/view/gridwin.cxx
parenttdf#138049 different parents for restart dialog depending on ok vs apply (diff)
downloadcore-50d3ad9127aaf63afcfa299adcea060c9b09faa4.tar.gz
core-50d3ad9127aaf63afcfa299adcea060c9b09faa4.zip
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 'sc/source/ui/view/gridwin.cxx')
-rw-r--r--sc/source/ui/view/gridwin.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c5274ec4c23b..f15418a4e998 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -19,6 +19,7 @@
#include <scitems.hxx>
+#include <cstdlib>
#include <memory>
#include <editeng/adjustitem.hxx>
#include <sot/storage.hxx>
@@ -3676,8 +3677,8 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
{
if ( &rThisDoc == pSourceDoc && nTab == aSourceRange.aStart.Tab() )
{
- tools::Long nDeltaX = labs( static_cast< tools::Long >( nNewDragX - nSourceStartX ) );
- tools::Long nDeltaY = labs( static_cast< tools::Long >( nNewDragY - nSourceStartY ) );
+ tools::Long nDeltaX = std::abs( static_cast< tools::Long >( nNewDragX - nSourceStartX ) );
+ tools::Long nDeltaY = std::abs( static_cast< tools::Long >( nNewDragY - nSourceStartY ) );
if ( nDeltaX <= nDeltaY )
{
eDragInsertMode = INS_CELLSDOWN;