diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2021-04-20 12:47:40 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2021-04-21 18:30:15 +0200 |
commit | 093f90fa9bf71174c08c271fc9ac1469af504441 (patch) | |
tree | 1a53315f26de2000b1be0827da45b921b07000fa | |
parent | 3a4bfe3e45be2d5b591ab5cae3694c9492ca9e1b (diff) |
Revert "tdf#125949 Allow the slide to continue with ..." (tdf#133447)
These animations were causing problems because of Cairo not handling
well large matrix values. With the real problem fixed this can now
be reverted. I assume the commit claiming to occur with OpenGL was
a mistake, I cannot reproduce any problem, or possibly the problem
went away when the OpenGL VCL backend was removed.
This reverts commit 8eb2d2972583b909a249f5b0f22a9b1fbf533d24.
This reverts commit 3e88fc6b0eef06e1e12fcfe765e3092c6c06ce5c.
Change-Id: I1c1fff94ff65c7937197a32176a8775ecb2a502e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114345
Tested-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r-- | slideshow/Library_slideshow.mk | 4 | ||||
-rw-r--r-- | slideshow/source/engine/effectrewinder.cxx | 61 | ||||
-rw-r--r-- | slideshow/source/engine/effectrewinder.hxx | 3 |
3 files changed, 1 insertions, 67 deletions
diff --git a/slideshow/Library_slideshow.mk b/slideshow/Library_slideshow.mk index 3ff098c01639..de589f210602 100644 --- a/slideshow/Library_slideshow.mk +++ b/slideshow/Library_slideshow.mk @@ -32,10 +32,6 @@ $(eval $(call gb_Library_use_externals,slideshow,\ )) endif -$(eval $(call gb_Library_use_custom_headers,slideshow,\ - officecfg/registry \ -)) - $(eval $(call gb_Library_use_sdk_api,slideshow)) $(eval $(call gb_Library_use_libraries,slideshow,\ diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx index 7d329c9ae411..48a83d591437 100644 --- a/slideshow/source/engine/effectrewinder.cxx +++ b/slideshow/source/engine/effectrewinder.cxx @@ -27,11 +27,8 @@ #include <com/sun/star/animations/Event.hpp> #include <com/sun/star/animations/EventTrigger.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp> -#include <com/sun/star/animations/XAnimate.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <officecfg/Office/Canvas.hxx> - using ::com::sun::star::uno::Reference; using namespace ::com::sun::star; @@ -311,66 +308,9 @@ bool EffectRewinder::resetEffectCount() return false; } -bool EffectRewinder::hasBlockedAnimation( const css::uno::Reference<css::animations::XAnimationNode>& xNode) -{ - bool isShapeTarget = false;; - OUString preset_id; - OUString preset_sub_type; - OUString preset_property; - - if (xNode->getUserData().getLength()) - { - for(int i = 0; i < xNode->getUserData().getLength(); i++) - { - if(xNode->getUserData()[i].Name == "preset-id") - xNode->getUserData()[i].Value >>= preset_id; - if(xNode->getUserData()[i].Name == "preset-sub-type") - xNode->getUserData()[i].Value >>= preset_sub_type; - if(xNode->getUserData()[i].Name == "preset-property") - xNode->getUserData()[i].Value >>= preset_property; - } - } - - uno::Reference<container::XEnumerationAccess> xEnumerationAccess (xNode, uno::UNO_QUERY); - if (xEnumerationAccess.is()) - { - uno::Reference<container::XEnumeration> xEnumeration ( - xEnumerationAccess->createEnumeration()); - if (xEnumeration.is()) - while (xEnumeration->hasMoreElements()) - { - uno::Reference<animations::XAnimationNode> xNext (xEnumeration->nextElement(), uno::UNO_QUERY); - uno::Reference<animations::XAnimate> xAnimate( xNext, uno::UNO_QUERY ); - - if(xAnimate.is()) - { - uno::Reference< drawing::XShape > xShape( xAnimate->getTarget(), uno::UNO_QUERY ); - - if (xShape.is() || xAnimate->getTarget().getValueType() == cppu::UnoType<void>::get()) - isShapeTarget=true; - } - } - } - - if(isShapeTarget && - ((preset_id == "ooo-entrance-zoom" && preset_sub_type == "in") || // Entrance Zoom In - (preset_id == "ooo-entrance-swivel" ) || // Entrance Swivel - (preset_id == "ooo-entrance-spiral-in") || // Entrance Spiral-In - (preset_id == "ooo-entrance-stretchy"))) // Entrance Stretchy - return true; - - return false; -} bool EffectRewinder::notifyAnimationStart (const AnimationNodeSharedPtr& rpNode) { - Reference<animations::XAnimationNode> xNode (rpNode->getXAnimationNode()); - - if( xNode.is() && - !officecfg::Office::Canvas::ForceSafeServiceImpl::get() && - hasBlockedAnimation(xNode) ) - skipSingleMainSequenceEffects(); - // This notification is only relevant for us when the rpNode belongs to // the main sequence. BaseNodeSharedPtr pBaseNode (::std::dynamic_pointer_cast<BaseNode>(rpNode)); @@ -385,6 +325,7 @@ bool EffectRewinder::notifyAnimationStart (const AnimationNodeSharedPtr& rpNode) // triggered. bool bIsUserTriggered (false); + Reference<animations::XAnimationNode> xNode (rpNode->getXAnimationNode()); if (xNode.is()) { animations::Event aEvent; diff --git a/slideshow/source/engine/effectrewinder.hxx b/slideshow/source/engine/effectrewinder.hxx index 8084b03f6248..093259785c93 100644 --- a/slideshow/source/engine/effectrewinder.hxx +++ b/slideshow/source/engine/effectrewinder.hxx @@ -102,9 +102,6 @@ public: */ void skipAllMainSequenceEffects(); - //FIXME: That is an opengl issue(it doesn't allow to animate some animations), remove that function when opengl fixed. - static bool hasBlockedAnimation( const css::uno::Reference<css::animations::XAnimationNode>& xNode); - private: EventMultiplexer& mrEventMultiplexer; EventQueue& mrEventQueue; |