Kaydet (Commit) 17ac8354 authored tarafından Ashod Nakashian's avatar Ashod Nakashian Kaydeden (comit) Caolán McNamara

tdf#39080 Hide vertical whitespace when HideWhitespace option is set.

Change-Id: I1d0a974a0b4b7053f59c23aa883bef61fd1df177
Reviewed-on: https://gerrit.libreoffice.org/17279Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 1d1d5f90
......@@ -113,9 +113,10 @@ struct SwPaintProperties;
//other subsidiary lines enabled?
#define IS_SUBS (!gProp.pSGlobalShell->GetViewOptions()->IsPagePreview() && \
!gProp.pSGlobalShell->GetViewOptions()->IsReadonly() && \
!gProp.pSGlobalShell->GetViewOptions()->IsFormView() &&\
SwViewOption::IsDocBoundaries())
!gProp.pSGlobalShell->GetViewOptions()->IsReadonly() && \
!gProp.pSGlobalShell->GetViewOptions()->IsFormView() &&\
!gProp.pSGlobalShell->GetViewOptions()->IsHideWhitespaceMode() &&\
SwViewOption::IsDocBoundaries())
//subsidiary lines for sections
#define IS_SUBS_SECTION (!gProp.pSGlobalShell->GetViewOptions()->IsPagePreview() && \
!gProp.pSGlobalShell->GetViewOptions()->IsReadonly()&&\
......
......@@ -2932,11 +2932,14 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
if ( mbValidPrtArea && mbValidSize )
return;
SwViewShell *pSh = getRootFrm()->GetCurrShell();
const bool hideWhitespace = (pSh && pSh->GetViewOptions()->IsHideWhitespaceMode());
const sal_uInt16 nLeft = (sal_uInt16)pAttrs->CalcLeft( this );
const sal_uInt16 nUpper = pAttrs->CalcTop();
const sal_uInt16 nUpper = hideWhitespace ? 0 : pAttrs->CalcTop();
const sal_uInt16 nRight = (sal_uInt16)pAttrs->CalcRight( this );
const sal_uInt16 nLower = pAttrs->CalcBottom();
const sal_uInt16 nLower = hideWhitespace ? 0 : pAttrs->CalcBottom();
bool bVert = IsVertical() && !IsPageFrm();
SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
if ( !mbValidPrtArea )
......
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