summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-04-07 16:25:49 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-04-07 20:01:50 +0000
commit39038a3544d1b42388a15e6098ccad8398e8ef36 (patch)
tree8ac5b72b73a88edee76b7b0e17e7775e7c390567 /vcl
parent92a5c6d2c0d0ec4ec4df689f96065574b83a3657 (diff)
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>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 65c62166aca4..8445377a1a5a 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;