summaryrefslogtreecommitdiff
path: root/sw/source/ui/docvw/HeaderFooterWin.cxx
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-09-08 15:38:50 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-09-08 15:42:59 +0200
commit91042f3f0a4328bc46e17e8b32d5021003fb7e04 (patch)
treebc7f5ee487acb505b416f28cfd5d8bf3bbb2e599 /sw/source/ui/docvw/HeaderFooterWin.cxx
parentdc557cd036e49f6d642bcdbd79a525371c7c513c (diff)
Header/Footer: implement the edit menu item
Opens the page style at the header or footer tab.
Diffstat (limited to 'sw/source/ui/docvw/HeaderFooterWin.cxx')
-rw-r--r--sw/source/ui/docvw/HeaderFooterWin.cxx16
1 files changed, 14 insertions, 2 deletions
diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx
index 1dffb6e35edb..e926d5406bcb 100644
--- a/sw/source/ui/docvw/HeaderFooterWin.cxx
+++ b/sw/source/ui/docvw/HeaderFooterWin.cxx
@@ -28,10 +28,12 @@
#include <app.hrc>
#include <docvw.hrc>
+#include <globals.hrc>
#include <popup.hrc>
#include <svtools/svtools.hrc>
#include <cmdid.h>
+#include <docsh.hxx>
#include <edtwin.hxx>
#include <fmthdft.hxx>
#include <HeaderFooterWin.hxx>
@@ -252,7 +254,17 @@ void SwHeaderFooterWin::ExecuteCommand( sal_uInt16 nSlot )
switch ( nSlot )
{
case FN_HEADERFOOTER_EDIT:
- // TODO Implement me
+ {
+ SwView& rView = m_pEditWin->GetView();
+ SwWrtShell& rSh = rView.GetWrtShell();
+ sal_uInt16 nPageId = TP_FOOTER_PAGE;
+ if ( IsHeader() )
+ nPageId = TP_HEADER_PAGE;
+
+ rView.GetDocShell()->FormatPage(
+ GetPageFrame()->GetPageDesc()->GetName(),
+ nPageId, &rSh );
+ }
break;
case FN_HEADERFOOTER_DELETE:
ChangeHeaderOrFooter( false );
@@ -274,7 +286,7 @@ SwHeaderFooterButton::SwHeaderFooterButton( SwHeaderFooterWin* pWindow ) :
SwHeaderFooterButton::~SwHeaderFooterButton( )
{
- delete m_pWindow;
+ delete m_pPopupMenu;
}
void SwHeaderFooterButton::Paint( const Rectangle& )