diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-08-15 12:40:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-08-15 12:45:20 +0200 |
commit | 64474264443a83a341c161bbcc6592073a1728f9 (patch) | |
tree | ff35e2e588a800fad024c4c78afd01a42aebfcad /sw/source/core/layout/pagechg.cxx | |
parent | 4b84202e8e495ed2f658215357963f3d23e94528 (diff) |
Silence bogus -Werror,-Wsign-compare
...in some Android builds like <https://tinderbox.libreoffice.org/cgi-bin/
gunzip.cgi?tree=MASTER&brief-log=1534320601.32504>, where USHRT_MAX is wrongly
of type unsigned int. (Cf. similar comits like
f164c68296b66d534ed2c9de6da4c01e328959d9 "Introduce dedicated
SwXMLTableContext::MAX_WIDTH, replacing USHRT_MAX".)
So this was the reason for 4a61006255c67bb6f9ac99107093a424a9de441e "Remove <
USHRT_MAX check that is presumably no longer needed" that now had to be reverted
again with d9c312d1917bc039bb0354c8c3f5c9dbbb758cf1 "tdf#119252: Revert 'Remove
< USHRT_MAX check that is presumably no longer".
Change-Id: I7ff4f6ab61adc2490bcab46ec5e5a65d9302141f
Diffstat (limited to 'sw/source/core/layout/pagechg.cxx')
-rw-r--r-- | sw/source/core/layout/pagechg.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 5f9bd2c5f01b..6d1bd3e0fa45 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -1763,7 +1763,7 @@ void SwRootFrame::ImplCalcBrowseWidth() const SwBorderAttrs &rAttrs = *aAccess.Get(); const SwFormatHoriOrient &rHori = rAttrs.GetAttrSet().GetHoriOrient(); long nWidth = rAttrs.GetSize().Width(); - if ( nWidth < USHRT_MAX-2000 && //-2k, because USHRT_MAX gets missing while trying to resize! + if ( nWidth < int(USHRT_MAX)-2000 && //-2k, because USHRT_MAX gets missing while trying to resize! (and cast to int to avoid -Wsign-compare due to broken USHRT_MAX on Android) text::HoriOrientation::FULL != rHori.GetHoriOrient() ) { const SwHTMLTableLayout *pLayoutInfo = |