summaryrefslogtreecommitdiff
path: root/sw/source/ui/docvw
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-09-09 21:23:11 +0200
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-09-09 21:34:22 +0200
commit7bdee3289aac2c2f96204d06f30dee80657bc21b (patch)
treeffa876e0dcc3904a41484fe7b76712d712b74050 /sw/source/ui/docvw
parent16400db4629133ad59ce8cbc8746a63b33202fd3 (diff)
Header/Footer: adjusted popup menu texts
Diffstat (limited to 'sw/source/ui/docvw')
-rw-r--r--sw/source/ui/docvw/HeaderFooterWin.cxx16
-rw-r--r--sw/source/ui/docvw/docvw.hrc2
-rw-r--r--sw/source/ui/docvw/docvw.src10
3 files changed, 27 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 );
}
diff --git a/sw/source/ui/docvw/docvw.hrc b/sw/source/ui/docvw/docvw.hrc
index 136bbc130299..7e318abee88f 100644
--- a/sw/source/ui/docvw/docvw.hrc
+++ b/sw/source/ui/docvw/docvw.hrc
@@ -83,6 +83,8 @@
#define STR_HEADER_TITLE (RC_DOCVW_BEGIN + 22)
#define STR_FOOTER_TITLE (RC_DOCVW_BEGIN + 23)
+#define STR_HEADER (RC_DOCVW_BEGIN + 24)
+#define STR_FOOTER (RC_DOCVW_BEGIN + 25)
#define MSG_READONLY_CONTENT (RC_DOCVW_BEGIN + 1)
diff --git a/sw/source/ui/docvw/docvw.src b/sw/source/ui/docvw/docvw.src
index ec01a8fa1bdc..a843c0837e13 100644
--- a/sw/source/ui/docvw/docvw.src
+++ b/sw/source/ui/docvw/docvw.src
@@ -301,3 +301,13 @@ String STR_FOOTER_TITLE
Text [ en-US ] = "Footer (%1)" ;
};
+String STR_HEADER
+{
+ Text [ en-US ] = "Header" ;
+};
+
+String STR_FOOTER
+{
+ Text [ en-US ] = "Footer" ;
+};
+