From c2c530da69152ff9192b9726aa95961803ce9b29 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Wed, 22 Jan 2014 11:54:19 +0100 Subject: Introduce static inline cppu::acquire(), and make use of that. This is much better approach compared to the callback function, as it allows passing arguments to the c++ constructor directly, while still allowing some additional initialization after having acquired the instance. Change-Id: I5a0f981915dd58f1522ee6054e53a3550b29d624 --- stoc/source/servicemanager/servicemanager.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'stoc/source/servicemanager') diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 00763d5649d3..0abf06d80198 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -1674,25 +1674,25 @@ Any ORegistryServiceManager::getPropertyValue(const OUString& PropertyName) extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_stoc_OServiceManager_get_implementation( css::uno::XComponentContext *context, - cppu::constructor_InitializationFunc &) + css::uno::Sequence const &) { - return static_cast(new OServiceManager(context)); + return cppu::acquire(new OServiceManager(context)); } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_stoc_ORegistryServiceManager_get_implementation( css::uno::XComponentContext *context, - cppu::constructor_InitializationFunc &) + css::uno::Sequence const &) { - return static_cast(new ORegistryServiceManager(context)); + return cppu::acquire(new ORegistryServiceManager(context)); } extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_stoc_OServiceManagerWrapper_get_implementation( css::uno::XComponentContext *context, - cppu::constructor_InitializationFunc &) + css::uno::Sequence const &) { - return static_cast(new OServiceManagerWrapper(context)); + return cppu::acquire(new OServiceManagerWrapper(context)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit