diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-09-07 22:22:47 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-09-08 15:42:58 +0200 |
commit | 79f53401c6801e240800fb6e1eaae8f55974f9c6 (patch) | |
tree | 4c7a57602aec1dda55a5104be4bd5a5d97064634 /sw/source/ui/inc | |
parent | 1291efeee9ee4079e6bb38e0b06e9f73c365c7a0 (diff) |
Header/Footer: just don't always drop and create SwHeaderFooterWin
This minimizes the number of creation / deletion of SwHeaderFooterWin
objects and simply updates the existing ones.
Diffstat (limited to 'sw/source/ui/inc')
-rw-r--r-- | sw/source/ui/inc/HeaderFooterWin.hxx | 9 | ||||
-rw-r--r-- | sw/source/ui/inc/edtwin.hxx | 5 |
2 files changed, 11 insertions, 3 deletions
diff --git a/sw/source/ui/inc/HeaderFooterWin.hxx b/sw/source/ui/inc/HeaderFooterWin.hxx index 42b80a1c28ed..cd2991adc810 100644 --- a/sw/source/ui/inc/HeaderFooterWin.hxx +++ b/sw/source/ui/inc/HeaderFooterWin.hxx @@ -30,6 +30,7 @@ #include <pagedesc.hxx> +#include <vcl/menubtn.hxx> #include <vcl/window.hxx> class SwHeaderFooterButton; @@ -48,13 +49,19 @@ class SwHeaderFooterWin : public Window SwHeaderFooterButton* m_pButton; public: - SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm, bool bHeader, Point aOffset ); + SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm, bool bHeader ); ~SwHeaderFooterWin( ); + void SetOffset( Point aOffset ); + virtual void Paint( const Rectangle& rRect ); bool IsHeader() { return m_bIsHeader; }; bool IsEmptyHeaderFooter( ); + const SwPageFrm* GetPageFrame( ) { return m_pPageFrm; }; + +private: + MenuButton* GetMenuButton(); }; #endif diff --git a/sw/source/ui/inc/edtwin.hxx b/sw/source/ui/inc/edtwin.hxx index 1c03d77c32dc..142514c655f7 100644 --- a/sw/source/ui/inc/edtwin.hxx +++ b/sw/source/ui/inc/edtwin.hxx @@ -312,8 +312,9 @@ public: void SetUseInputLanguage( sal_Bool bNew ); sal_Bool IsUseInputLanguage() const { return bUseInputLanguage; } - void AddHeaderFooterControl( const SwPageFrm* pPageFrm, bool bHeader, Point aOffset ); - void ClearHeaderFooterControls( ); + void SetHeaderFooterControl( const SwPageFrm* pPageFrm, bool bHeader, Point aOffset ); + void RemoveHeaderFooterControls( const SwPageFrm* pPageFrm ); + void HideHeaderFooterControls( ); SwEditWin(Window *pParent, SwView &); virtual ~SwEditWin(); |