summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2022-04-06 16:18:29 +0200
committerAndras Timar <andras.timar@collabora.com>2022-04-27 13:20:02 +0200
commit272a1403164cdd236e33af8e72fbecae23907d91 (patch)
tree8c85faeff22adc2c9a27c9896ab6eec12e5ba3bf /sd
parent124de76ff63dfd0393ff3fa038ad0bc594ad3ff8 (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> (cherry picked from commit 9564747d2fd5d2c859a359dd7fa6242c6859c0d7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133410 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/export-tests-ooxml2.cxx19
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 dc6498ec614d..0b244bc76233 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -1832,11 +1832,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();
}
}