Kaydet (Commit) e31b3e0b authored tarafından Ashod Nakashian's avatar Ashod Nakashian Kaydeden (comit) Miklos Vajna

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>
(cherry picked from commit 17ac8354)
üst f04f2f57
...@@ -112,9 +112,10 @@ struct SwPaintProperties; ...@@ -112,9 +112,10 @@ struct SwPaintProperties;
//other subsidiary lines enabled? //other subsidiary lines enabled?
#define IS_SUBS (!gProp.pSGlobalShell->GetViewOptions()->IsPagePreview() && \ #define IS_SUBS (!gProp.pSGlobalShell->GetViewOptions()->IsPagePreview() && \
!gProp.pSGlobalShell->GetViewOptions()->IsReadonly() && \ !gProp.pSGlobalShell->GetViewOptions()->IsReadonly() && \
!gProp.pSGlobalShell->GetViewOptions()->IsFormView() &&\ !gProp.pSGlobalShell->GetViewOptions()->IsFormView() &&\
SwViewOption::IsDocBoundaries()) !gProp.pSGlobalShell->GetViewOptions()->IsHideWhitespaceMode() &&\
SwViewOption::IsDocBoundaries())
//subsidiary lines for sections //subsidiary lines for sections
#define IS_SUBS_SECTION (!gProp.pSGlobalShell->GetViewOptions()->IsPagePreview() && \ #define IS_SUBS_SECTION (!gProp.pSGlobalShell->GetViewOptions()->IsPagePreview() && \
!gProp.pSGlobalShell->GetViewOptions()->IsReadonly()&&\ !gProp.pSGlobalShell->GetViewOptions()->IsReadonly()&&\
......
...@@ -2932,11 +2932,14 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder ...@@ -2932,11 +2932,14 @@ void SwLayoutFrm::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder
if ( mbValidPrtArea && mbValidSize ) if ( mbValidPrtArea && mbValidSize )
return; return;
SwViewShell *pSh = getRootFrm()->GetCurrShell();
const bool hideWhitespace = (pSh && pSh->GetViewOptions()->IsHideWhitespaceMode());
const sal_uInt16 nLeft = (sal_uInt16)pAttrs->CalcLeft( this ); 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 nRight = (sal_uInt16)pAttrs->CalcRight( this );
const sal_uInt16 nLower = pAttrs->CalcBottom(); const sal_uInt16 nLower = hideWhitespace ? 0 : pAttrs->CalcBottom();
bool bVert = IsVertical() && !IsPageFrm(); bool bVert = IsVertical() && !IsPageFrm();
SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori; SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
if ( !mbValidPrtArea ) 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