From 3c508bf9fc1b2704080a71d7374bf3720343beb5 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Wed, 22 Nov 2017 21:21:18 +0100 Subject: Replace list by vector for m_aJPGs pdfwriter_impl (vcl) +use for range loop just for the loop containing "std::list" Change-Id: Ie30dc016e9a001d0bb4ecd31a75749093326e2f6 Reviewed-on: https://gerrit.libreoffice.org/45112 Tested-by: Jenkins Reviewed-by: Julien Nabet --- vcl/source/gdi/pdfwriter_impl.cxx | 12 ++++++------ vcl/source/gdi/pdfwriter_impl.hxx | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'vcl') diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index e9dfafb02b57..6d958b3bc231 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -2293,13 +2293,13 @@ void PDFWriterImpl::endPage() it->m_aBitmap = BitmapEx(); } } - for( std::list::iterator jpeg = m_aJPGs.begin(); jpeg != m_aJPGs.end(); ++jpeg ) + for (auto & jpeg : m_aJPGs) { - if( jpeg->m_pStream ) + if( jpeg.m_pStream ) { - writeJPG( *jpeg ); - jpeg->m_pStream.reset(); - jpeg->m_aMask = Bitmap(); + writeJPG( jpeg ); + jpeg.m_pStream.reset(); + jpeg.m_aMask = Bitmap(); } } for( std::list::iterator t = m_aTransparentObjects.begin(); @@ -9796,7 +9796,7 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const if( ! rMask.IsEmpty() ) aID.m_nMaskChecksum = rMask.GetChecksum(); - std::list< JPGEmit >::const_iterator it; + std::vector< JPGEmit >::const_iterator it; for( it = m_aJPGs.begin(); it != m_aJPGs.end() && ! (aID == it->m_aID); ++it ) ; if( it == m_aJPGs.end() ) diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 7aba8c50d0e6..cf8fe720050c 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -634,7 +634,7 @@ private: * file stream as XObjects*/ std::list< BitmapEmit > m_aBitmaps; /* contains JPG streams until written to file */ - std::list m_aJPGs; + std::vector m_aJPGs; /*--->i56629 contains all named destinations ever set during the PDF creation, destination id is always the destination's position in this vector */ -- cgit