diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-01-27 14:25:21 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-01-27 18:04:44 +0100 |
commit | 020c721fa937d63b2c1b1bf6185ce1060e630676 (patch) | |
tree | 7d3fe109dc7d4ed98fe64deb45927ee36b0bed45 /sd | |
parent | fad5b7b9cf936bf6df49e2ac28977f350db24253 (diff) |
PPTX filter: fix lost is-narration property for slide narrations
Otherwise removing narrations don't work in powerpoint, it would say
there are no narrations, just plain media shapes.
Change-Id: Ibd0478540ac018bc23f81223846518b3bf7c7c2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110016
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/export-tests-ooxml1.cxx | 5 | ||||
-rw-r--r-- | sd/source/filter/eppt/pptx-animations.cxx | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index b8189c73a87e..da61677f7b48 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -1358,6 +1358,11 @@ void SdOOXMLExportTest1::testNarrationMimeType() // i.e. <p:cMediaNode> had the default visibility -> bitmap was visible during slideshow. assertXPath(pSlideDoc, "//p:childTnLst/p:audio/p:cMediaNode", "showWhenStopped", "0"); + // Without the accompanying fix in place, this test would have failed with: + // - ... no attribute 'isNarration' exist + // i.e. <p:audio> was not a narration -> could not mass-remove narrations on the UI. + assertXPath(pSlideDoc, "//p:childTnLst/p:audio", "isNarration", "1"); + xDocShRef->DoClose(); } diff --git a/sd/source/filter/eppt/pptx-animations.cxx b/sd/source/filter/eppt/pptx-animations.cxx index 7b64ed365b55..5de9475857d3 100644 --- a/sd/source/filter/eppt/pptx-animations.cxx +++ b/sd/source/filter/eppt/pptx-animations.cxx @@ -1235,7 +1235,8 @@ void PPTXAnimationExport::WriteAnimationNodeAudio() mrPowerPointExport.embedEffectAudio(mpFS, sUrl, sRelId, sName); } - mpFS->startElementNS(XML_p, XML_audio); + bool bNarration = xAudio->getNarration(); + mpFS->startElementNS(XML_p, XML_audio, XML_isNarration, bNarration ? "1" : "0"); bool bHideDuringShow = xAudio->getHideDuringShow(); mpFS->startElementNS(XML_p, XML_cMediaNode, XML_showWhenStopped, bHideDuringShow ? "0" : "1"); |