diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-01-26 17:38:23 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-01-26 21:15:24 +0100 |
commit | 1093c931e9e4c86a47ea5972217719d5fa169b71 (patch) | |
tree | 39ebdf2935096d725f2c0712fd4ac03bfc530601 /animations | |
parent | bbce1482f161e6e7562fad39897a04454e1c726b (diff) |
[API CHANGE] PPTX filter: fix lost hide-while-show prop for slide narrations
The OOXML markup is <p:cMediaNode ... showWhenStopped="0">, but the UI
uses "Hide During Show", which is easier to understand, so use the
second naming in the code.
With this, the PPTX no longer makes the speaker bitmaps on slides
visible while projecting.
API change, because the animation node is only available via UNO, though
it's likely that no actual external code would ever interact with it
directly. (And also add a stub Narration attribute, so that can be
implemented in a follow-up commit without an API change.)
Change-Id: Ia90a2fb30c2bfdb4cff2901fe11bdf1d4ab38261
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109969
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'animations')
-rw-r--r-- | animations/source/animcore/animcore.cxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx index ba1f6f7d4231..428578fbb831 100644 --- a/animations/source/animcore/animcore.cxx +++ b/animations/source/animcore/animcore.cxx @@ -254,6 +254,10 @@ public: virtual void SAL_CALL setSource( const Any& _source ) override; virtual double SAL_CALL getVolume() override; virtual void SAL_CALL setVolume( double _volume ) override; + sal_Bool SAL_CALL getHideDuringShow() override; + void SAL_CALL setHideDuringShow(sal_Bool bHideDuringShow) override; + sal_Bool SAL_CALL getNarration() override; + void SAL_CALL setNarration(sal_Bool bNarration) override; // XCommand - the following two shadowed by animate, unfortunately @@ -347,6 +351,7 @@ private: // XAudio double mfVolume; + bool mbHideDuringShow; // XCommand sal_Int16 mnCommand; @@ -434,6 +439,7 @@ AnimationNode::AnimationNode( sal_Int16 nNodeType ) mbMode(true), mnFadeColor(0), mfVolume(1.0), + mbHideDuringShow(false), mnCommand(0), mnIterateType( css::presentation::ShapeAnimationSubType::AS_WHOLE ), mfIterateInterval(0.0) @@ -504,6 +510,7 @@ AnimationNode::AnimationNode( const AnimationNode& rNode ) // XAudio mfVolume( rNode.mfVolume ), + mbHideDuringShow(rNode.mbHideDuringShow), // XCommand mnCommand( rNode.mnCommand ), @@ -1807,6 +1814,30 @@ void SAL_CALL AnimationNode::setVolume( double _volume ) } } +sal_Bool SAL_CALL AnimationNode::getHideDuringShow() +{ + osl::Guard<osl::Mutex> aGuard(maMutex); + return mbHideDuringShow; +} + +void SAL_CALL AnimationNode::setHideDuringShow(sal_Bool bHideDuringShow) +{ + osl::Guard<osl::Mutex> aGuard(maMutex); + if (static_cast<bool>(bHideDuringShow) != mbHideDuringShow) + { + mbHideDuringShow = bHideDuringShow; + fireChangeListener(); + } +} + +sal_Bool SAL_CALL AnimationNode::getNarration() +{ + return false; +} + +void SAL_CALL AnimationNode::setNarration(sal_Bool /*bNarration*/) +{ +} // XCommand sal_Int16 SAL_CALL AnimationNode::getCommand() |