summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-08-14 17:21:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-08-15 08:39:08 +0200
commitd9c312d1917bc039bb0354c8c3f5c9dbbb758cf1 (patch)
tree02973a87d541ae5dee0c3b9476d70eac2f0c5035 /sw
parent48baa68e3ac12bbaf0d5b7912a0197accf341b25 (diff)
tdf#119252: Revert "Remove < USHRT_MAX check that is presumably no longer
...needed" This reverts commit 4a61006255c67bb6f9ac99107093a424a9de441e, as it turns out to actually break things. I'm not quite sure how I came across that code and the attempted fix back then, but at least ASan+UBSan `make check` still works after the revert (and UBSan seems the most likely reason I came across this). I know too little about that Writer table layout code to know whether the original code is actually good, or would need some other fixing, so lets just revert for now. Change-Id: I1e88372a3b688a5fdd4c1bf88033b51287195799 Reviewed-on: https://gerrit.libreoffice.org/59002 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/pagechg.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index e338f9824a3d..5f9bd2c5f01b 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1762,10 +1762,10 @@ void SwRootFrame::ImplCalcBrowseWidth()
SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame );
const SwBorderAttrs &rAttrs = *aAccess.Get();
const SwFormatHoriOrient &rHori = rAttrs.GetAttrSet().GetHoriOrient();
- if ( text::HoriOrientation::FULL != rHori.GetHoriOrient() )
+ long nWidth = rAttrs.GetSize().Width();
+ if ( nWidth < USHRT_MAX-2000 && //-2k, because USHRT_MAX gets missing while trying to resize!
+ text::HoriOrientation::FULL != rHori.GetHoriOrient() )
{
- long nWidth = rAttrs.GetSize().Width();
-
const SwHTMLTableLayout *pLayoutInfo =
static_cast<const SwTabFrame *>(pFrame)->GetTable()
->GetHTMLTableLayout();