diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-20 11:53:08 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-20 10:02:54 +0000 |
commit | 4846c0fed99c4e6759b49cf9a02270d96e7c0863 (patch) | |
tree | 1f72b12875a8f3e8ee7b52a300563bc4ab2bc6d7 /framework | |
parent | e39983fdafa8e23e784818c124f4de5192ef1bb0 (diff) |
Open menu: Simplify inserting menu entries
Change-Id: Ia75f2fe349580003b16735fccf429392d0cf8363
Reviewed-on: https://gerrit.libreoffice.org/30082
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/inc/classes/resource.hrc | 3 | ||||
-rw-r--r-- | framework/source/classes/resource.src | 5 | ||||
-rw-r--r-- | framework/source/uielement/recentfilesmenucontroller.cxx | 20 |
3 files changed, 5 insertions, 23 deletions
diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc index f0fdc89313dc..49c051c3ea8d 100644 --- a/framework/inc/classes/resource.hrc +++ b/framework/inc/classes/resource.hrc @@ -50,8 +50,7 @@ #define STR_CLEAR_RECENT_FILES (RID_STR_START+23) #define STR_CLEAR_RECENT_FILES_HELP (RID_STR_START+24) #define STR_LANGSTATUS_HINT (RID_STR_START+25) -#define STR_OPEN_REMOTE (RID_STR_START+26) -#define STR_REMOTE_TITLE (RID_STR_START+27) +#define STR_REMOTE_TITLE (RID_STR_START+26) #define IMG_SAVEMODIFIED_SMALL (RID_IMAGE_START+0) #define IMG_SAVEMODIFIED_LARGE (RID_IMAGE_START+1) diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src index 74121410b513..dd5d8772031b 100644 --- a/framework/source/classes/resource.src +++ b/framework/source/classes/resource.src @@ -113,11 +113,6 @@ String STR_CLEAR_RECENT_FILES_HELP Text [ en-US ] = "Clears the list with the most recently opened files. This action can not be undone."; }; -String STR_OPEN_REMOTE -{ - Text [ en-US ] = "Open Remote File"; -}; - String STR_REMOTE_TITLE { Text [ en-US ] = " (Remote)"; diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index c7a8611ab696..5873b4a0164f 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -243,28 +243,16 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > if ( m_bShowToolbarEntries ) { pVCLPopupMenu->InsertSeparator(); - pVCLPopupMenu->InsertItem( sal_uInt16( nCount + 2 ), - vcl::CommandInfoProvider::Instance().GetMenuLabelForCommand( - CMD_OPEN_AS_TEMPLATE, m_xFrame) ); - pVCLPopupMenu->SetItemCommand( sal_uInt16( nCount + 2 ), - CMD_OPEN_AS_TEMPLATE ); - pVCLPopupMenu->InsertItem( sal_uInt16( nCount + 3 ), - FWK_RESSTR(STR_OPEN_REMOTE) ); - pVCLPopupMenu->SetItemCommand( sal_uInt16( nCount + 3 ), - CMD_OPEN_REMOTE ); + pVCLPopupMenu->InsertItem( CMD_OPEN_AS_TEMPLATE, m_xFrame ); + pVCLPopupMenu->InsertItem( CMD_OPEN_REMOTE, m_xFrame ); } } else { if ( m_bShowToolbarEntries ) { - // Open as template menu entry - pVCLPopupMenu->InsertItem( 1, vcl::CommandInfoProvider::Instance().GetMenuLabelForCommand( - CMD_OPEN_AS_TEMPLATE, m_xFrame) ); - pVCLPopupMenu->SetItemCommand( 1, CMD_OPEN_AS_TEMPLATE ); - // Open remote menu entry - pVCLPopupMenu->InsertItem( 2, FWK_RESSTR(STR_OPEN_REMOTE) ); - pVCLPopupMenu->SetItemCommand( 2, CMD_OPEN_REMOTE ); + pVCLPopupMenu->InsertItem( CMD_OPEN_AS_TEMPLATE, m_xFrame ); + pVCLPopupMenu->InsertItem( CMD_OPEN_REMOTE, m_xFrame ); } else { |