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 13:51:46 +0100 |
commit | 3b0d29f1461c97c0c812a500b3414b9a50d694ff (patch) | |
tree | f29864f730ebc3d3ea31d0cc19481382e819e04f /cui/source/customize/cfg.cxx | |
parent | ec5e91d6c123bd52f312f96812c35ef03c91fcc6 (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>
Diffstat (limited to 'cui/source/customize/cfg.cxx')
-rw-r--r-- | cui/source/customize/cfg.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 2ff9df40902d..d3a04baa1e7c 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1418,12 +1418,14 @@ int SvxConfigPage::AddFunction(int nTarget, bool bAllowDuplicates) OUString aDisplayName; OUString aModuleId = vcl::CommandInfoProvider::GetModuleIdentifier( m_xFrame ); + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aURL, aModuleId); + if ( typeid(*pCurrentSaveInData) == typeid(ContextMenuSaveInData) ) - aDisplayName = vcl::CommandInfoProvider::GetPopupLabelForCommand( aURL, aModuleId ); + aDisplayName = vcl::CommandInfoProvider::GetPopupLabelForCommand(aProperties); else if ( typeid(*pCurrentSaveInData) == typeid(MenuSaveInData) ) - aDisplayName = vcl::CommandInfoProvider::GetMenuLabelForCommand( aURL, aModuleId ); + aDisplayName = vcl::CommandInfoProvider::GetMenuLabelForCommand(aProperties); else - aDisplayName = vcl::CommandInfoProvider::GetLabelForCommand( aURL, aModuleId ); + aDisplayName = vcl::CommandInfoProvider::GetLabelForCommand(aProperties); SvxConfigEntry* pNewEntryData = new SvxConfigEntry( aDisplayName, aURL, false, /*bParentData*/false ); |