summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-05-22 16:20:18 +0200
committerCaolán McNamara <caolanm@redhat.com>2018-05-27 17:50:36 +0200
commit327c7ee43fbe53df63693d020356ddf4df56d7f1 (patch)
tree96d7f0eb0759856a6246f03253327f1c3791e7ad /include
parent8e4a9db1e62871878155207c2c4d252b3705c307 (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>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/pdfextoutdevdata.hxx2
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 );