diff --git a/sw/source/ui/app/mn.src b/sw/source/ui/app/mn.src index e7a59f5c3a88..c63d6d087ee8 100644 --- a/sw/source/ui/app/mn.src +++ b/sw/source/ui/app/mn.src @@ -1442,13 +1442,13 @@ Menu MN_HEADERFOOTER_BUTTON { Identifier = FN_HEADERFOOTER_EDIT ; HelpID = CMD_FN_HEADERFOOTER_EDIT ; - Text [ en-US ] = "Edit" ; + Text [ en-US ] = "Format $1..." ; }; MenuItem { Identifier = FN_HEADERFOOTER_DELETE ; HelpID = CMD_FN_HEADERFOOTER_DELETE ; - Text [ en-US ] = "Remove" ; + Text [ en-US ] = "Delete $1" ; }; }; }; 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 #include #include +#include #include #include #include @@ -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" ; +}; +