Kaydet (Commit) 3171066a authored tarafından Stephan Bergmann's avatar Stephan Bergmann

USHRT_MAX -> SAL_MAX_UINT16

...as nH needs to fit into the following SwPosSize::Height call's parameter of
type sal_uInt16.  And whatever the reason to check for < instead of
<= USHRT_MAX...

Change-Id: I0377d51e7411eef7913d951eb972214a8d8d5768
Reviewed-on: https://gerrit.libreoffice.org/49065Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 0913b2af
...@@ -2388,7 +2388,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf ) ...@@ -2388,7 +2388,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
if( nNextTop > aInter.Bottom() ) if( nNextTop > aInter.Bottom() )
{ {
SwTwips nH = nNextTop - aInter.Top(); SwTwips nH = nNextTop - aInter.Top();
if( nH < USHRT_MAX ) if( nH < SAL_MAX_UINT16 )
pFly->Height( sal_uInt16( nH ) ); pFly->Height( sal_uInt16( nH ) );
} }
if( nAscent < pFly->Height() ) if( nAscent < pFly->Height() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment