summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-11-25 11:21:28 +0000
committerCaolán McNamara <caolanm@redhat.com>2019-11-26 13:51:46 +0100
commit3b0d29f1461c97c0c812a500b3414b9a50d694ff (patch)
treef29864f730ebc3d3ea31d0cc19481382e819e04f /sd/source
parentec5e91d6c123bd52f312f96812c35ef03c91fcc6 (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 'sd/source')
-rw-r--r--sd/source/ui/controller/slidelayoutcontroller.cxx5
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx3
2 files changed, 6 insertions, 2 deletions
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx
index 12d741224787..8e8fa5413a9c 100644
--- a/sd/source/ui/controller/slidelayoutcontroller.cxx
+++ b/sd/source/ui/controller/slidelayoutcontroller.cxx
@@ -230,7 +230,10 @@ LayoutToolbarMenu::LayoutToolbarMenu( SlideLayoutController& rController, vcl::W
OUString sSlotTitle;
if( bInsertPage )
- sSlotTitle = vcl::CommandInfoProvider::GetLabelForCommand( sSlotStr, rController.getModuleName() );
+ {
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(sSlotStr, rController.getModuleName());
+ sSlotTitle = vcl::CommandInfoProvider::GetLabelForCommand(aProperties);
+ }
else
sSlotTitle = SdResId( STR_RESET_LAYOUT );
appendEntry( 2, sSlotTitle, aSlotImage);
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 89ee4c17138e..5f872e7b8a7b 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -963,7 +963,8 @@ vcl::Window* ViewShellBase::GetViewWindow()
OUString ViewShellBase::RetrieveLabelFromCommand( const OUString& aCmdURL ) const
{
OUString aModuleName(vcl::CommandInfoProvider::GetModuleIdentifier(GetMainViewShell()->GetViewFrame()->GetFrame().GetFrameInterface()));
- return vcl::CommandInfoProvider::GetLabelForCommand( aCmdURL, aModuleName );
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(aCmdURL, aModuleName);
+ return vcl::CommandInfoProvider::GetLabelForCommand(aProperties);
}
int ViewShellBase::getPart() const