diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-02-19 14:38:32 +0200 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2017-02-21 01:40:19 +0200 |
commit | b6994cb75fb7e34574d933dff58fcec3bb1ab922 (patch) | |
tree | b4ed563012a53742131ba72705bcadde04f99d9a /framework | |
parent | 8c5a3b448a50981b41b2860c64a3039265398cf9 (diff) |
Use module name when getting labels
Change-Id: I1d5196e1ca888dfb11d5bd6ef4676937dce49fdc
Diffstat (limited to 'framework')
7 files changed, 12 insertions, 12 deletions
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx index dcff602fe58d..c67c7c5574fe 100644 --- a/framework/source/uielement/macrosmenucontroller.cxx +++ b/framework/source/uielement/macrosmenucontroller.cxx @@ -83,7 +83,7 @@ void MacrosMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPo // insert basic OUString aCommand(".uno:MacroDialog"); - OUString aDisplayName = vcl::CommandInfoProvider::GetMenuLabelForCommand(aCommand, m_xFrame); + OUString aDisplayName = vcl::CommandInfoProvider::GetMenuLabelForCommand(aCommand, m_aModuleName); pPopupMenu->InsertItem( 2, aDisplayName ); pPopupMenu->SetItemCommand( 2, aCommand ); diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 6e3cc8d87a0c..989943e8a13e 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1082,9 +1082,9 @@ OUString MenuBarManager::RetrieveLabelFromCommand(const OUString& rCmdURL) if ( !m_bHasMenuBar ) { // This is a context menu, prefer "PopupLabel" over "Label". - return vcl::CommandInfoProvider::GetPopupLabelForCommand(rCmdURL, m_xFrame); + return vcl::CommandInfoProvider::GetPopupLabelForCommand(rCmdURL, m_aModuleIdentifier); } - return vcl::CommandInfoProvider::GetMenuLabelForCommand(rCmdURL, m_xFrame); + return vcl::CommandInfoProvider::GetMenuLabelForCommand(rCmdURL, m_aModuleIdentifier); } bool MenuBarManager::CreatePopupMenuController( MenuItemHandler* pMenuItemHandler ) @@ -1180,7 +1180,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF } // Command can be just an alias to another command. - OUString aRealCommand = vcl::CommandInfoProvider::GetRealCommandForCommand( aItemCommand, m_xFrame ); + OUString aRealCommand = vcl::CommandInfoProvider::GetRealCommandForCommand( aItemCommand, m_aModuleIdentifier ); if ( !aRealCommand.isEmpty() ) aItemCommand = aRealCommand; diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index 4a13605270ae..3fa27a805abf 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -370,7 +370,7 @@ void GenericPopupToolbarController::functionExecuted( const OUString& rCommand ) { removeStatusListener( m_aCommandURL ); - OUString aRealCommand( vcl::CommandInfoProvider::GetRealCommandForCommand( rCommand, m_xFrame ) ); + OUString aRealCommand( vcl::CommandInfoProvider::GetRealCommandForCommand( rCommand, m_sModuleName ) ); m_aCommandURL = aRealCommand.isEmpty() ? rCommand : aRealCommand; addStatusListener( m_aCommandURL ); @@ -380,7 +380,7 @@ void GenericPopupToolbarController::functionExecuted( const OUString& rCommand ) { pToolBox->SetItemCommand( nId, rCommand ); pToolBox->SetHelpText( nId, OUString() ); // Will retrieve the new one from help. - pToolBox->SetItemText( nId, vcl::CommandInfoProvider::GetLabelForCommand( rCommand, m_xFrame ) ); + pToolBox->SetItemText( nId, vcl::CommandInfoProvider::GetLabelForCommand( rCommand, m_sModuleName ) ); pToolBox->SetQuickHelpText( nId, vcl::CommandInfoProvider::GetTooltipForCommand( rCommand, m_xFrame ) ); vcl::ImageType eImageType = getImageType(pToolBox->GetToolboxButtonSize()); diff --git a/framework/source/uielement/statusbarmanager.cxx b/framework/source/uielement/statusbarmanager.cxx index 06baee2af7f8..53fc6dd2e9f7 100644 --- a/framework/source/uielement/statusbarmanager.cxx +++ b/framework/source/uielement/statusbarmanager.cxx @@ -450,7 +450,7 @@ void StatusBarManager::FillStatusBar( const uno::Reference< container::XIndexAcc if (( nType == css::ui::ItemType::DEFAULT ) && !aCommandURL.isEmpty() ) { - OUString aString( vcl::CommandInfoProvider::GetLabelForCommand(aCommandURL, m_xFrame)); + OUString aString( vcl::CommandInfoProvider::GetLabelForCommand(aCommandURL, m_aModuleIdentifier)); StatusBarItemBits nItemBits( impl_convertItemStyleToItemBits( nStyle )); m_pStatusBar->InsertItem( nId, nWidth, nItemBits, nOffset ); diff --git a/framework/source/uielement/thesaurusmenucontroller.cxx b/framework/source/uielement/thesaurusmenucontroller.cxx index cfbe7e80a0df..d5eeca206f1f 100644 --- a/framework/source/uielement/thesaurusmenucontroller.cxx +++ b/framework/source/uielement/thesaurusmenucontroller.cxx @@ -99,7 +99,7 @@ void ThesaurusMenuController::fillPopupMenu() pVCLMenu->InsertSeparator(); OUString aThesaurusDialogCmd( ".uno:ThesaurusDialog" ); - pVCLMenu->InsertItem( nId, vcl::CommandInfoProvider::GetPopupLabelForCommand( aThesaurusDialogCmd, m_xFrame ) ); + pVCLMenu->InsertItem( nId, vcl::CommandInfoProvider::GetPopupLabelForCommand( aThesaurusDialogCmd, m_aModuleName ) ); pVCLMenu->SetItemCommand( nId, aThesaurusDialogCmd ); } } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index c3fa5ea4c568..518ef1a1d9ba 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -684,7 +684,7 @@ void ToolBarManager::CreateControllers() OUString aCommandURL( m_pToolBar->GetItemCommand( nId ) ); // Command can be just an alias to another command. - OUString aRealCommandURL( vcl::CommandInfoProvider::GetRealCommandForCommand( aCommandURL, m_xFrame ) ); + OUString aRealCommandURL( vcl::CommandInfoProvider::GetRealCommandForCommand( aCommandURL, m_aModuleIdentifier ) ); if ( !aRealCommandURL.isEmpty() ) aCommandURL = aRealCommandURL; @@ -764,7 +764,7 @@ void ToolBarManager::CreateControllers() new GenericToolbarController( m_xContext, m_xFrame, m_pToolBar, nId, aCommandURL )); // Accessibility support: Set toggle button role for specific commands - sal_Int32 nProps = vcl::CommandInfoProvider::GetPropertiesForCommand(aCommandURL, m_xFrame); + sal_Int32 nProps = vcl::CommandInfoProvider::GetPropertiesForCommand(aCommandURL, m_aModuleIdentifier); if ( nProps & UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON ) m_pToolBar->SetItemBits( nId, m_pToolBar->GetItemBits( nId ) | ToolBoxItemBits::CHECKABLE ); } @@ -1021,7 +1021,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine if (( nType == css::ui::ItemType::DEFAULT ) && !aCommandURL.isEmpty() ) { - OUString aString(vcl::CommandInfoProvider::GetLabelForCommand(aCommandURL, m_xFrame)); + OUString aString(vcl::CommandInfoProvider::GetLabelForCommand(aCommandURL, m_aModuleIdentifier)); ToolBoxItemBits nItemBits = ConvertStyleToToolboxItemBits( nStyle ); m_pToolBar->InsertItem( nId, aString, nItemBits ); diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 9b6bc5e575b6..8633c1ca8265 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -147,7 +147,7 @@ void ToolbarsMenuController::addCommand( OUString aLabel; if ( rLabel.isEmpty() ) - aLabel = vcl::CommandInfoProvider::GetMenuLabelForCommand( rCommandURL, m_xFrame ); + aLabel = vcl::CommandInfoProvider::GetMenuLabelForCommand( rCommandURL, m_aModuleName ); else aLabel = rLabel; |