summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-11-22 21:21:18 +0100
committerJulien Nabet <serval2412@yahoo.fr>2017-11-23 07:05:03 +0100
commit3c508bf9fc1b2704080a71d7374bf3720343beb5 (patch)
tree0a31d520776d07c41a7ac21f4884920ff9fe49c6
parent86cda9ab3cdfc2f253b4d2f44dd00f40d8574210 (diff)
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 <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx12
-rw-r--r--vcl/source/gdi/pdfwriter_impl.hxx2
2 files changed, 7 insertions, 7 deletions
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<JPGEmit>::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<TransparencyEmit>::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<JPGEmit> m_aJPGs;
+ std::vector<JPGEmit> m_aJPGs;
/*--->i56629 contains all named destinations ever set during the PDF creation,
destination id is always the destination's position in this vector
*/