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/BrowseNodeFactoryImpl.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/BrowseNodeFactoryImpl.cxx')
-rw-r--r-- | scripting/source/provider/BrowseNodeFactoryImpl.cxx | 38 |
1 files changed, 9 insertions, 29 deletions
diff --git a/scripting/source/provider/BrowseNodeFactoryImpl.cxx b/scripting/source/provider/BrowseNodeFactoryImpl.cxx index 20574bf70c6f..26fc13331ec5 100644 --- a/scripting/source/provider/BrowseNodeFactoryImpl.cxx +++ b/scripting/source/provider/BrowseNodeFactoryImpl.cxx @@ -612,46 +612,19 @@ BrowseNodeFactoryImpl::getOrganizerHierarchy() const return xRet; } -// Helper methods - - -// Namespace global methods for setting up BrowseNodeFactory service - - -Sequence< OUString > -bnf_getSupportedServiceNames( ) -{ - return { "com.sun.star.script.browse.BrowseNodeFactory" }; -} - -OUString -bnf_getImplementationName( ) -{ - return - "com.sun.star.script.browse.BrowseNodeFactory"; -} - -Reference< XInterface > -bnf_create( Reference< XComponentContext > const & xComponentContext ) -{ - return static_cast< ::cppu::OWeakObject * >( - new BrowseNodeFactoryImpl( xComponentContext ) ); -} - - // Implementation of XServiceInfo OUString SAL_CALL BrowseNodeFactoryImpl::getImplementationName() { - return bnf_getImplementationName(); + return "com.sun.star.script.browse.BrowseNodeFactory"; } Sequence< OUString > SAL_CALL BrowseNodeFactoryImpl::getSupportedServiceNames() { - return bnf_getSupportedServiceNames(); + return { "com.sun.star.script.browse.BrowseNodeFactory" }; } sal_Bool BrowseNodeFactoryImpl::supportsService(OUString const & serviceName ) @@ -659,6 +632,13 @@ sal_Bool BrowseNodeFactoryImpl::supportsService(OUString const & serviceName ) return cppu::supportsService(this, serviceName); } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +scripting_BrowseNodeFactoryImpl_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&) +{ + return cppu::acquire(new BrowseNodeFactoryImpl(context)); +} + } // namespace browsenodefactory /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |