From 0088b38f9e5c11e87a30c1b1a6a640f46b0ebdf4 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 31 Jan 2018 08:41:38 +0100 Subject: [PATCH] SvxNumberFormat::SetAbsLSpace takes short ...so there appears to be no good reason to cast from long to sal_uInt16 first Change-Id: I5baf699fbf043eae6a20e2055b53aef10103f591 Reviewed-on: https://gerrit.libreoffice.org/48952 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- cui/source/tabpages/numpages.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 42324f87b83c..f42da5b28b74 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -3228,7 +3228,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, SpinField&, rFld, void ) if(0 == i) { long nTmp = aNumFmt.GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( sal_uInt16(nValue - nTmp)); + aNumFmt.SetAbsLSpace( nValue - nTmp); } else { @@ -3236,7 +3236,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, SpinField&, rFld, void ) pActNum->GetLevel( i - 1 ).GetFirstLineOffset() - pActNum->GetLevel( i ).GetFirstLineOffset(); - aNumFmt.SetAbsLSpace( sal_uInt16(nValue + nTmp)); + aNumFmt.SetAbsLSpace( nValue + nTmp); } } else @@ -3253,7 +3253,7 @@ IMPL_LINK( SvxNumPositionTabPage, DistanceHdl_Impl, SpinField&, rFld, void ) // together with the FirstLineOffset the AbsLSpace must be changed, too long nDiff = nValue + aNumFmt.GetFirstLineOffset(); long nAbsLSpace = aNumFmt.GetAbsLSpace(); - aNumFmt.SetAbsLSpace(sal_uInt16(nAbsLSpace + nDiff)); + aNumFmt.SetAbsLSpace(nAbsLSpace + nDiff); aNumFmt.SetFirstLineOffset( -static_cast(nValue) ); }