Kaydet (Commit) 4a610062 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove < USHRT_MAX check that is presumably no longer needed

The check was like this ever since 84a3db80
"initial import" (and SwRootFrame::mnBrowseWidth---which the nWidth here is
ultimately assigned to---was also of type long back then).  But the only use
of SwRootFrame::mnBrowseWidth, in the call to SwRootFrame::GetBrowseWidth at

> long nWidth = GetUpper() ? static_cast<SwRootFrame*>(GetUpper())->GetBrowseWidth() : 0;

in SwPageFrame::MakeAll (sw/source/core/layout/calcmove.cxx), assigns it to a
long nWidth that doesn't appear to be used in a context where it needs to be
restricted to USHORT values (at least not any longer?), so assume that initial
check against USHRT_MAX-2000 is no longer needed.

Change-Id: Ibac19ab9d3f5499e817cae0fed79c11a452314f4
Reviewed-on: https://gerrit.libreoffice.org/49096Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst 5357ca82
......@@ -1761,10 +1761,10 @@ void SwRootFrame::ImplCalcBrowseWidth()
SwBorderAttrAccess aAccess( SwFrame::GetCache(), pFrame );
const SwBorderAttrs &rAttrs = *aAccess.Get();
const SwFormatHoriOrient &rHori = rAttrs.GetAttrSet().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() )
if ( text::HoriOrientation::FULL != rHori.GetHoriOrient() )
{
long nWidth = rAttrs.GetSize().Width();
const SwHTMLTableLayout *pLayoutInfo =
static_cast<const SwTabFrame *>(pFrame)->GetTable()
->GetHTMLTableLayout();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment