summaryrefslogtreecommitdiff
path: root/sfx2/source/view/viewsh.cxx
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 /sfx2/source/view/viewsh.cxx
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 'sfx2/source/view/viewsh.cxx')
-rw-r--r--sfx2/source/view/viewsh.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index d648b1159b04..0301bd2acd59 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -722,9 +722,9 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() );
OUStringBuffer aBuffer( 60 );
- aBuffer.append( vcl::CommandInfoProvider::GetLabelForCommand(
- ".uno:PrintDefault",
- vcl::CommandInfoProvider::GetModuleIdentifier( xFrame ) ) );
+ auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:PrintDefault",
+ vcl::CommandInfoProvider::GetModuleIdentifier(xFrame));
+ aBuffer.append(vcl::CommandInfoProvider::GetLabelForCommand(aProperties));
aBuffer.append( " (" );
aBuffer.append( aPrinterName );
aBuffer.append(')');