Kaydet (Commit) 725d23be authored tarafından Noel Grandin's avatar Noel Grandin

fdo#46808, Convert animations::AnimateColor and AnimateSet to new style

The services already existed, just needed IDL files

Change-Id: Ifc1980160b8472bc9bf96a36ca4bff2c4153a8b1
üst 6f0b59e3
...@@ -36,6 +36,8 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/accessibil ...@@ -36,6 +36,8 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/accessibil
AccessBridge \ AccessBridge \
)) ))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/animations,\ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/animations,\
AnimateColor \
AnimateSet \
ParallelTimeContainer \ ParallelTimeContainer \
SequenceTimeContainer \ SequenceTimeContainer \
TargetPropertiesCreator \ TargetPropertiesCreator \
......
/* -*- 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: */
/* -*- 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: */
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <tools/debug.hxx> #include <tools/debug.hxx>
#include <com/sun/star/util/XCloneable.hpp> #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/AnimationFill.hpp>
#include <com/sun/star/animations/ParallelTimeContainer.hpp> #include <com/sun/star/animations/ParallelTimeContainer.hpp>
#include <com/sun/star/animations/SequenceTimeContainer.hpp> #include <com/sun/star/animations/SequenceTimeContainer.hpp>
...@@ -72,18 +74,10 @@ ...@@ -72,18 +74,10 @@
#include "animations.hxx" #include "animations.hxx"
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::presentation; using namespace ::com::sun::star::presentation;
using namespace ::com::sun::star::animations; 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::XEnumerationAccess;
using ::com::sun::star::container::XEnumeration; using ::com::sun::star::container::XEnumeration;
using ::com::sun::star::beans::NamedValue; using ::com::sun::star::beans::NamedValue;
...@@ -978,12 +972,13 @@ Reference< XAnimationNode > CustomAnimationEffect::createAfterEffectNode() const ...@@ -978,12 +972,13 @@ Reference< XAnimationNode > CustomAnimationEffect::createAfterEffectNode() const
{ {
DBG_ASSERT( mbHasAfterEffect, "sd::CustomAnimationEffect::createAfterEffectNode(), this node has no after effect!" ); 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() ? Reference< XAnimate > xAnimate;
"com.sun.star.animations.AnimateColor" : "com.sun.star.animations.AnimateSet"; if( maDimColor.hasValue() )
xAnimate = AnimateColor::create( xContext );
Reference< XAnimate > xAnimate( xMsf->createInstance(OUString::createFromAscii(pServiceName) ), UNO_QUERY_THROW ); else
xAnimate = AnimateSet::create( xContext );
Any aTo; Any aTo;
OUString aAttributeName; OUString aAttributeName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment