diff options
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/data/odp/tdf53970_linked.odp | bin | 0 -> 13158 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 27 |
2 files changed, 21 insertions, 6 deletions
diff --git a/sd/qa/unit/data/odp/tdf53970_linked.odp b/sd/qa/unit/data/odp/tdf53970_linked.odp Binary files differnew file mode 100644 index 000000000000..3ddb7933463f --- /dev/null +++ b/sd/qa/unit/data/odp/tdf53970_linked.odp diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index a620386ad22d..5fac35ea1833 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -1804,15 +1804,30 @@ void SdOOXMLExportTest2::testTdf59323_slideFooters() void SdOOXMLExportTest2::testTdf53970() { - ::sd::DrawDocShellRef xDocShRef - = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf53970.odp"), ODP); - xDocShRef = saveAndReload(xDocShRef.get(), PPTX); + // Embedded media file + { + ::sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf53970.odp"), ODP); + xDocShRef = saveAndReload(xDocShRef.get(), PPTX); + // Without fix in place, the media shape was lost on export. + CPPUNIT_ASSERT(getPage(0, xDocShRef)->hasElements()); - // Without fix in place, the media shape was lost on export. - CPPUNIT_ASSERT(getPage(0, xDocShRef)->hasElements()); + xDocShRef->DoClose(); + } - xDocShRef->DoClose(); + // Linked media file + { + ::sd::DrawDocShellRef xDocShRef = loadURL( + m_directories.getURLFromSrc(u"/sd/qa/unit/data/odp/tdf53970_linked.odp"), ODP); + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + xDocShRef->DoClose(); + + xmlDocUniquePtr pXmlRels = parseExport(tempFile, "ppt/slides/_rels/slide1.xml.rels"); + CPPUNIT_ASSERT(pXmlRels); + assertXPath(pXmlRels, "/rels:Relationships/rels:Relationship[@TargetMode='External']", 2); + } } CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest2); |