Kaydet (Commit) ccd627d5 authored tarafından Chris Sherlock's avatar Chris Sherlock Kaydeden (comit) Stephan Bergmann

canvas: use constructor syntax in canvas.component

Change-Id: I983307f7eeb5702c51ca2398e69c9c560c6e2435
Signed-off-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst d5c93ccc
...@@ -19,7 +19,8 @@ ...@@ -19,7 +19,8 @@
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@" <component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
prefix="canvasfactory" xmlns="http://openoffice.org/2010/uno-components"> prefix="canvasfactory" xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.rendering.CanvasFactory"> <implementation name="com.sun.star.comp.rendering.CanvasFactory"
constructor="com_sun_star_comp_rendering_CanvasFactory_get_implementation">
<service name="com.sun.star.rendering.CanvasFactory"/> <service name="com.sun.star.rendering.CanvasFactory"/>
</implementation> </implementation>
</component> </component>
...@@ -226,12 +226,6 @@ CanvasFactory::~CanvasFactory() ...@@ -226,12 +226,6 @@ CanvasFactory::~CanvasFactory()
} }
Reference<XInterface> create( Reference<XComponentContext> const & xContext )
{
return static_cast< ::cppu::OWeakObject * >(
new CanvasFactory( xContext ) );
}
// XServiceInfo // XServiceInfo
OUString CanvasFactory::getImplementationName() throw (RuntimeException, std::exception) OUString CanvasFactory::getImplementationName() throw (RuntimeException, std::exception)
{ {
...@@ -503,30 +497,15 @@ Reference<XInterface> CanvasFactory::createInstanceWithArguments( ...@@ -503,30 +497,15 @@ Reference<XInterface> CanvasFactory::createInstanceWithArguments(
name, args, m_xContext ); name, args, m_xContext );
} }
const ::cppu::ImplementationEntry s_entries [] = {
{
create,
getImplName,
getSuppServices,
::cppu::createSingleComponentFactory,
0, 0
},
{ 0, 0, 0, 0, 0, 0 }
};
} // anon namespace } // anon namespace
extern "C" {
SAL_DLLPUBLIC_EXPORT void * SAL_CALL canvasfactory_component_getFactory( extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL
sal_Char const * pImplName, com_sun_star_comp_rendering_CanvasFactory_get_implementation(::com::sun::star::uno::XComponentContext* context,
void * pServiceManager, ::com::sun::star::uno::Sequence<css::uno::Any> const &)
void * pRegistryKey )
{ {
return ::cppu::component_getFactoryHelper( return cppu::acquire(new CanvasFactory(context));
pImplName, pServiceManager, pRegistryKey, s_entries );
} }
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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