summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/viewopt.hxx3
-rw-r--r--sw/source/core/layout/hffrm.cxx6
-rw-r--r--sw/source/uibase/config/viewopt.cxx4
3 files changed, 11 insertions, 2 deletions
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index c9d5602ad6bd..4b9076bcf534 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -150,6 +150,7 @@ protected:
bool mbBrowseMode : 1;
bool mbBookView : 1; // View mode for page preview.
bool mbViewLayoutBookMode : 1; // Book view mode for edit view.
+ bool mbHideWhitespaceMode : 1; // Hide header, footer, and pagebreak.
bool bShowPlaceHolderFields : 1; // Only used in printing!
mutable bool bIdle;
@@ -394,6 +395,8 @@ public:
void SetViewLayoutBookMode( bool bNew ) { mbViewLayoutBookMode = bNew; }
sal_uInt16 GetViewLayoutColumns() const { return mnViewLayoutColumns; }
void SetViewLayoutColumns( sal_uInt16 nNew ) { mnViewLayoutColumns = nNew; }
+ bool IsHideWhitespaceMode() const { return mbHideWhitespaceMode; }
+ void SetHideWhitespaceMode( bool bMode ) { mbHideWhitespaceMode = bMode; }
#ifdef DBG_UTIL
// Correspond to statements in ui/config/cfgvw.src.
diff --git a/sw/source/core/layout/hffrm.cxx b/sw/source/core/layout/hffrm.cxx
index e12df3e12c35..631a7072ac94 100644
--- a/sw/source/core/layout/hffrm.cxx
+++ b/sw/source/core/layout/hffrm.cxx
@@ -673,7 +673,8 @@ void SwPageFrm::PrepareHeader()
const SwFormatHeader &rH = static_cast<SwFrameFormat*>(GetRegisteredIn())->GetHeader();
const SwViewShell *pSh = getRootFrm()->GetCurrShell();
- const bool bOn = !(pSh && pSh->GetViewOptions()->getBrowseMode());
+ const bool bOn = !(pSh && (pSh->GetViewOptions()->getBrowseMode() ||
+ pSh->GetViewOptions()->IsHideWhitespaceMode()));
if ( bOn && rH.IsActive() )
{ //Implant header, but remove first, if already present
@@ -715,7 +716,8 @@ void SwPageFrm::PrepareFooter()
pLay = static_cast<SwLayoutFrm*>(pLay->GetNext());
const SwViewShell *pSh = getRootFrm()->GetCurrShell();
- const bool bOn = !(pSh && pSh->GetViewOptions()->getBrowseMode());
+ const bool bOn = !(pSh && (pSh->GetViewOptions()->getBrowseMode() ||
+ pSh->GetViewOptions()->IsHideWhitespaceMode()));
if ( bOn && rF.IsActive() )
{ //Implant footer, but remove first, if already present
diff --git a/sw/source/uibase/config/viewopt.cxx b/sw/source/uibase/config/viewopt.cxx
index 190a6e3b5d72..1a105b89db6f 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -81,6 +81,7 @@ bool SwViewOption::IsEqualFlags( const SwViewOption &rOpt ) const
&& mbFormView == rOpt.IsFormView()
&& mbBrowseMode == rOpt.getBrowseMode()
&& mbViewLayoutBookMode == rOpt.mbViewLayoutBookMode
+ && mbHideWhitespaceMode == rOpt.mbHideWhitespaceMode
&& bShowPlaceHolderFields == rOpt.bShowPlaceHolderFields
&& bIdle == rOpt.bIdle
#ifdef DBG_UTIL
@@ -164,6 +165,7 @@ SwViewOption::SwViewOption() :
mbBrowseMode(false),
mbBookView(false),
mbViewLayoutBookMode(false),
+ mbHideWhitespaceMode(false),
bShowPlaceHolderFields( true ),
nZoom( 100 ),
eZoom( SvxZoomType::PERCENT ),
@@ -234,6 +236,7 @@ SwViewOption::SwViewOption(const SwViewOption& rVOpt)
mbBookView = rVOpt.mbBookView;
mbBrowseMode = rVOpt.mbBrowseMode;
mbViewLayoutBookMode = rVOpt.mbViewLayoutBookMode;
+ mbHideWhitespaceMode = rVOpt.mbHideWhitespaceMode;
bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
bIdle = rVOpt.bIdle;
@@ -274,6 +277,7 @@ SwViewOption& SwViewOption::operator=( const SwViewOption &rVOpt )
mbBookView = rVOpt.mbBookView;
mbBrowseMode = rVOpt.mbBrowseMode;
mbViewLayoutBookMode = rVOpt.mbViewLayoutBookMode;
+ mbHideWhitespaceMode = rVOpt.mbHideWhitespaceMode;
bShowPlaceHolderFields = rVOpt.bShowPlaceHolderFields;
bIdle = rVOpt.bIdle;