From ccd627d5105fc5157d4c65ab8abb903df01e5485 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Thu, 5 Mar 2015 20:34:00 +1100 Subject: canvas: use constructor syntax in canvas.component Change-Id: I983307f7eeb5702c51ca2398e69c9c560c6e2435 Signed-off-by: Stephan Bergmann --- canvas/source/factory/canvasfactory.component | 3 ++- canvas/source/factory/cf_service.cxx | 29 ++++----------------------- 2 files changed, 6 insertions(+), 26 deletions(-) (limited to 'canvas/source') diff --git a/canvas/source/factory/canvasfactory.component b/canvas/source/factory/canvasfactory.component index 514f242b525a..91a0fa7d7625 100644 --- a/canvas/source/factory/canvasfactory.component +++ b/canvas/source/factory/canvasfactory.component @@ -19,7 +19,8 @@ - + diff --git a/canvas/source/factory/cf_service.cxx b/canvas/source/factory/cf_service.cxx index 6d413fdf62f9..2dd9754e9d97 100644 --- a/canvas/source/factory/cf_service.cxx +++ b/canvas/source/factory/cf_service.cxx @@ -226,12 +226,6 @@ CanvasFactory::~CanvasFactory() } -Reference create( Reference const & xContext ) -{ - return static_cast< ::cppu::OWeakObject * >( - new CanvasFactory( xContext ) ); -} - // XServiceInfo OUString CanvasFactory::getImplementationName() throw (RuntimeException, std::exception) { @@ -503,30 +497,15 @@ Reference CanvasFactory::createInstanceWithArguments( name, args, m_xContext ); } -const ::cppu::ImplementationEntry s_entries [] = { - { - create, - getImplName, - getSuppServices, - ::cppu::createSingleComponentFactory, - 0, 0 - }, - { 0, 0, 0, 0, 0, 0 } -}; - } // anon namespace -extern "C" { -SAL_DLLPUBLIC_EXPORT void * SAL_CALL canvasfactory_component_getFactory( - sal_Char const * pImplName, - void * pServiceManager, - void * pRegistryKey ) +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_comp_rendering_CanvasFactory_get_implementation(::com::sun::star::uno::XComponentContext* context, + ::com::sun::star::uno::Sequence const &) { - return ::cppu::component_getFactoryHelper( - pImplName, pServiceManager, pRegistryKey, s_entries ); + return cppu::acquire(new CanvasFactory(context)); } -} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit