diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-01-15 15:53:19 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-01-16 01:18:31 +0100 |
commit | 56f26399df894d05f24874a3cdc90694158e03bc (patch) | |
tree | 0fca4ed37474ee31e0dc2f30cf61023a93290c64 /sd | |
parent | 1f828d45225a1e0e14a3a05a353adbb39f2211a0 (diff) |
PPTX export: fix mime type of slide narrations
Import was working already for the audio stream.
Change-Id: I43ac6561c4e39decfd99587e489cb2888805bb0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109374
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/data/pptx/narration.pptx | bin | 0 -> 82099 bytes | |||
-rw-r--r-- | sd/qa/unit/export-tests-ooxml1.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/narration.pptx b/sd/qa/unit/data/pptx/narration.pptx Binary files differnew file mode 100644 index 000000000000..5226ce607215 --- /dev/null +++ b/sd/qa/unit/data/pptx/narration.pptx diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 6b782c3067a6..5784d00d112d 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -106,6 +106,7 @@ public: void testTdf134969TransparencyOnColorGradient(); void testTdf136911(); void testArcTo(); + void testNarrationMimeType(); CPPUNIT_TEST_SUITE(SdOOXMLExportTest1); @@ -156,6 +157,7 @@ public: CPPUNIT_TEST(testTdf134969TransparencyOnColorGradient); CPPUNIT_TEST(testTdf136911); CPPUNIT_TEST(testArcTo); + CPPUNIT_TEST(testNarrationMimeType); CPPUNIT_TEST_SUITE_END(); @@ -1297,6 +1299,23 @@ void SdOOXMLExportTest1::testArcTo() assertXPath(pXmlDoc, sPath, "swAng", "2700000"); } +void SdOOXMLExportTest1::testNarrationMimeType() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/narration.pptx"), PPTX); + utl::TempFile aTempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &aTempFile); + xmlDocUniquePtr pXmlDoc = parseExport(aTempFile, "[Content_Types].xml"); + // Without the accompanying fix in place, this test would have failed with: + // - Expected: audio/mp4 + // - Actual : application/vnd.sun.star.media + // i.e. the mime type of the narration was incorrect. + assertXPath(pXmlDoc, + "/ContentType:Types/ContentType:Override[@PartName='/ppt/media/media1.m4a']", + "ContentType", "audio/mp4"); + xDocShRef->DoClose(); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest1); CPPUNIT_PLUGIN_IMPLEMENT(); |