diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2024-12-12 23:56:29 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2024-12-26 07:52:05 +0100 |
commit | 5364b7b663b2be30d802474618dea3db14a2182a (patch) | |
tree | 8c5c1038101f81b878c4792cef5e4d71799edc64 /vcl/source | |
parent | 94378114b58a89812ce9d98887b0fd193c06b15d (diff) |
tdf#160196 Embedded files are not allowed in PDF/A-1 and PDF/A-2
This disables embedded/attached files in the UI as well as in the
export filter for PDF/A-1 and 2. PDF/A-3 is almost identical to
PDF/A-2 with the difference that it allows embedded/attached files.
Change-Id: If8c3af6ab08ad320cf15618ead9c69fbd490d4f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178413
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178769
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 387edb5e2594..6816fca77bd5 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -3510,6 +3510,9 @@ bool PDFWriterImpl::appendDest( sal_Int32 nDestID, OStringBuffer& rBuffer ) void PDFWriterImpl::addDocumentAttachedFile(OUString const& rFileName, OUString const& rMimeType, OUString const& rDescription, std::unique_ptr<PDFOutputStream> rStream) { + if (m_nPDFA_Version == 1 || m_nPDFA_Version == 2) + return; + sal_Int32 nObjectID = addEmbeddedFile(std::move(rStream), rMimeType); auto& rAttachedFile = m_aDocumentAttachedFiles.emplace_back(); rAttachedFile.maFilename = rFileName; |