diff options
-rw-r--r-- | sw/source/core/layout/pagechg.cxx | 6 |
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(); |