diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2023-10-10 12:15:37 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-10-10 16:33:11 +0200 |
commit | c50bca0fc298973bbeda697072528e3dfc887ac5 (patch) | |
tree | ed6cc9bc0e437a2bcfa641fc9286655b1d06814f /include/vcl | |
parent | b9fee0f1bb22555f321c8c071e6171ad2664b297 (diff) |
tdf#157182 vcl,filter: PDF/A export: fix crash due to SE ID mismatch
The SE IDs in PDFExtOutDevData and PDFWriterImpl are supposed to match.
If PDF/A-1 is exported then RemoveTransparenciesFromMetaFile() is
called and that does unspeakable things to the Metafile and then we just
throw away the PDF related data for the page in
PDFExtOutDevData::ResetSyncData().
This means that then EnsureStructureElement are called on
PDFExtOutDevData but not on PDFWriterImpl, so on the next page the IDs
will no longer match, which is noticed if there is no transparency to be
removed on that page.
pdfextoutdevdata.cxx:347: bool vcl::PageSyncData::PlaySyncPageAct(): Assertion `id == -1 || id == mParaInts.front()' failed.
Guess the easiest way to deal with this is to have the premature
ResetSyncData() replay only the EnsureStructureElement actions, which is
only possible because they don't really require any extra data stored in
the ridiculous vectors in PageSyncData; PDFWriterImpl will eventually
remove the elements as they are never initialised.
(regression from commit 07d790ca473cd6e71f0343419b819fa6b485dc01)
Change-Id: I8eb295504067edff00608e28fd86b0c86d547083
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157748
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'include/vcl')
-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 199f30a00c59..206dfa4adc97 100644 --- a/include/vcl/pdfextoutdevdata.hxx +++ b/include/vcl/pdfextoutdevdata.hxx @@ -105,7 +105,7 @@ public: virtual ~PDFExtOutDevData() override; bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const GDIMetaFile& rMtf ); - void ResetSyncData(); + void ResetSyncData(PDFWriter * pWriterIfRemoveTransparencies); void PlayGlobalActions( PDFWriter& rWriter ); |