summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-04-25 14:18:47 +0200
committerNoel Grandin <noel@peralex.com>2013-04-25 14:44:07 +0200
commit7709511aed6655c8f283db912513626850493eff (patch)
treea3c4e40f1d1e05808c854b90816485a2703ed9a2
parentc3eb3de42649a127490da40aa7774c29dc50281a (diff)
fdo#46808, Convert animations::AnimateMotion to new style
The service already existed, it just needed an IDL file Change-Id: I30cfa80fee436ed859d5bc00d1cb23e465c7e149
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/animations/AnimateMotion.idl38
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx34
3 files changed, 56 insertions, 17 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 12e64e8065b9..0bc067671fac 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -37,6 +37,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/accessibil
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/animations,\
AnimateColor \
+ AnimateMotion \
AnimateSet \
Audio \
Command \
diff --git a/offapi/com/sun/star/animations/AnimateMotion.idl b/offapi/com/sun/star/animations/AnimateMotion.idl
new file mode 100644
index 000000000000..130196424648
--- /dev/null
+++ b/offapi/com/sun/star/animations/AnimateMotion.idl
@@ -0,0 +1,38 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_animations_AnimateMotion_idl__
+#define __com_sun_star_animations_AnimateMotion_idl__
+
+#include <com/sun/star/animations/XAnimationNode.idl>
+
+
+module com { module sun { module star { module animations {
+
+
+/**
+ @since LibreOffice 4.1
+*/
+service AnimateMotion : com::sun::star::animations::XAnimationNode;
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 88f7bea54021..8d2a7bd212ed 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -18,37 +18,38 @@
*/
#include <tools/debug.hxx>
-#include <com/sun/star/util/XCloneable.hpp>
+#include <com/sun/star/animations/AnimationNodeType.hpp>
#include <com/sun/star/animations/AnimateColor.hpp>
+#include <com/sun/star/animations/AnimateMotion.hpp>
#include <com/sun/star/animations/AnimateSet.hpp>
#include <com/sun/star/animations/AnimationFill.hpp>
+#include <com/sun/star/animations/AnimationTransformType.hpp>
#include <com/sun/star/animations/Audio.hpp>
#include <com/sun/star/animations/Command.hpp>
+#include <com/sun/star/animations/Event.hpp>
+#include <com/sun/star/animations/EventTrigger.hpp>
#include <com/sun/star/animations/IterateContainer.hpp>
#include <com/sun/star/animations/ParallelTimeContainer.hpp>
#include <com/sun/star/animations/SequenceTimeContainer.hpp>
+#include <com/sun/star/animations/Timing.hpp>
+#include <com/sun/star/animations/XCommand.hpp>
+#include <com/sun/star/animations/XIterateContainer.hpp>
+#include <com/sun/star/animations/XAnimateTransform.hpp>
+#include <com/sun/star/animations/XAnimateMotion.hpp>
+#include <com/sun/star/animations/XAnimate.hpp>
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/container/XEnumerationAccess.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/presentation/EffectNodeType.hpp>
#include <com/sun/star/presentation/EffectCommands.hpp>
#include <com/sun/star/presentation/EffectPresetClass.hpp>
#include <com/sun/star/presentation/ParagraphTarget.hpp>
-#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/presentation/ShapeAnimationSubType.hpp>
-#include <com/sun/star/animations/AnimationNodeType.hpp>
-#include <com/sun/star/animations/XCommand.hpp>
-#include <com/sun/star/animations/AnimationTransformType.hpp>
-#include <com/sun/star/animations/XIterateContainer.hpp>
-#include <com/sun/star/animations/XAnimateTransform.hpp>
-#include <com/sun/star/animations/Event.hpp>
-#include <com/sun/star/animations/EventTrigger.hpp>
-#include <com/sun/star/animations/Timing.hpp>
-#include <com/sun/star/drawing/XDrawPage.hpp>
#include <com/sun/star/text/XText.hpp>
-#include <com/sun/star/animations/XAnimate.hpp>
-#include <com/sun/star/beans/NamedValue.hpp>
-#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/util/XCloneable.hpp>
#include <com/sun/star/util/XChangesNotifier.hpp>
-#include <com/sun/star/animations/XAnimateMotion.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <com/sun/star/lang/Locale.hpp>
@@ -1886,8 +1887,7 @@ CustomAnimationEffectPtr EffectSequenceHelper::append( const SdrPathObj& rPathOb
try
{
Reference< XTimeContainer > xEffectContainer( createParallelTimeContainer() );
- const OUString aServiceName( "com.sun.star.animations.AnimateMotion" );
- Reference< XAnimationNode > xAnimateMotion( ::comphelper::getProcessServiceFactory()->createInstance(aServiceName), UNO_QUERY_THROW );
+ Reference< XAnimationNode > xAnimateMotion( AnimateMotion::create( ::comphelper::getProcessComponentContext() ) );
xAnimateMotion->setDuration( Any( fDuration ) );
xAnimateMotion->setFill( AnimationFill::HOLD );