PDF export of PDF images: avoid invalid offset for not used jpeg bitmaps
I missed the JPEG case in commit
30102ded91b9ecfea172ffc6443154230ee37cbd (vcl PDF export, norefxobj:
avoid replacement bitmap, 2017-03-29).
Change-Id: If1f74c7873d05d5d7da5eb881626d4e5e535a0a1
Reviewed-on: https://gerrit.libreoffice.org/36272
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 65c6216..8445377 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -11696,7 +11696,8 @@ void PDFWriterImpl::drawJPGBitmap( SvStream& rDCTData, bool bIsTrueColor, const
{
m_aJPGs.emplace( m_aJPGs.begin() );
JPGEmit& rEmit = m_aJPGs.front();
rEmit.m_nObject = createObject();
if (!hasPdfData(rGraphic, m_aContext.UseReferenceXObject) || m_aContext.UseReferenceXObject)
rEmit.m_nObject = createObject();
rEmit.m_aID = aID;
rEmit.m_pStream.reset( pStream );
rEmit.m_bTrueColor = bIsTrueColor;