diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-25 11:21:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-26 16:46:55 +0100 |
commit | b509d72a79a8c64d03ea8f91c69c58a24e0b2dc7 (patch) | |
tree | 97770ab005aac451b4c34a1fae562a3d579adb1f /svx | |
parent | ea31d3cc8566eeb9d3dbf55b385d8c619daaddf9 (diff) |
tdf#126043 fetch the command properties just once
Change-Id: Iaf343e9858be36ca8772d9c12eee772d93b4c394
Reviewed-on: https://gerrit.libreoffice.org/83668
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/83763
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/mnuctrls/smarttagmenu.cxx | 3 | ||||
-rw-r--r-- | svx/source/sidebar/shapes/DefaultShapesPanel.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 6 |
3 files changed, 9 insertions, 4 deletions
diff --git a/svx/source/mnuctrls/smarttagmenu.cxx b/svx/source/mnuctrls/smarttagmenu.cxx index dd55876b85ed..92d205556c00 100644 --- a/svx/source/mnuctrls/smarttagmenu.cxx +++ b/svx/source/mnuctrls/smarttagmenu.cxx @@ -182,7 +182,8 @@ void SmartTagMenuController::FillMenu() { const OUString aCommand = ".uno:AutoCorrectDlg?OpenSmartTag:bool=true"; pVCLMenu->InsertSeparator(); - pVCLMenu->InsertItem( nMenuId, vcl::CommandInfoProvider::GetPopupLabelForCommand( aCommand, m_aModuleName ) ); + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aCommand, m_aModuleName); + pVCLMenu->InsertItem( nMenuId, vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties) ); pVCLMenu->SetItemCommand( nMenuId, aCommand ); } } diff --git a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx index 74079228f65e..09685b182251 100644 --- a/svx/source/sidebar/shapes/DefaultShapesPanel.cxx +++ b/svx/source/sidebar/shapes/DefaultShapesPanel.cxx @@ -127,7 +127,9 @@ void DefaultShapesPanel::populateShapes() { sSlotStr = aSet.second[i]; aSlotImage = vcl::CommandInfoProvider::GetImageForCommand(sSlotStr, mxFrame); - sLabel = vcl::CommandInfoProvider::GetTooltipForCommand(sSlotStr, mxFrame); + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(sSlotStr, + vcl::CommandInfoProvider::GetModuleIdentifier(mxFrame)); + sLabel = vcl::CommandInfoProvider::GetTooltipForCommand(sSlotStr, aProperties, mxFrame); aSet.first->InsertItem(i, aSlotImage, sLabel); } } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 1b8d6fe09092..4e6e10e84138 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -3454,7 +3454,8 @@ void SvxColorToolBoxControl::initialize( const css::uno::Sequence<css::uno::Any> // Sidebar uses wide buttons for those. m_bSplitButton = typeid( *pToolBox ) != typeid( sfx2::sidebar::SidebarToolBox ); - OUString aCommandLabel = vcl::CommandInfoProvider::GetLabelForCommand( getCommandURL(), getModuleName() ); + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(getCommandURL(), getModuleName()); + OUString aCommandLabel = vcl::CommandInfoProvider::GetLabelForCommand(aProperties); m_xBtnUpdater.reset( new svx::ToolboxButtonColorUpdater( m_nSlotId, nId, pToolBox, !m_bSplitButton, aCommandLabel ) ); pToolBox->SetItemBits( nId, pToolBox->GetItemBits( nId ) | ( m_bSplitButton ? ToolBoxItemBits::DROPDOWN : ToolBoxItemBits::DROPDOWNONLY ) ); @@ -3517,7 +3518,8 @@ VclPtr<vcl::Window> SvxColorToolBoxControl::createPopupWindow( vcl::Window* pPar false, m_aColorSelectFunction); - OUString aWindowTitle = vcl::CommandInfoProvider::GetLabelForCommand( m_aCommandURL, m_sModuleName ); + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(m_aCommandURL, m_sModuleName); + OUString aWindowTitle = vcl::CommandInfoProvider::GetLabelForCommand(aProperties); pColorWin->SetText( aWindowTitle ); pColorWin->StartSelection(); if ( m_bSplitButton ) |