summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/pdfwriter_impl.cxx
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/source/gdi/pdfwriter_impl.cxx
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/source/gdi/pdfwriter_impl.cxx')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 0048cc548d54..47d90025172a 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -794,11 +794,11 @@ void PDFWriterImpl::PDFPage::endStream()
// emit stream length object
if( ! m_pWriter->updateObject( m_nStreamLengthObject ) )
return;
- OStringBuffer aLine;
- aLine.append( m_nStreamLengthObject );
- aLine.append( " 0 obj\n" );
- aLine.append( static_cast<sal_Int64>(nEndStreamPos-m_nBeginStreamPos) );
- aLine.append( "\nendobj\n\n" );
+ OString aLine =
+ OString::number( m_nStreamLengthObject ) +
+ " 0 obj\n" +
+ OString::number( static_cast<sal_Int64>(nEndStreamPos-m_nBeginStreamPos) ) +
+ "\nendobj\n\n";
m_pWriter->writeBuffer( aLine.getStr(), aLine.getLength() );
}
@@ -2044,9 +2044,9 @@ OString PDFWriterImpl::emitStructureAttributes( PDFStructureElement& i_rEle )
SAL_INFO("vcl.pdfwriter", "unresolved link id " << nLink << " for Link structure");
if (g_bDebugDisableCompression)
{
- OStringBuffer aLine( "unresolved link id " );
- aLine.append( nLink );
- aLine.append( " for Link structure" );
+ OString aLine = "unresolved link id " +
+ OString::number( nLink ) +
+ " for Link structure";
emitComment( aLine.getStr() );
}
}