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 <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
Stephan Bergmann 2018-01-31 08:41:38 +01:00
parent d635fc5f50
commit 0088b38f9e

View File

@ -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<short>(nValue) );
}