summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-08-14 17:21:01 +0200
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2018-08-16 12:06:25 +0200
commitab8b8fdbb32ad4da5af521b1b982189786bcdcb4 (patch)
treeac1d68b0c3bfc12328b275f46ef579ff07081bb5 /sw/source
parente9e18b5a3a0e9651b7161278a61c6a7ce0b9df0b (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> (cherry picked from commit d9c312d1917bc039bb0354c8c3f5c9dbbb758cf1) Reviewed-on: https://gerrit.libreoffice.org/59039 Tested-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'sw/source')
-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 036e3371e97c..ac6c74f4fc57 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -1764,10 +1764,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();