diff options
author | Ashod Nakashian <ashodnakashian@yahoo.com> | 2015-07-15 10:42:39 -0400 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-11-18 10:19:02 +0100 |
commit | e31b3e0b818c56031d7ba2bcf70742e52d83f08f (patch) | |
tree | 26f08b9843694d872ab48629a2b60aaf8d12965d /sw | |
parent | f04f2f5708414691de622cfd6a1d891841c66b5e (diff) |
tdf#39080 Hide vertical whitespace when HideWhitespace option is set.
Change-Id: I1d0a974a0b4b7053f59c23aa883bef61fd1df177
Reviewed-on: https://gerrit.libreoffice.org/17279
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 17ac8354c97e107712d3ad59ab3140a8d0d3b78c)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/layout/wsfrm.cxx | 7 |
2 files changed, 9 insertions, 5 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 0d8bcaaf4945..77f7c496217b 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -112,9 +112,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()&&\ diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index e96d33db5710..2304e4a52ef4 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -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 ) |