diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-09-09 21:23:11 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-09-09 21:34:22 +0200 |
commit | 7bdee3289aac2c2f96204d06f30dee80657bc21b (patch) | |
tree | ffa876e0dcc3904a41484fe7b76712d712b74050 /sw/source/ui/docvw/HeaderFooterWin.cxx | |
parent | 16400db4629133ad59ce8cbc8746a63b33202fd3 (diff) |
Header/Footer: adjusted popup menu texts
Diffstat (limited to 'sw/source/ui/docvw/HeaderFooterWin.cxx')
-rw-r--r-- | sw/source/ui/docvw/HeaderFooterWin.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/source/ui/docvw/HeaderFooterWin.cxx index 1a33706fa97b..2f9a99cc430b 100644 --- a/sw/source/ui/docvw/HeaderFooterWin.cxx +++ b/sw/source/ui/docvw/HeaderFooterWin.cxx @@ -38,6 +38,7 @@ #include <fmthdft.hxx> #include <HeaderFooterWin.hxx> #include <pagefrm.hxx> +#include <SwRewriter.hxx> #include <view.hxx> #include <viewopt.hxx> #include <wrtsh.hxx> @@ -293,7 +294,20 @@ SwHeaderFooterButton::SwHeaderFooterButton( SwHeaderFooterWin* pWindow ) : { // Create and set the PopupMenu m_pPopupMenu = new PopupMenu( SW_RES( MN_HEADERFOOTER_BUTTON ) ); - // TODO Potentially rewrite the menu entries' text + + // Rewrite the menu entries' text + String sType = SW_RESSTR( STR_FOOTER ); + if ( m_pWindow->IsHeader() ) + sType = SW_RESSTR( STR_HEADER ); + SwRewriter aRewriter; + aRewriter.AddRule( String::CreateFromAscii( "$1" ), sType ); + + String aText = m_pPopupMenu->GetItemText( FN_HEADERFOOTER_EDIT ); + m_pPopupMenu->SetItemText( FN_HEADERFOOTER_EDIT, aRewriter.Apply( aText ) ); + + aText = m_pPopupMenu->GetItemText( FN_HEADERFOOTER_DELETE ); + m_pPopupMenu->SetItemText( FN_HEADERFOOTER_DELETE, aRewriter.Apply( aText ) ); + SetPopupMenu( m_pPopupMenu ); } |