summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/viewsh.hxx2
-rwxr-xr-xsw/source/core/layout/paintfrm.cxx8
-rw-r--r--sw/source/ui/docvw/edtwin.cxx3
-rw-r--r--sw/source/ui/inc/wrtsh.hxx1
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx7
5 files changed, 11 insertions, 10 deletions
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 8c2cab872725..241fb17b8e3e 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -568,7 +568,7 @@ public:
void ToggleHeaderFooterEdit( );
sal_Bool IsHeaderFooterEdit( ) const { return bHeaderFooterEdit; }
sal_Bool IsShowHeaderFooterSeparator( ) { return bShowHeaderFooterSeparator; }
- void SetShowHeaderFooterSeparator( sal_Bool bShow ) { bShowHeaderFooterSeparator = bShow; }
+ virtual void SetShowHeaderFooterSeparator( sal_Bool bShow ) { bShowHeaderFooterSeparator = bShow; }
};
//---- class CurrShell manages global ShellPointer -------------------
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 9fa4aae31d90..d923b551b1d0 100755
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2782,14 +2782,6 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const
else
SwRootFrm::bInPaint = bResetRootPaint = sal_True;
- SwWrtShell* pWrtSh = dynamic_cast< SwWrtShell* >( pSh );
- if ( pWrtSh )
- {
- SwEditWin& rEditWin = pWrtSh->GetView().GetEditWin();
- rEditWin.HideHeaderFooterControls( );
- }
-
-
SwSavePaintStatics *pStatics = 0;
if ( pGlobalShell )
pStatics = new SwSavePaintStatics();
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 50f7f05d50b4..f2e2e894b331 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -5779,7 +5779,8 @@ void SwEditWin::SetHeaderFooterControl( const SwPageFrm* pPageFrm, bool bHeader,
}
pControl->SetOffset( aOffset );
- pControl->Show( );
+ if ( !pControl->IsVisible() )
+ pControl->Show( );
}
void SwEditWin::RemoveHeaderFooterControls( const SwPageFrm* pPageFrm )
diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
index 735848f73626..7d0bbfd0e2e1 100644
--- a/sw/source/ui/inc/wrtsh.hxx
+++ b/sw/source/ui/inc/wrtsh.hxx
@@ -486,6 +486,7 @@ typedef sal_Bool (SwWrtShell:: *FNSimpleMove)();
const SwRedline* GotoRedline( sal_uInt16 nArrPos, sal_Bool bSelect = sal_False);
void ChangeHeaderOrFooter(const String& rStyleName, sal_Bool bHeader, sal_Bool bOn, sal_Bool bShowWarning);
+ virtual void SetShowHeaderFooterSeparator( sal_Bool bShow );
private:
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index ec03fe41cd29..ec54dc271f0a 100644
--- a/sw/source/ui/wrtsh/wrtsh1.cxx
+++ b/sw/source/ui/wrtsh/wrtsh1.cxx
@@ -1890,4 +1890,11 @@ void SwWrtShell::ChangeHeaderOrFooter(
EndAllAction();
}
+void SwWrtShell::SetShowHeaderFooterSeparator( sal_Bool bShow )
+{
+ ViewShell::SetShowHeaderFooterSeparator( bShow );
+ if ( !bShow )
+ GetView().GetEditWin().HideHeaderFooterControls( );
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */