summaryrefslogtreecommitdiff
path: root/canvas/source
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock@collabora.com>2015-03-05 20:34:00 +1100
committerStephan Bergmann <sbergman@redhat.com>2015-03-11 16:31:03 +0100
commitccd627d5105fc5157d4c65ab8abb903df01e5485 (patch)
treef0366a52c29d30e6deee7abd69d296a522385de2 /canvas/source
parentd5c93cccaebf92b7f99e174552a7c84a5c652690 (diff)
canvas: use constructor syntax in canvas.component
Change-Id: I983307f7eeb5702c51ca2398e69c9c560c6e2435 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'canvas/source')
-rw-r--r--canvas/source/factory/canvasfactory.component3
-rw-r--r--canvas/source/factory/cf_service.cxx29
2 files changed, 6 insertions, 26 deletions
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 @@
<component loader="com.sun.star.loader.SharedLibrary" environment="@CPPU_ENV@"
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"/>
</implementation>
</component>
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<XInterface> create( Reference<XComponentContext> const & xContext )
-{
- return static_cast< ::cppu::OWeakObject * >(
- new CanvasFactory( xContext ) );
-}
-
// XServiceInfo
OUString CanvasFactory::getImplementationName() throw (RuntimeException, std::exception)
{
@@ -503,30 +497,15 @@ Reference<XInterface> 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<css::uno::Any> const &)
{
- return ::cppu::component_getFactoryHelper(
- pImplName, pServiceManager, pRegistryKey, s_entries );
+ return cppu::acquire(new CanvasFactory(context));
}
-}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */