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>
This commit is contained in:
@@ -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)
|
||||
|
@@ -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)";
|
||||
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user