animations: convert animcore.component to constructor usage
Change-Id: Ia623a19457000fe717e29d6b0e73f53b978f7de8 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
committed by
Stephan Bergmann
parent
7cfa311d55
commit
063fea93d6
@@ -34,7 +34,6 @@ $(eval $(call gb_Library_use_libraries,animcore,\
|
||||
|
||||
$(eval $(call gb_Library_add_exception_objects,animcore,\
|
||||
animations/source/animcore/animcore \
|
||||
animations/source/animcore/factreg \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
|
@@ -19,37 +19,48 @@
|
||||
|
||||
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
|
||||
prefix="animcore" xmlns="http://openoffice.org/2010/uno-components">
|
||||
<implementation name="animcore::Animate">
|
||||
<implementation name="animcore::Animate"
|
||||
constructor="com_sun_star_animations_Animate_get_implementation">>
|
||||
<service name="com.sun.star.animations.Animate"/>
|
||||
</implementation>
|
||||
<implementation name="animcore::AnimateColor">
|
||||
<implementation name="animcore::AnimateColor"
|
||||
constructor="com_sun_star_animations_AnimateColor_get_implementation">
|
||||
<service name="com.sun.star.animations.AnimateColor"/>
|
||||
</implementation>
|
||||
<implementation name="animcore::AnimateMotion">
|
||||
<implementation name="animcore::AnimateMotion"
|
||||
constructor="com_sun_star_animations_AnimateMotion_get_implementation">
|
||||
<service name="com.sun.star.animations.AnimateMotion"/>
|
||||
</implementation>
|
||||
<implementation name="animcore::AnimateSet">
|
||||
<implementation name="animcore::AnimateSet"
|
||||
constructor="com_sun_star_animations_AnimateSet_get_implementation">
|
||||
<service name="com.sun.star.animations.AnimateSet"/>
|
||||
</implementation>
|
||||
<implementation name="animcore::AnimateTransform">
|
||||
<implementation name="animcore::AnimateTransform"
|
||||
constructor="com_sun_star_animations_AnimateTransform_get_implementation">
|
||||
<service name="com.sun.star.animations.AnimateTransform"/>
|
||||
</implementation>
|
||||
<implementation name="animcore::Audio">
|
||||
<implementation name="animcore::Audio"
|
||||
constructor="com_sun_star_animations_Audio_get_implementation">
|
||||
<service name="com.sun.star.animations.Audio"/>
|
||||
</implementation>
|
||||
<implementation name="animcore::Command">
|
||||
<implementation name="animcore::Command"
|
||||
constructor="com_sun_star_animations_Command_get_implementation">
|
||||
<service name="com.sun.star.animations.Command"/>
|
||||
</implementation>
|
||||
<implementation name="animcore::IterateContainer">
|
||||
<implementation name="animcore::IterateContainer"
|
||||
constructor="com_sun_star_animations_IterateContainer_get_implementation">
|
||||
<service name="com.sun.star.animations.IterateContainer"/>
|
||||
</implementation>
|
||||
<implementation name="animcore::ParallelTimeContainer">
|
||||
<implementation name="animcore::ParallelTimeContainer"
|
||||
constructor="com_sun_star_animations_ParallelTimeContainer_get_implementation">
|
||||
<service name="com.sun.star.animations.ParallelTimeContainer"/>
|
||||
</implementation>
|
||||
<implementation name="animcore::SequenceTimeContainer">
|
||||
<implementation name="animcore::SequenceTimeContainer"
|
||||
constructor="com_sun_star_animations_SequenceTimeContainer_get_implementation">
|
||||
<service name="com.sun.star.animations.SequenceTimeContainer"/>
|
||||
</implementation>
|
||||
<implementation name="animcore::TransitionFilter">
|
||||
<implementation name="animcore::TransitionFilter"
|
||||
constructor="com_sun_star_animations_TransitionFilter_get_implementation">
|
||||
<service name="com.sun.star.animations.TransitionFilter"/>
|
||||
</implementation>
|
||||
</component>
|
||||
|
@@ -510,37 +510,137 @@ AnimationNode::~AnimationNode()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
#define IMPL_NODE_FACTORY(N,IN,SN)\
|
||||
Reference< XInterface > SAL_CALL createInstance_##N( const Reference< XComponentContext > & ) throw (Exception)\
|
||||
{\
|
||||
return static_cast< ::cppu::OWeakObject * >(new AnimationNode( N ));\
|
||||
}\
|
||||
OUString getImplementationName_##N()\
|
||||
{\
|
||||
return OUString( IN );\
|
||||
}\
|
||||
Sequence<OUString> getSupportedServiceNames_##N(void)\
|
||||
{\
|
||||
Sequence<OUString> aRet(1);\
|
||||
aRet.getArray()[0] = SN;\
|
||||
return aRet;\
|
||||
Sequence<OUString> getSupportedServiceNames_PAR()
|
||||
{
|
||||
Sequence<OUString> aRet(1);
|
||||
aRet.getArray()[0] = "com.sun.star.animations.ParallelTimeContainer";
|
||||
return aRet;
|
||||
}
|
||||
|
||||
IMPL_NODE_FACTORY( PAR, "animcore::ParallelTimeContainer", "com.sun.star.animations.ParallelTimeContainer" )
|
||||
IMPL_NODE_FACTORY( SEQ, "animcore::SequenceTimeContainer", "com.sun.star.animations.SequenceTimeContainer" )
|
||||
IMPL_NODE_FACTORY( ITERATE, "animcore::IterateContainer", "com.sun.star.animations.IterateContainer" )
|
||||
IMPL_NODE_FACTORY( ANIMATE, "animcore::Animate", "com.sun.star.animations.Animate" )
|
||||
IMPL_NODE_FACTORY( SET, "animcore::AnimateSet", "com.sun.star.animations.AnimateSet" )
|
||||
IMPL_NODE_FACTORY( ANIMATECOLOR, "animcore::AnimateColor", "com.sun.star.animations.AnimateColor" )
|
||||
IMPL_NODE_FACTORY( ANIMATEMOTION, "animcore::AnimateMotion", "com.sun.star.animations.AnimateMotion" )
|
||||
IMPL_NODE_FACTORY( ANIMATETRANSFORM, "animcore::AnimateTransform", "com.sun.star.animations.AnimateTransform" )
|
||||
IMPL_NODE_FACTORY( TRANSITIONFILTER, "animcore::TransitionFilter", "com.sun.star.animations.TransitionFilter" )
|
||||
IMPL_NODE_FACTORY( AUDIO, "animcore::Audio", "com.sun.star.animations.Audio" );
|
||||
IMPL_NODE_FACTORY( COMMAND, "animcore::Command", "com.sun.star.animations.Command" );
|
||||
OUString getImplementationName_PAR()
|
||||
{
|
||||
return OUString( "animcore::ParallelTimeContainer" );
|
||||
}
|
||||
|
||||
Sequence<OUString> getSupportedServiceNames_SEQ()
|
||||
{
|
||||
Sequence<OUString> aRet(1);
|
||||
aRet.getArray()[0] = "com.sun.star.animations.SequenceTimContainer";
|
||||
return aRet;
|
||||
}
|
||||
|
||||
OUString getImplementationName_SEQ()
|
||||
{
|
||||
return OUString( "animcore::SequenceTimeContainer" );
|
||||
}
|
||||
|
||||
Sequence<OUString> getSupportedServiceNames_ITERATE()
|
||||
{
|
||||
Sequence<OUString> aRet(1);
|
||||
aRet.getArray()[0] = "com.sun.star.animations.IterateContainer";
|
||||
return aRet;
|
||||
}
|
||||
|
||||
OUString getImplementationName_ITERATE()
|
||||
{
|
||||
return OUString( "animcore::IterateContainer" );
|
||||
}
|
||||
|
||||
Sequence<OUString> getSupportedServiceNames_ANIMATE()
|
||||
{
|
||||
Sequence<OUString> aRet(1);
|
||||
aRet.getArray()[0] = "com.sun.star.animations.Animate";
|
||||
return aRet;
|
||||
}
|
||||
|
||||
OUString getImplementationName_ANIMATE()
|
||||
{
|
||||
return OUString( "animcore::Animate" );
|
||||
}
|
||||
|
||||
Sequence<OUString> getSupportedServiceNames_SET()
|
||||
{
|
||||
Sequence<OUString> aRet(1);
|
||||
aRet.getArray()[0] = "com.sun.star.animations.AnimateSet";
|
||||
return aRet;
|
||||
}
|
||||
|
||||
OUString getImplementationName_SET()
|
||||
{
|
||||
return OUString( "animcore::AnimateSet" );
|
||||
}
|
||||
|
||||
Sequence<OUString> getSupportedServiceNames_ANIMATECOLOR(void)
|
||||
{
|
||||
Sequence<OUString> aRet(1);
|
||||
aRet.getArray()[0] = "com.sun.star.animations.AnimateColor";
|
||||
return aRet;
|
||||
}
|
||||
|
||||
OUString getImplementationName_ANIMATECOLOR()
|
||||
{
|
||||
return OUString( "animcore::AnimateColor" );
|
||||
}
|
||||
|
||||
Sequence<OUString> getSupportedServiceNames_ANIMATEMOTION(void)
|
||||
{
|
||||
Sequence<OUString> aRet(1);
|
||||
aRet.getArray()[0] = "com.sun.star.animations.AnimateMotion";
|
||||
return aRet;
|
||||
}
|
||||
|
||||
OUString getImplementationName_ANIMATEMOTION()
|
||||
{
|
||||
return OUString( "animcore::AnimateMotion" );
|
||||
}
|
||||
|
||||
Sequence<OUString> getSupportedServiceNames_ANIMATETRANSFORM()
|
||||
{
|
||||
Sequence<OUString> aRet(1);
|
||||
aRet.getArray()[0] = "com.sun.star.animations.AnimateTransform";
|
||||
return aRet;
|
||||
}
|
||||
|
||||
OUString getImplementationName_ANIMATETRANSFORM()
|
||||
{
|
||||
return OUString( "animcore::AnimateTransform" );
|
||||
}
|
||||
|
||||
Sequence<OUString> getSupportedServiceNames_TRANSITIONFILTER()
|
||||
{
|
||||
Sequence<OUString> aRet(1);
|
||||
aRet.getArray()[0] = "com.sun.star.animations.TransitionFilter";
|
||||
return aRet;
|
||||
}
|
||||
|
||||
OUString getImplementationName_TRANSITIONFILTER()
|
||||
{
|
||||
return OUString( "animcore::TransitionFilter" );
|
||||
}
|
||||
|
||||
Sequence<OUString> getSupportedServiceNames_AUDIO()
|
||||
{
|
||||
Sequence<OUString> aRet(1);
|
||||
aRet.getArray()[0] = "com.sun.star.animations.Audio";
|
||||
return aRet;
|
||||
}
|
||||
|
||||
OUString getImplementationName_AUDIO()
|
||||
{
|
||||
return OUString( "animcore::Audio" );
|
||||
}
|
||||
|
||||
Sequence<OUString> getSupportedServiceNames_COMMAND()
|
||||
{
|
||||
Sequence<OUString> aRet(1);
|
||||
aRet.getArray()[0] = "com.sun.star.animations.Command";
|
||||
return aRet;
|
||||
}
|
||||
|
||||
OUString getImplementationName_COMMAND()
|
||||
{
|
||||
return OUString( "animcore::Command" );
|
||||
}
|
||||
|
||||
// XInterface
|
||||
Any SAL_CALL AnimationNode::queryInterface( const Type& aType ) throw (RuntimeException, std::exception)
|
||||
@@ -2067,4 +2167,82 @@ void AnimationNode::fireChangeListener()
|
||||
|
||||
} // namespace animcore
|
||||
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
|
||||
com_sun_star_animations_ParallelTimeContainer_get_implementation(::com::sun::star::uno::XComponentContext*,
|
||||
::com::sun::star::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(new animcore::AnimationNode(PAR));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
|
||||
com_sun_star_animations_SequenceTimeContainer_get_implementation(::com::sun::star::uno::XComponentContext*,
|
||||
::com::sun::star::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(new animcore::AnimationNode(SEQ));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
|
||||
com_sun_star_animations_IterateContainer_get_implementation(::com::sun::star::uno::XComponentContext*,
|
||||
::com::sun::star::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(new animcore::AnimationNode(ITERATE));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
|
||||
com_sun_star_animations_Animate_get_implementation(::com::sun::star::uno::XComponentContext*,
|
||||
::com::sun::star::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(new animcore::AnimationNode(ANIMATE));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
|
||||
com_sun_star_animations_AnimateSet_get_implementation(::com::sun::star::uno::XComponentContext*,
|
||||
::com::sun::star::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(new animcore::AnimationNode(SET));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
|
||||
com_sun_star_animations_AnimateColor_get_implementation(::com::sun::star::uno::XComponentContext*,
|
||||
::com::sun::star::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(new animcore::AnimationNode(ANIMATECOLOR));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
|
||||
com_sun_star_animations_AnimateMotion_get_implementation(::com::sun::star::uno::XComponentContext*,
|
||||
::com::sun::star::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(new animcore::AnimationNode(ANIMATEMOTION));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
|
||||
com_sun_star_animations_AnimateTransform_get_implementation(::com::sun::star::uno::XComponentContext*,
|
||||
::com::sun::star::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(new animcore::AnimationNode(ANIMATETRANSFORM));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
|
||||
com_sun_star_animations_TransitionFilter_get_implementation(::com::sun::star::uno::XComponentContext*,
|
||||
::com::sun::star::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(new animcore::AnimationNode(TRANSITIONFILTER));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
|
||||
com_sun_star_animations_Audio_get_implementation(::com::sun::star::uno::XComponentContext*,
|
||||
::com::sun::star::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(new animcore::AnimationNode(AUDIO));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
|
||||
com_sun_star_animations_Command_get_implementation(::com::sun::star::uno::XComponentContext*,
|
||||
::com::sun::star::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(new animcore::AnimationNode(COMMAND));
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -1,69 +0,0 @@
|
||||
/* -*- 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 .
|
||||
*/
|
||||
|
||||
#include <osl/diagnose.h>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/implementationentry.hxx>
|
||||
|
||||
#include <com/sun/star/registry/XRegistryKey.hpp>
|
||||
|
||||
using namespace ::cppu;
|
||||
using namespace ::com::sun::star::uno;
|
||||
using namespace ::com::sun::star::lang;
|
||||
using namespace ::com::sun::star::registry;
|
||||
|
||||
#include "factreg.hxx"
|
||||
|
||||
using namespace animcore;
|
||||
|
||||
#define IMPLEMENTATION_ENTRY(N)\
|
||||
{\
|
||||
createInstance_##N, getImplementationName_##N ,\
|
||||
getSupportedServiceNames_##N, createSingleComponentFactory ,\
|
||||
0, 0\
|
||||
}\
|
||||
|
||||
static const struct ImplementationEntry g_entries[] =
|
||||
{
|
||||
IMPLEMENTATION_ENTRY( PAR ),
|
||||
IMPLEMENTATION_ENTRY( SEQ ),
|
||||
IMPLEMENTATION_ENTRY( ITERATE ),
|
||||
IMPLEMENTATION_ENTRY( ANIMATE ),
|
||||
IMPLEMENTATION_ENTRY( SET ),
|
||||
IMPLEMENTATION_ENTRY( ANIMATECOLOR ),
|
||||
IMPLEMENTATION_ENTRY( ANIMATEMOTION ),
|
||||
IMPLEMENTATION_ENTRY( ANIMATETRANSFORM ),
|
||||
IMPLEMENTATION_ENTRY( TRANSITIONFILTER ),
|
||||
IMPLEMENTATION_ENTRY( AUDIO ),
|
||||
IMPLEMENTATION_ENTRY( COMMAND ),
|
||||
{ 0, 0, 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
SAL_DLLPUBLIC_EXPORT void * SAL_CALL animcore_component_getFactory(
|
||||
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
|
||||
{
|
||||
return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
@@ -22,22 +22,38 @@
|
||||
|
||||
namespace animcore {
|
||||
|
||||
#define DECL_NODE_FACTORY(N)\
|
||||
extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance_##N( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & rSMgr ) throw (::com::sun::star::uno::Exception);\
|
||||
extern OUString getImplementationName_##N();\
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_##N(void)
|
||||
extern OUString getImplementationName_PAR();
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_PAR();
|
||||
|
||||
DECL_NODE_FACTORY( PAR );
|
||||
DECL_NODE_FACTORY( SEQ );
|
||||
DECL_NODE_FACTORY( ITERATE );
|
||||
DECL_NODE_FACTORY( ANIMATE );
|
||||
DECL_NODE_FACTORY( SET );
|
||||
DECL_NODE_FACTORY( ANIMATECOLOR );
|
||||
DECL_NODE_FACTORY( ANIMATEMOTION );
|
||||
DECL_NODE_FACTORY( ANIMATETRANSFORM );
|
||||
DECL_NODE_FACTORY( TRANSITIONFILTER );
|
||||
DECL_NODE_FACTORY( AUDIO );
|
||||
DECL_NODE_FACTORY( COMMAND );
|
||||
extern OUString getImplementationName_SEQ();
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_SEQ();
|
||||
|
||||
extern OUString getImplementationName_ITERATE();
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_ITERATE();
|
||||
|
||||
extern OUString getImplementationName_ANIMATE();
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_ANIMATE();
|
||||
|
||||
extern OUString getImplementationName_SET();
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_SET();
|
||||
|
||||
extern OUString getImplementationName_ANIMATECOLOR();
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_ANIMATECOLOR();
|
||||
|
||||
extern OUString getImplementationName_ANIMATEMOTION();
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_ANIMATEMOTION();
|
||||
|
||||
extern OUString getImplementationName_ANIMATETRANSFORM();
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_ANIMATETRANSFORM();
|
||||
|
||||
extern OUString getImplementationName_TRANSITIONFILTER();
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_TRANSITIONFILTER();
|
||||
|
||||
extern OUString getImplementationName_AUDIO();
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_AUDIO();
|
||||
|
||||
extern OUString getImplementationName_COMMAND();
|
||||
extern ::com::sun::star::uno::Sequence< OUString> getSupportedServiceNames_COMMAND();
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user