vcl/qa/cppunit/pdfexport/data/tdf157517.odt |binary
 vcl/qa/cppunit/pdfexport/pdfexport2.cxx     |   14 ++++++++++++++
 2 files changed, 14 insertions(+)

New commits:
commit e86c68b71d42253bcd4286717e5446231505242c
Author:     Xisco Fauli <[email protected]>
AuthorDate: Fri Mar 6 16:21:03 2026 +0000
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Mar 10 07:43:59 2026 +0100

    tdf#157517: vcl_pdfexport2: Add test
    
    Change-Id: I9084c5b57e1d59064f026b3f391444ce60fad552
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199899
    Reviewed-by: Xisco Fauli <[email protected]>
    Tested-by: Jenkins
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201185
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Tomaž Vajngerl <[email protected]>

diff --git a/vcl/qa/cppunit/pdfexport/data/tdf157517.odt 
b/vcl/qa/cppunit/pdfexport/data/tdf157517.odt
new file mode 100644
index 000000000000..50a820a1ad7a
Binary files /dev/null and b/vcl/qa/cppunit/pdfexport/data/tdf157517.odt differ
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
index 0ed2a29c957a..69e4cce229ad 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
@@ -1689,6 +1689,20 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf136805)
     save(TestFilter::PDF_WRITER, 
aMediaDescriptor.getAsConstPropertyValueList());
 }
 
+CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157517)
+{
+    // Only reproduced with PPDF-A/2 / bDF-A/3b and PDF/UA.
+    uno::Sequence<beans::PropertyValue> 
aFilterData(comphelper::InitPropertySequence({
+        { "PDFUACompliance", uno::Any(true) },
+        { "SelectPdfVersion", uno::Any(static_cast<sal_Int32>(3)) },
+    }));
+    comphelper::SequenceAsHashMap aMediaDescriptor;
+    aMediaDescriptor[u"FilterData"_ustr] <<= aFilterData;
+    loadFromFile(u"tdf157517.odt");
+    // Without the fix in place, the validation would have failed
+    save(TestFilter::PDF_WRITER, 
aMediaDescriptor.getAsConstPropertyValueList());
+}
+
 CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf152235)
 {
     // Enable PDF/UA

Reply via email to