sw/source/core/doc/tblrwcl.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 4e41b5be785673754d433b77e0925e701cac18df
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Thu Feb 8 16:24:18 2018 +0100

    sw android: fix -Werror,-Wsign-compare, take two
    
    This time not breaking other platforms. Thanks to Stephan Bergmann for
    suggesting this alternative way.
    
    Change-Id: I2535e57de1aafd17960a1d1054fc58a47933bb58
    Reviewed-on: https://gerrit.libreoffice.org/49441
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>
    Tested-by: Jenkins <c...@libreoffice.org>

diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 889aea171ce1..e15078e58628 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -3435,7 +3435,8 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, 
TableChgWidthHeightType eType,
                 if( 
GetFrameFormat()->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE)
 &&
                     !rSz.GetWidthPercent() )
                 {
-                    bRet = rSz.GetWidth() < USHRT_MAX - nRelDiff;
+                    // silence -Wsign-compare on Android with the static cast
+                    bRet = rSz.GetWidth() < static_cast<unsigned 
short>(USHRT_MAX) - nRelDiff;
                     bChgLRSpace = bLeft ? rLR.GetLeft() >= nAbsDiff
                                         : rLR.GetRight() >= nAbsDiff;
                 }
@@ -3506,7 +3507,8 @@ bool SwTable::SetColWidth( SwTableBox& rAktBox, 
TableChgWidthHeightType eType,
                 if( bBigger )
                 {
                     // If the Table does not have any room to grow, we need to 
create some!
-                    if( aSz.GetWidth() + nRelDiff > USHRT_MAX )
+                    // silence -Wsign-compare on Android with the static cast
+                    if( aSz.GetWidth() + nRelDiff > static_cast<unsigned 
short>(USHRT_MAX) )
                     {
                         // Break down to USHRT_MAX / 2
                         CR_SetBoxWidth aTmpPara( 
TableChgWidthHeightType::ColLeft, aSz.GetWidth() / 2,
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to