summaryrefslogtreecommitdiff
path: root/sdext/source/pdfimport/test
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 /sdext/source/pdfimport/test
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 'sdext/source/pdfimport/test')
-rw-r--r--sdext/source/pdfimport/test/pdfunzip.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/sdext/source/pdfimport/test/pdfunzip.cxx b/sdext/source/pdfimport/test/pdfunzip.cxx
index a014fa4ccae0..e2a6602ad74a 100644
--- a/sdext/source/pdfimport/test/pdfunzip.cxx
+++ b/sdext/source/pdfimport/test/pdfunzip.cxx
@@ -263,11 +263,11 @@ static int write_addStreamArray( const char* pOutFile, PDFArray* pStreams, PDFFi
PDFObject* pObject = pPDFFile->findObject( pStreamRef->m_nNumber, pStreamRef->m_nGeneration );
if( pObject )
{
- OStringBuffer aOutStream( pOutFile );
- aOutStream.append( "_stream_" );
- aOutStream.append( sal_Int32(pStreamRef->m_nNumber) );
- aOutStream.append( "_" );
- aOutStream.append( sal_Int32(pStreamRef->m_nGeneration) );
+ OString aOutStream = pOutFile +
+ OStringLiteral("_stream_") +
+ OString::number( sal_Int32(pStreamRef->m_nNumber) ) +
+ "_" +
+ OString::number( sal_Int32(pStreamRef->m_nGeneration) );
FileEmitContext aContext( aOutStream.getStr(), pInFile, pPDFFile );
aContext.m_bDecrypt = pPDFFile->isEncrypted();
pObject->writeStream( aContext, pPDFFile );
@@ -406,11 +406,11 @@ static int write_objects( const char* i_pInFile, const char* i_pOutFile, PDFFile
continue;
}
- OStringBuffer aOutStream( i_pOutFile );
- aOutStream.append( "_stream_" );
- aOutStream.append( nObject );
- aOutStream.append( "_" );
- aOutStream.append( nGeneration );
+ OString aOutStream = i_pOutFile +
+ OStringLiteral("_stream_") +
+ OString::number( nObject ) +
+ "_" +
+ OString::number( nGeneration );
FileEmitContext aContext( aOutStream.getStr(), i_pInFile, i_pPDFFile );
aContext.m_bDecrypt = i_pPDFFile->isEncrypted();
pStream->writeStream( aContext, i_pPDFFile );