summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-29 12:24:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-04-29 18:25:31 +0200
commit04aafba860f613c20e7078d038cc83eb02de0b54 (patch)
tree8153152b87089419bde17313d9ac7b9de6fcce32 /toolkit
parent76c793d2acf66f46e9edcda43d2f4327e8374841 (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 'toolkit')
-rw-r--r--toolkit/source/awt/vclxprinter.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx
index effcdae4380e..ce94e6bb6af1 100644
--- a/toolkit/source/awt/vclxprinter.cxx
+++ b/toolkit/source/awt/vclxprinter.cxx
@@ -189,13 +189,10 @@ css::uno::Sequence< OUString > VCLXPrinterPropertySet::getFormDescriptions( )
for ( sal_uInt16 n = 0; n < nPaperBinCount; n++ )
{
// Format: <DisplayFormName;FormNameId;DisplayPaperBinName;PaperBinNameId;DisplayPaperName;PaperNameId>
- OUStringBuffer aDescr( "*;*;" );
- aDescr.append(GetPrinter()->GetPaperBinName( n ));
- aDescr.append(';');
- aDescr.append(static_cast<sal_Int32>(n));
- aDescr.append(";*;*");
+ OUString aDescr = "*;*;" + GetPrinter()->GetPaperBinName( n ) + ";" +
+ OUString::number(n) + ";*;*";
- aDescriptions.getArray()[n] = aDescr.makeStringAndClear();
+ aDescriptions.getArray()[n] = aDescr;
}
return aDescriptions;
}