filter/source/pdf/impdialog.cxx | 11 +++++++++++ filter/source/pdf/impdialog.hxx | 1 + filter/source/pdf/pdfexport.cxx | 2 ++ 3 files changed, 14 insertions(+)
New commits: commit 089b9e21c7210df3e5ee312a06131ce410989cf7 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Mar 21 12:55:11 2023 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Wed Mar 22 10:36:14 2023 +0000 filter: PDF export dialog: always disable ReferenceXObject for PDF/UA 7.20 XObjects Reference XObjects, as noted in ISO 32000-1:2008, 8.10.4, shall not be used in conforming PDF/UA files. Change-Id: I62a4b6b76a6cb1d14d4fd39fad90ec0323a481c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149261 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 29d60abe73bc..c43cde0cf6e1 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -775,6 +775,7 @@ void ImpPDFTabGeneralPage::GetFilterConfigItem( ImpPDFTabDialog* pParent ) if (!bIsPDFUA) { pParent->mbExportBookmarksUserSelection = pParent->mbExportBookmarks; + pParent->mbUseReferenceXObjectUserSelection = pParent->mbUseReferenceXObject; } pParent->mbUseTaggedPDFUserSelection = mbUseTaggedPDFUserSelection; @@ -923,12 +924,22 @@ IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePDFVersionOrUniversalAccessibilityHa } mxCbExportBookmarks->set_active(true); } + if (mxCbUseReferenceXObject->get_sensitive()) + { + if (mpParent) + { + mpParent->mbUseReferenceXObjectUserSelection = mxCbUseReferenceXObject->get_active(); + } + mxCbUseReferenceXObject->set_active(false); + } } else if (mpParent) { mxCbExportBookmarks->set_active(mpParent->mbExportBookmarksUserSelection); + mxCbUseReferenceXObject->set_active(mpParent->mbUseReferenceXObjectUserSelection); } mxCbExportBookmarks->set_sensitive(!bIsPDFUA); + mxCbUseReferenceXObject->set_sensitive(!bIsPDFUA); ImpPDFTabOpnFtrPage *const pOpenPage(mpParent ? mpParent->getOpenPage() : nullptr); if (pOpenPage) diff --git a/filter/source/pdf/impdialog.hxx b/filter/source/pdf/impdialog.hxx index 62ed7d580f44..45442c58048b 100644 --- a/filter/source/pdf/impdialog.hxx +++ b/filter/source/pdf/impdialog.hxx @@ -87,6 +87,7 @@ class ImpPDFTabDialog final : public SfxTabDialogController bool mbExportNotesInMargin; bool mbViewPDF; bool mbUseReferenceXObject; + bool mbUseReferenceXObjectUserSelection = false; bool mbExportNotesPages; bool mbExportOnlyNotesPages; bool mbUseTransitionEffects; diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 15d1a577fe47..3edcd1976c4f 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -712,6 +712,8 @@ bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue >& mbUseTaggedPDF = true; // ISO 14289-1:2014, Clause: 7.16 mbCanExtractForAccessibility = true; + // ISO 14289-1:2014, Clause: 7.20 + mbUseReferenceXObject = false; } // copy in context the values default in the constructor or set by the FilterData sequence of properties