diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-02-01 15:12:26 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-02-01 20:52:11 +0100 |
commit | 4a61006255c67bb6f9ac99107093a424a9de441e (patch) | |
tree | 6101cafcacff9c688ceb6d8c13d29880cd0a6b38 | |
parent | 5357ca82846ea7147ad61e9340f25647a5934eb0 (diff) |
Remove < USHRT_MAX check that is presumably no longer needed
The check was like this ever since 84a3db80b4fd66c6854b3135b5f69b61fd828e62
"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/49096
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-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 58ffeed1a424..b6bbc0c90ff6 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -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(); |