sw/source/core/layout/pagechg.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit d9c312d1917bc039bb0354c8c3f5c9dbbb758cf1
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Aug 14 17:21:01 2018 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Aug 15 08:39:08 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 <sberg...@redhat.com>

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();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to