diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-02-27 16:38:54 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-02-27 18:00:54 +0000 |
commit | e7adffff8039175bc50b56b4c07ce0b9d8fed629 (patch) | |
tree | e39d8c849e249b716218d48f2817d969568beff7 /vcl/source/gdi | |
parent | 58da79fd02d6f2b49ccd03d9b5a984a231e1cd52 (diff) |
tdf#106206 PDF export: fix unexpected /Im0 in page contents stream
The early return should just skip the code that's specific to pdf
images, not everything.
Change-Id: Ia9e02b05051a085a9fdf2f690c21f9ffccb7bf4d
Reviewed-on: https://gerrit.libreoffice.org/34685
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'vcl/source/gdi')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 054b7a3e2bf0..fc9443c6b35f 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -11252,6 +11252,10 @@ bool PDFWriterImpl::writeBitmapObject( BitmapEmit& rObject, bool bMask ) void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObjectEmit& rEmit, sal_Int32 nBitmapObject) { + // The bitmap object is always a valid identifier, even if the graphic has + // no pdf data. + rEmit.m_nBitmapObject = nBitmapObject; + if (!rGraphic.getPdfData().hasElements()) return; @@ -11262,7 +11266,6 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject rEmit.m_nFormObject = createObject(); rEmit.m_nEmbeddedObject = m_aEmbeddedFiles.back().m_nObject; - rEmit.m_nBitmapObject = nBitmapObject; rEmit.m_aPixelSize = rGraphic.GetBitmap().GetPrefSize(); } |