summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2021-04-20 12:47:40 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-04-26 10:50:37 +0200
commit0f375b03b98839e6af479866a10bafbd22b1bab1 (patch)
tree9c7e66b85908aa6fbbe8315bec14ad621f311305
parent06d5d625e1dc8489e51b962353ac423669e61fed (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> (cherry picked from commit 093f90fa9bf71174c08c271fc9ac1469af504441) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114420 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--slideshow/Library_slideshow.mk4
-rw-r--r--slideshow/source/engine/effectrewinder.cxx61
-rw-r--r--slideshow/source/engine/effectrewinder.hxx3
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 55666b752bc4..403b8fde244b 100644
--- a/slideshow/source/engine/effectrewinder.cxx
+++ b/slideshow/source/engine/effectrewinder.cxx
@@ -28,11 +28,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;
@@ -312,66 +309,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));
@@ -386,6 +326,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;