diff options
Diffstat (limited to 'sfx2/source/view/viewsh.cxx')
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 9b85b791f7a4..b10b17853914 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -709,15 +709,12 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet ) { uno::Reference < frame::XFrame > xFrame( pFrame->GetFrame().GetFrameInterface() ); - OUStringBuffer aBuffer( 60 ); auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(".uno:PrintDefault", vcl::CommandInfoProvider::GetModuleIdentifier(xFrame)); - aBuffer.append(vcl::CommandInfoProvider::GetLabelForCommand(aProperties)); - aBuffer.append( " (" ); - aBuffer.append( aPrinterName ); - aBuffer.append(')'); + OUString val = vcl::CommandInfoProvider::GetLabelForCommand(aProperties) + + " (" + aPrinterName + ")"; - rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, aBuffer.makeStringAndClear() ) ); + rSet.Put( SfxStringItem( SID_PRINTDOCDIRECT, val ) ); } } break; |