sd/qa/unit/data/odp/tdf169952_multiple_OLEs.odp |binary sd/qa/unit/export-tests-ooxml3.cxx | 15 +++++++++++++++ 2 files changed, 15 insertions(+)
New commits: commit c917b55a8158bbaeac161ad1b806d5fac9811c46 Author: Aron Budea <[email protected]> AuthorDate: Sat Feb 7 00:29:11 2026 +1030 Commit: Aron Budea <[email protected]> CommitDate: Fri Feb 6 19:20:42 2026 +0100 tdf#170241 tdf#169952 sd: add unit test for embedded OLE obj export Make sure all oleObjectN.bin files are exported. Regression introduced in 00d1c2800c10d542673ab6f5a5baa26aa1cbb20e fixed in 1c1120076a103f694e8430d4c85a2863e02ce959. Change-Id: I9671a9b209ed9e4bfcb6b0eb73dafe6525537e2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198841 Tested-by: Jenkins Reviewed-by: Aron Budea <[email protected]> diff --git a/sd/qa/unit/data/odp/tdf169952_multiple_OLEs.odp b/sd/qa/unit/data/odp/tdf169952_multiple_OLEs.odp new file mode 100644 index 000000000000..0717a5286274 Binary files /dev/null and b/sd/qa/unit/data/odp/tdf169952_multiple_OLEs.odp differ diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx index c193f7505f61..4f1d847d13d8 100644 --- a/sd/qa/unit/export-tests-ooxml3.cxx +++ b/sd/qa/unit/export-tests-ooxml3.cxx @@ -1186,6 +1186,21 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf169952) CPPUNIT_ASSERT_MESSAGE("Without the fix chart2.xml is not exported", pXmlDoc); } +CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest3, testTdf169952_multiple_OLEs) +{ + createSdImpressDoc("odp/tdf169952_multiple_OLEs.odp"); + save(TestFilter::PPTX); + + // Without the fix two of the three OLE objects would get lost, and only oleObject1.bin + // would exist + uno::Reference<packages::zip::XZipFileAccess2> xNameAccess + = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), + maTempFile.GetURL()); + CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName(u"ppt/embeddings/oleObject1.bin"_ustr))); + CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName(u"ppt/embeddings/oleObject2.bin"_ustr))); + CPPUNIT_ASSERT_EQUAL(true, bool(xNameAccess->hasByName(u"ppt/embeddings/oleObject3.bin"_ustr))); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
