[Libreoffice-commits] core.git: sw/source

Stephan Bergmann sbergman at redhat.com
Thu Feb 1 07:22:13 UTC 2018


 sw/source/core/text/itrform2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 3171066a959b52cd483bb22a0d1046e633f092f6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jan 31 23:02:34 2018 +0100

    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/49065
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index e1ab681d6679..d29110519974 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -2388,7 +2388,7 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
         if( nNextTop > aInter.Bottom() )
         {
             SwTwips nH = nNextTop - aInter.Top();
-            if( nH < USHRT_MAX )
+            if( nH < SAL_MAX_UINT16 )
                 pFly->Height( sal_uInt16( nH ) );
         }
         if( nAscent < pFly->Height() )


More information about the Libreoffice-commits mailing list