tdf#170241 tdf#169952 sd: add unit test for embedded OLE obj export
Make sure all oleObjectN.bin files are exported. Regression introduced in00d1c2800cfixed in1c1120076a. 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:
Binary file not shown.
@@ -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: */
|
||||
|
||||
Reference in New Issue
Block a user