summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/animations/Command.idl38
-rw-r--r--sd/source/core/CustomAnimationEffect.cxx5
-rw-r--r--sd/source/filter/ppt/pptinanimations.cxx8
4 files changed, 46 insertions, 6 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index e1c6e9bda495..12e64e8065b9 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/animations
AnimateColor \
AnimateSet \
Audio \
+ Command \
IterateContainer \
ParallelTimeContainer \
SequenceTimeContainer \
diff --git a/offapi/com/sun/star/animations/Command.idl b/offapi/com/sun/star/animations/Command.idl
new file mode 100644
index 000000000000..21a30c7a8d99
--- /dev/null
+++ b/offapi/com/sun/star/animations/Command.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_Command_idl__
+#define __com_sun_star_animations_Command_idl__
+
+#include <com/sun/star/animations/XCommand.idl>
+
+
+module com { module sun { module star { module animations {
+
+
+/**
+ @since LibreOffice 4.1
+*/
+service Command : com::sun::star::animations::XCommand;
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 5f7a9e18bbb3..88f7bea54021 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -23,6 +23,7 @@
#include <com/sun/star/animations/AnimateSet.hpp>
#include <com/sun/star/animations/AnimationFill.hpp>
#include <com/sun/star/animations/Audio.hpp>
+#include <com/sun/star/animations/Command.hpp>
#include <com/sun/star/animations/IterateContainer.hpp>
#include <com/sun/star/animations/ParallelTimeContainer.hpp>
#include <com/sun/star/animations/SequenceTimeContainer.hpp>
@@ -1651,8 +1652,8 @@ void CustomAnimationEffect::setStopAudio()
if( mxAudio.is() )
removeAudio();
- Reference< XMultiServiceFactory > xMsf( ::comphelper::getProcessServiceFactory() );
- Reference< XCommand > xCommand( xMsf->createInstance( "com.sun.star.animations.Command" ), UNO_QUERY_THROW );
+ Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ Reference< XCommand > xCommand( Command::create( xContext ) );
xCommand->setCommand( EffectCommands::STOPAUDIO );
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index c6a02baf7591..dc0ccda28375 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -23,9 +23,8 @@
#include <com/sun/star/animations/Timing.hpp>
#include <com/sun/star/animations/Event.hpp>
#include <com/sun/star/animations/AnimationEndSync.hpp>
+#include <com/sun/star/animations/Command.hpp>
#include <com/sun/star/animations/EventTrigger.hpp>
-#include <com/sun/star/presentation/EffectNodeType.hpp>
-#include <com/sun/star/presentation/EffectPresetClass.hpp>
#include <com/sun/star/animations/AnimationNodeType.hpp>
#include <com/sun/star/animations/AnimationTransformType.hpp>
#include <com/sun/star/animations/AnimationCalcMode.hpp>
@@ -41,6 +40,8 @@
#include <com/sun/star/animations/XAnimateTransform.hpp>
#include <com/sun/star/animations/ValuePair.hpp>
#include <com/sun/star/animations/AnimationColorSpace.hpp>
+#include <com/sun/star/presentation/EffectNodeType.hpp>
+#include <com/sun/star/presentation/EffectPresetClass.hpp>
#include <com/sun/star/presentation/ShapeAnimationSubType.hpp>
#include <com/sun/star/presentation/EffectCommands.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
@@ -1419,8 +1420,7 @@ int AnimationImporter::importTimeContainer( const Atom* pAtom, const Reference<
if( pChildAtom->hasChildAtom( DFF_msofbtAnimCommand ) )
{
Reference< XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- const OUString aServiceName( "com.sun.star.animations.Command" );
- Reference< XAnimationNode > xChildNode( xContext->getServiceManager()->createInstanceWithContext(aServiceName, xContext), UNO_QUERY );
+ Reference< XAnimationNode > xChildNode( Command::create(xContext), UNO_QUERY_THROW );
nNodes += importAnimationNodeContainer( pChildAtom, xChildNode );
Reference< XTimeContainer > xParentContainer( xNode, UNO_QUERY );
if( xParentContainer.is() && xChildNode.is() )