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

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
f164c682 "Introduce dedicated
SwXMLTableContext::MAX_WIDTH, replacing USHRT_MAX".)

So this was the reason for 4a610062 "Remove <
USHRT_MAX check that is presumably no longer needed" that now had to be reverted
again with d9c312d1 "tdf#119252: Revert 'Remove
< USHRT_MAX check that is presumably no longer".

Change-Id: I7ff4f6ab61adc2490bcab46ec5e5a65d9302141f
üst 4b84202e
......@@ -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 =
......
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