diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-29 12:24:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-29 18:25:31 +0200 |
commit | 04aafba860f613c20e7078d038cc83eb02de0b54 (patch) | |
tree | 8153152b87089419bde17313d9ac7b9de6fcce32 /sfx2/source/view | |
parent | 76c793d2acf66f46e9edcda43d2f4327e8374841 (diff) |
loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive
variant of this plugin
Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/view')
-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; |