open remote entry in the open drop down menu
Change-Id: Idebc8a926c6653c476c2507606d4a89b22e2eaaf
This commit is contained in:
@@ -50,6 +50,7 @@
|
|||||||
#define STR_CLEAR_RECENT_FILES (RID_STR_START+23)
|
#define STR_CLEAR_RECENT_FILES (RID_STR_START+23)
|
||||||
#define STR_CLEAR_RECENT_FILES_HELP (RID_STR_START+24)
|
#define STR_CLEAR_RECENT_FILES_HELP (RID_STR_START+24)
|
||||||
#define STR_LANGSTATUS_HINT (RID_STR_START+25)
|
#define STR_LANGSTATUS_HINT (RID_STR_START+25)
|
||||||
|
#define STR_OPEN_REMOTE (RID_STR_START+26)
|
||||||
|
|
||||||
#define POPUPMENU_TOOLBAR_QUICKCUSTOMIZATION (RID_MENU_START+0)
|
#define POPUPMENU_TOOLBAR_QUICKCUSTOMIZATION (RID_MENU_START+0)
|
||||||
|
|
||||||
|
@@ -114,6 +114,11 @@ String STR_CLEAR_RECENT_FILES_HELP
|
|||||||
Text [ en-US ] = "Clears the list with the most recently opened files. This action can not be undone.";
|
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_TOOLBAR_TITLE_ADDON
|
String STR_TOOLBAR_TITLE_ADDON
|
||||||
{
|
{
|
||||||
Text [ en-US ] = "Add-On %num%";
|
Text [ en-US ] = "Add-On %num%";
|
||||||
|
@@ -44,6 +44,7 @@ using namespace framework;
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
static const char CMD_CLEAR_LIST[] = ".uno:ClearRecentFileList";
|
static const char CMD_CLEAR_LIST[] = ".uno:ClearRecentFileList";
|
||||||
|
static const char CMD_OPEN_REMOTE[] = ".uno:OpenRemote";
|
||||||
static const char CMD_PREFIX[] = "vnd.sun.star.popup:RecentFileList?entry=";
|
static const char CMD_PREFIX[] = "vnd.sun.star.popup:RecentFileList?entry=";
|
||||||
static const char MENU_SHORTCUT[] = "~N. ";
|
static const char MENU_SHORTCUT[] = "~N. ";
|
||||||
|
|
||||||
@@ -224,6 +225,12 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
|
|||||||
OUString( CMD_CLEAR_LIST ) );
|
OUString( CMD_CLEAR_LIST ) );
|
||||||
pVCLPopupMenu->SetHelpText( sal_uInt16( nCount + 1 ),
|
pVCLPopupMenu->SetHelpText( sal_uInt16( nCount + 1 ),
|
||||||
FWK_RESSTR(STR_CLEAR_RECENT_FILES_HELP) );
|
FWK_RESSTR(STR_CLEAR_RECENT_FILES_HELP) );
|
||||||
|
|
||||||
|
// Open remote menu entry
|
||||||
|
pVCLPopupMenu->InsertItem( sal_uInt16( nCount + 2 ),
|
||||||
|
FWK_RESSTR(STR_OPEN_REMOTE) );
|
||||||
|
pVCLPopupMenu->SetItemCommand( sal_uInt16( nCount + 2 ),
|
||||||
|
OUString( CMD_OPEN_REMOTE ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -232,6 +239,14 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >
|
|||||||
// Do not disable it, otherwise the Toolbar controller and MenuButton
|
// Do not disable it, otherwise the Toolbar controller and MenuButton
|
||||||
// will display SV_RESID_STRING_NOSELECTIONPOSSIBLE instead of STR_NODOCUMENT
|
// will display SV_RESID_STRING_NOSELECTIONPOSSIBLE instead of STR_NODOCUMENT
|
||||||
pVCLPopupMenu->SetItemBits( 1, pVCLPopupMenu->GetItemBits( 1 ) | MenuItemBits::NOSELECT );
|
pVCLPopupMenu->SetItemBits( 1, pVCLPopupMenu->GetItemBits( 1 ) | MenuItemBits::NOSELECT );
|
||||||
|
|
||||||
|
pVCLPopupMenu->InsertSeparator();
|
||||||
|
|
||||||
|
// Open remote menu entry
|
||||||
|
pVCLPopupMenu->InsertItem( sal_uInt16( 2 ),
|
||||||
|
FWK_RESSTR(STR_OPEN_REMOTE) );
|
||||||
|
pVCLPopupMenu->SetItemCommand( sal_uInt16( 2 ),
|
||||||
|
OUString( CMD_OPEN_REMOTE ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -331,6 +346,11 @@ void SAL_CALL RecentFilesMenuController::itemSelected( const css::awt::MenuEvent
|
|||||||
"vnd.org.libreoffice.recentdocs:ClearRecentFileList",
|
"vnd.org.libreoffice.recentdocs:ClearRecentFileList",
|
||||||
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >() );
|
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >() );
|
||||||
}
|
}
|
||||||
|
else if ( aCommand == CMD_OPEN_REMOTE )
|
||||||
|
{
|
||||||
|
Sequence< PropertyValue > aArgsList( 0 );
|
||||||
|
dispatchCommand( CMD_OPEN_REMOTE, aArgsList );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
executeEntry( rEvent.MenuId-1 );
|
executeEntry( rEvent.MenuId-1 );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user