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 /animations | |
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 'animations')
-rw-r--r-- | animations/source/animcore/animcore.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index 428578fbb831..adb41c26c0e7 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -352,6 +352,7 @@ private: // XAudio double mfVolume; bool mbHideDuringShow; + bool mbNarration; // XCommand sal_Int16 mnCommand; @@ -440,6 +441,7 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) mnFadeColor(0), mfVolume(1.0), mbHideDuringShow(false), + mbNarration(false), mnCommand(0), mnIterateType( css::presentation::ShapeAnimationSubType::AS_WHOLE ), mfIterateInterval(0.0) @@ -511,6 +513,7 @@ AnimationNode::AnimationNode( const AnimationNode& rNode ) // XAudio mfVolume( rNode.mfVolume ), mbHideDuringShow(rNode.mbHideDuringShow), + mbNarration(rNode.mbNarration), // XCommand mnCommand( rNode.mnCommand ), @@ -1832,11 +1835,18 @@ void SAL_CALL AnimationNode::setHideDuringShow(sal_Bool bHideDuringShow) sal_Bool SAL_CALL AnimationNode::getNarration() { - return false; + osl::Guard<osl::Mutex> aGuard(maMutex); + return mbNarration; } -void SAL_CALL AnimationNode::setNarration(sal_Bool /*bNarration*/) +void SAL_CALL AnimationNode::setNarration(sal_Bool bNarration) { + osl::Guard<osl::Mutex> aGuard(maMutex); + if (static_cast<bool>(bNarration) != mbNarration) + { + mbNarration = bNarration; + fireChangeListener(); + } } // XCommand |