[Libreoffice-commits] core.git: vcl/source
Julien Nabet
serval2412 at yahoo.fr
Thu Nov 23 06:05:33 UTC 2017
vcl/source/gdi/pdfwriter_impl.cxx | 12 ++++++------
vcl/source/gdi/pdfwriter_impl.hxx | 2 +-
2 files changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 3c508bf9fc1b2704080a71d7374bf3720343beb5
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Nov 22 21:21:18 2017 +0100
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 at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
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
*/
More information about the Libreoffice-commits
mailing list