sw/source/core/layout/pagechg.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
New commits: commit ab8b8fdbb32ad4da5af521b1b982189786bcdcb4 Author: Stephan Bergmann <[email protected]> AuthorDate: Tue Aug 14 17:21:01 2018 +0200 Commit: Christian Lohmaier <[email protected]> CommitDate: Thu Aug 16 12:06:25 2018 +0200 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 <[email protected]> (cherry picked from commit d9c312d1917bc039bb0354c8c3f5c9dbbb758cf1) Reviewed-on: https://gerrit.libreoffice.org/59039 Tested-by: Xisco FaulĂ <[email protected]> Reviewed-by: Christian Lohmaier <[email protected]> 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(); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
