diff options
author | Tünde Tóth <toth.tunde@nisz.hu> | 2022-04-06 16:18:29 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2022-04-26 17:41:27 +0200 |
commit | 9564747d2fd5d2c859a359dd7fa6242c6859c0d7 (patch) | |
tree | b45d423774634a3e51518f50830dd1534af18e0e /sd | |
parent | 5b27a93f58671b7546414cfff673179c3ff0550f (diff) |
tdf#53970 PPTX: fix import of linked media files
Linked media files were imported as images in documents
created with Impress after PPTX export.
Change-Id: If4920c2e40f45fff73eca4a5fa987d524177597e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132635
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index 8ad1872d2c52..56ff8b067763 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -1823,11 +1823,28 @@ void SdOOXMLExportTest2::testTdf53970() 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); + + uno::Reference<beans::XPropertySet> xShape(getShape(0, getPage(0, xDocShRef))); + CPPUNIT_ASSERT(xShape.is()); + OUString sVideoURL; + + // Without fix in place, the media shape was imported as an image after export. + try + { + CPPUNIT_ASSERT_MESSAGE("MediaURL property is not set", + xShape->getPropertyValue("MediaURL") >>= sVideoURL); + } + catch (const beans::UnknownPropertyException&) + { + CPPUNIT_FAIL("Error: MediaURL is unknown property"); + } + CPPUNIT_ASSERT_MESSAGE("MediaURL is empty", !sVideoURL.isEmpty()); + + xDocShRef->DoClose(); } } |