diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-14 12:04:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-14 20:25:34 +0200 |
commit | 8e6c5635bed20790dcf10da99766c92d4589845e (patch) | |
tree | a9732b9b5dc60ca0b6ec5769052babfbcfc5b324 /scripting/source/provider/MasterScriptProviderFactory.cxx | |
parent | b4f1f2dc427cad5829911de01e00a4c7d4e7dd50 (diff) |
scripting/provider: create instances with uno constructors
See tdf#74608 for motivation.
Change-Id: If5337702e4bdc583bbae34e90a89c20b7341937e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98738
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting/source/provider/MasterScriptProviderFactory.cxx')
-rw-r--r-- | scripting/source/provider/MasterScriptProviderFactory.cxx | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/scripting/source/provider/MasterScriptProviderFactory.cxx b/scripting/source/provider/MasterScriptProviderFactory.cxx index 66de3a5cbb79..cc29abd0a969 100644 --- a/scripting/source/provider/MasterScriptProviderFactory.cxx +++ b/scripting/source/provider/MasterScriptProviderFactory.cxx @@ -58,31 +58,14 @@ MasterScriptProviderFactory::getActiveMSPList() const return m_MSPList; } -Sequence< OUString > mspf_getSupportedServiceNames( ) -{ - return { "com.sun.star.script.provider.MasterScriptProviderFactory" }; -} - -OUString mspf_getImplementationName( ) -{ - return "com.sun.star.script.provider.MasterScriptProviderFactory"; -} - -Reference< XInterface > -mspf_create( Reference< XComponentContext > const & xComponentContext ) -{ - return static_cast< ::cppu::OWeakObject * >( - new MasterScriptProviderFactory( xComponentContext ) ); -} - OUString SAL_CALL MasterScriptProviderFactory::getImplementationName() { - return mspf_getImplementationName(); + return "com.sun.star.script.provider.MasterScriptProviderFactory"; } Sequence< OUString > SAL_CALL MasterScriptProviderFactory::getSupportedServiceNames() { - return mspf_getSupportedServiceNames(); + return { "com.sun.star.script.provider.MasterScriptProviderFactory" }; } sal_Bool MasterScriptProviderFactory::supportsService( @@ -93,4 +76,11 @@ sal_Bool MasterScriptProviderFactory::supportsService( } // namespace func_provider +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +scripting_MasterScriptProviderFactory_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&) +{ + return cppu::acquire(new func_provider::MasterScriptProviderFactory(context)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |