summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/print
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-14 14:27:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-15 14:33:57 +0200
commitf13c6ad5f020a196a0e3aa6f28bda3dc185d465b (patch)
treef9aaab122974d36c134fb1723ec3c1c8df51eeef /vcl/unx/generic/print
parent9270f74466d0eb841babaa24997f608631c70341 (diff)
new loplugin:bufferadd
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/generic/print')
-rw-r--r--vcl/unx/generic/print/printerjob.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/unx/generic/print/printerjob.cxx b/vcl/unx/generic/print/printerjob.cxx
index 5bf85101869d..73dedc5a2415 100644
--- a/vcl/unx/generic/print/printerjob.cxx
+++ b/vcl/unx/generic/print/printerjob.cxx
@@ -951,9 +951,9 @@ bool PrinterJob::writeSetup( osl::File* pFile, const JobData& rJob )
if( ! bExternalDialog && rJob.m_nCopies > 1 )
{
// setup code
- OStringBuffer aLine("/#copies ");
- aLine.append(static_cast<sal_Int32>(rJob.m_nCopies));
- aLine.append(" def\n");
+ OString aLine = "/#copies " +
+ OString::number(static_cast<sal_Int32>(rJob.m_nCopies)) +
+ " def\n";
sal_uInt64 nWritten = 0;
bSuccess = !(pFile->write(aLine.getStr(), aLine.getLength(), nWritten)
|| nWritten != static_cast<sal_uInt64>(aLine.getLength()));