tdf#170241 tdf#169952 sd: add unit test for embedded OLE obj export

Make sure all oleObjectN.bin files are exported.

Regression introduced in 00d1c2800c
fixed in 1c1120076a.

Change-Id: I9671a9b209ed9e4bfcb6b0eb73dafe6525537e2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198841
Tested-by: Jenkins
Reviewed-by: Aron Budea <aron.budea@collabora.com>
This commit is contained in:
Aron Budea
2026-02-06 19:20:42 +01:00
parent d6139b6a5b
commit c917b55a81
2 changed files with 15 additions and 0 deletions
Binary file not shown.
+15
View File
@@ -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: */