diff options
-rw-r--r-- | offapi/UnoApi_offapi.mk | 2 | ||||
-rw-r--r-- | offapi/com/sun/star/animations/AnimateColor.idl | 38 | ||||
-rw-r--r-- | offapi/com/sun/star/animations/AnimateSet.idl | 38 | ||||
-rw-r--r-- | sd/source/core/CustomAnimationEffect.cxx | 23 |
4 files changed, 87 insertions, 14 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk index 4b6492d24017..29e1a786412c 100644 --- a/offapi/UnoApi_offapi.mk +++ b/offapi/UnoApi_offapi.mk @@ -36,6 +36,8 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/accessibil AccessBridge \ )) $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/animations,\ + AnimateColor \ + AnimateSet \ ParallelTimeContainer \ SequenceTimeContainer \ TargetPropertiesCreator \ diff --git a/offapi/com/sun/star/animations/AnimateColor.idl b/offapi/com/sun/star/animations/AnimateColor.idl new file mode 100644 index 000000000000..3e07383fbd4b --- /dev/null +++ b/offapi/com/sun/star/animations/AnimateColor.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_AnimateColor_idl__ +#define __com_sun_star_animations_AnimateColor_idl__ + +#include <com/sun/star/animations/XAnimate.idl> + + +module com { module sun { module star { module animations { + + +/** + @since LibreOffice 4.1 +*/ +service AnimateColor : com::sun::star::animations::XAnimate; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/offapi/com/sun/star/animations/AnimateSet.idl b/offapi/com/sun/star/animations/AnimateSet.idl new file mode 100644 index 000000000000..8c1c1aa97686 --- /dev/null +++ b/offapi/com/sun/star/animations/AnimateSet.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_AnimateSet_idl__ +#define __com_sun_star_animations_AnimateSet_idl__ + +#include <com/sun/star/animations/XAnimate.idl> + + +module com { module sun { module star { module animations { + + +/** + @since LibreOffice 4.1 +*/ +service AnimateSet : com::sun::star::animations::XAnimate; + + +}; }; }; }; + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 9b397bea4708..0bbaf013ea51 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -19,6 +19,8 @@ #include <tools/debug.hxx> #include <com/sun/star/util/XCloneable.hpp> +#include <com/sun/star/animations/AnimateColor.hpp> +#include <com/sun/star/animations/AnimateSet.hpp> #include <com/sun/star/animations/AnimationFill.hpp> #include <com/sun/star/animations/ParallelTimeContainer.hpp> #include <com/sun/star/animations/SequenceTimeContainer.hpp> @@ -72,18 +74,10 @@ #include "animations.hxx" using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; using namespace ::com::sun::star::presentation; using namespace ::com::sun::star::animations; -using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::Sequence; -using ::com::sun::star::uno::XInterface; -using ::com::sun::star::uno::UNO_QUERY; -using ::com::sun::star::uno::UNO_QUERY_THROW; -using ::com::sun::star::uno::Any; -using ::com::sun::star::uno::makeAny; -using ::com::sun::star::uno::Exception; -using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::container::XEnumerationAccess; using ::com::sun::star::container::XEnumeration; using ::com::sun::star::beans::NamedValue; @@ -978,12 +972,13 @@ Reference< XAnimationNode > CustomAnimationEffect::createAfterEffectNode() const { DBG_ASSERT( mbHasAfterEffect, "sd::CustomAnimationEffect::createAfterEffectNode(), this node has no after effect!" ); - Reference< XMultiServiceFactory > xMsf( ::comphelper::getProcessServiceFactory() ); + Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); - const char* pServiceName = maDimColor.hasValue() ? - "com.sun.star.animations.AnimateColor" : "com.sun.star.animations.AnimateSet"; - - Reference< XAnimate > xAnimate( xMsf->createInstance(OUString::createFromAscii(pServiceName) ), UNO_QUERY_THROW ); + Reference< XAnimate > xAnimate; + if( maDimColor.hasValue() ) + xAnimate = AnimateColor::create( xContext ); + else + xAnimate = AnimateSet::create( xContext ); Any aTo; OUString aAttributeName; |