diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-05-22 16:20:18 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-06-01 20:46:22 +0200 |
commit | 4dbc7929474d23c143a1be9618c64019cb48c038 (patch) | |
tree | fb67cd094ffb213e974fe1c9888387a1ce51873e /include | |
parent | d8e63f23c28023cdd42860be354189bbe1e4efdc (diff) |
tdf#106702 PDF export: fix missing images from Writer headers/footers
Position of an image is determined by the relevant bitmap scale metafile
action when recompressing images.
The same position was determined by PDFExtOutDevData "meta" info when
not recompressing images. This second rectangle was never correct for
images repeated in Writer headers/footers on non-first pages: the
position was relative to the page, while PDF export sets the map mode
(origin) of the output device during export, so such positions are
expected to be absolute ones.
The root of the problem seems to be that header images in Writer are
both repeated (as the user sees it) and unrepeated (as the doc model
sees it), and by the time we want to get its position, we only see the
unrepeated SdrObject.
Fix the problem by using the correct position from the scale action and
not from PDFExtOutDevData if possible.
(Also give up on running CppunitTest_vcl_pdfexport in the non-pdfium
case, most of the tests there do require pdfium anyway, and the growing
ifdef forest in that file just made it hard to read the code.)
(cherry picked from commit 4c2172a3e973bc6351107a3a1b554c77b40b75dd)
Conflicts:
vcl/Module_vcl.mk
vcl/qa/cppunit/pdfexport/pdfexport.cxx
Change-Id: I31c14d4bd223b2804859982542ebd6d5f9abd312
Reviewed-on: https://gerrit.libreoffice.org/54690
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 327c7ee43fbe53df63693d020356ddf4df56d7f1)
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/pdfextoutdevdata.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx index 22079323580c..b8bbe589d491 100644 --- a/include/vcl/pdfextoutdevdata.hxx +++ b/include/vcl/pdfextoutdevdata.hxx @@ -97,7 +97,7 @@ public: PDFExtOutDevData( const OutputDevice& rOutDev ); virtual ~PDFExtOutDevData() override; - bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction ); + bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const GDIMetaFile& rMtf ); void ResetSyncData(); void PlayGlobalActions( PDFWriter& rWriter ); |