summaryrefslogtreecommitdiff
path: root/sd/qa/unit
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-04-07 08:31:28 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-04-07 09:45:13 +0200
commit9ac1d3ac65b198f739421f39ab3adc65d35a0908 (patch)
treef0de5664a0d9d46cbd057bba8022558eba5d3cf0 /sd/qa/unit
parentc5153e90784af25890487dd00bcd1f8ac28cc346 (diff)
tdf#141267 PPTX export: fix handling of audio nodes with non-media source
Regression from commit cf5fa358a6bf6e7c0aae2dca1e8fa3334d95ebdb (PPTX export: fix missing audio anim node for slide narrations, 2021-01-25), the problem was that the audio source can be any kind of shape, not only a media shape. Fix the problem by explicitly checking of the shape has a media URL. Change-Id: I2bdde0f9ed3576f307aabff5e39d441f295c203f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113715 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sd/qa/unit')
-rw-r--r--sd/qa/unit/data/pptx/narration-non-media-shape.pptxbin0 -> 30952 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx13
2 files changed, 13 insertions, 0 deletions
diff --git a/sd/qa/unit/data/pptx/narration-non-media-shape.pptx b/sd/qa/unit/data/pptx/narration-non-media-shape.pptx
new file mode 100644
index 000000000000..e7a527485f36
--- /dev/null
+++ b/sd/qa/unit/data/pptx/narration-non-media-shape.pptx
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx
index 4972669e4b82..f12140f1a07f 100644
--- a/sd/qa/unit/export-tests-ooxml1.cxx
+++ b/sd/qa/unit/export-tests-ooxml1.cxx
@@ -98,6 +98,7 @@ public:
void testRoundtripOwnLineStyles();
void testRoundtripPrstDash();
void testDashOnHairline();
+ void testNarrationNonMediaShape();
void testCustomshapeBitmapfillSrcrect();
void testTdf100348FontworkBitmapFill();
void testTdf100348FontworkGradientGlow();
@@ -150,6 +151,7 @@ public:
CPPUNIT_TEST(testRoundtripOwnLineStyles);
CPPUNIT_TEST(testRoundtripPrstDash);
CPPUNIT_TEST(testDashOnHairline);
+ CPPUNIT_TEST(testNarrationNonMediaShape);
CPPUNIT_TEST(testCustomshapeBitmapfillSrcrect);
CPPUNIT_TEST(testTdf100348FontworkBitmapFill);
CPPUNIT_TEST(testTdf100348FontworkGradientGlow);
@@ -1144,6 +1146,17 @@ void SdOOXMLExportTest1::testDashOnHairline()
assertXPath(pXmlDoc, "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:ln/a:custDash/a:ds", 11);
}
+void SdOOXMLExportTest1::testNarrationNonMediaShape()
+{
+ sd::DrawDocShellRef xDocShRef = loadURL(
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/narration-non-media-shape.pptx"), PPTX);
+ utl::TempFile aTempFile;
+ // Without the accompanying fix in place, this test would have failed,
+ // beans::UnknownPropertyException was thrown.
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &aTempFile);
+ xDocShRef->DoClose();
+}
+
void SdOOXMLExportTest1::testCustomshapeBitmapfillSrcrect()
{
::sd::DrawDocShellRef xDocShRef = loadURL(