From f278397787f7b79cee8536e806e8b7113800f2ef Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Tue, 21 Jan 2014 15:45:43 +0100 Subject: Change _get_implementation()'s not to do initialization directly. Many of the initalizations (in eg. framework) have to be done on an acquire()'d object, so instead of doing the initialization directly, return the initialization member function back to the createInstance() / createInstanceWithContext() / ... and perform the initialization there. As a sideeffect, I belive the calling initialize() from servicemanager is not that much a hack any more - whoever converts the implementation to be constructor-base has the choice to provide the callback, or still initialize through XInitialization, where the callback is preferred by servicemanager when it exists. Change-Id: I8a87b75c54c1441ca0f184967d31ff4902fc4081 --- stoc/source/defaultregistry/defaultregistry.cxx | 2 +- stoc/source/implementationregistration/implreg.cxx | 2 +- stoc/source/loader/dllcomponentloader.cxx | 2 +- stoc/source/security/access_controller.cxx | 2 +- stoc/source/security/file_policy.cxx | 2 +- stoc/source/servicemanager/servicemanager.cxx | 6 +++--- stoc/source/simpleregistry/simpleregistry.cxx | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) (limited to 'stoc') diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index a5446f2d30f0..2f09bf5309a2 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -1353,7 +1353,7 @@ void SAL_CALL NestedRegistryImpl::mergeKey( const OUString& aKeyName, const OUSt extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_stoc_NestedRegistry_get_implementation( SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - css::uno::Sequence const &) + cppu::constructor_InitializationFunc &) { return static_cast(new NestedRegistryImpl); } diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index e594dbda1a06..8218c2ebdbcb 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -1819,7 +1819,7 @@ Reference< XSimpleRegistry > ImplementationRegistration::createTemporarySimpleRe extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_stoc_ImplementationRegistration_get_implementation( css::uno::XComponentContext *context, - css::uno::Sequence const &) + cppu::constructor_InitializationFunc &) { return static_cast(new ImplementationRegistration(context)); } diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index 4b90cdc133f0..e52519cb67ad 100644 --- a/stoc/source/loader/dllcomponentloader.cxx +++ b/stoc/source/loader/dllcomponentloader.cxx @@ -168,7 +168,7 @@ sal_Bool SAL_CALL DllComponentLoader::writeRegistryInfo( extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_stoc_DLLComponentLoader_get_implementation( css::uno::XComponentContext *context, - css::uno::Sequence const &) + cppu::constructor_InitializationFunc &) { return static_cast(new DllComponentLoader(context)); } diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index e8c8cb8f5fc7..3fbf8f5c7db6 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -982,7 +982,7 @@ Sequence< OUString > AccessController::getSupportedServiceNames() extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_security_comp_stoc_AccessController_get_implementation( css::uno::XComponentContext *context, - css::uno::Sequence const &) + cppu::constructor_InitializationFunc &) { return static_cast(new AccessController(context)); } diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx index 6766aff2f8f2..2864b6da6f14 100644 --- a/stoc/source/security/file_policy.cxx +++ b/stoc/source/security/file_policy.cxx @@ -543,7 +543,7 @@ Sequence< OUString > FilePolicy::getSupportedServiceNames() extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_security_comp_stoc_FilePolicy_get_implementation( css::uno::XComponentContext *context, - css::uno::Sequence const &) + cppu::constructor_InitializationFunc &) { return static_cast(new FilePolicy(context)); } diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 3e7cb3d1e051..00763d5649d3 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -1674,7 +1674,7 @@ 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, - css::uno::Sequence const &) + cppu::constructor_InitializationFunc &) { return static_cast(new OServiceManager(context)); } @@ -1682,7 +1682,7 @@ com_sun_star_comp_stoc_OServiceManager_get_implementation( extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_stoc_ORegistryServiceManager_get_implementation( css::uno::XComponentContext *context, - css::uno::Sequence const &) + cppu::constructor_InitializationFunc &) { return static_cast(new ORegistryServiceManager(context)); } @@ -1690,7 +1690,7 @@ com_sun_star_comp_stoc_ORegistryServiceManager_get_implementation( extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_stoc_OServiceManagerWrapper_get_implementation( css::uno::XComponentContext *context, - css::uno::Sequence const &) + cppu::constructor_InitializationFunc &) { return static_cast(new OServiceManagerWrapper(context)); } diff --git a/stoc/source/simpleregistry/simpleregistry.cxx b/stoc/source/simpleregistry/simpleregistry.cxx index bddc67be127d..4927efe24ffa 100644 --- a/stoc/source/simpleregistry/simpleregistry.cxx +++ b/stoc/source/simpleregistry/simpleregistry.cxx @@ -1126,7 +1126,7 @@ void SimpleRegistry::mergeKey( extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL com_sun_star_comp_stoc_SimpleRegistry_get_implementation( SAL_UNUSED_PARAMETER css::uno::XComponentContext *, - css::uno::Sequence const &) + cppu::constructor_InitializationFunc &) { return static_cast(new SimpleRegistry); } -- cgit