diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-06 16:31:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-07-08 08:36:23 +0200 |
commit | 2da149ff33b6ef345aef8619e06654e343c4e960 (patch) | |
tree | de9efd4fb27f05f46577428e8ae1b90df02c2ec4 /uui/source/passwordcontainer.cxx | |
parent | f1e2e69b9b31b42ed9b8a46778c05dc36ff8edcf (diff) |
uui: create instances with uno constructors
See tdf#74608 for motivation
Change-Id: I8b7eec5e2cbe61a8dc3bb65f391245c1825fedc2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98235
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uui/source/passwordcontainer.cxx')
-rw-r--r-- | uui/source/passwordcontainer.cxx | 49 |
1 files changed, 7 insertions, 42 deletions
diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx index a97725ef1ca3..2e2d0b0ac3cb 100644 --- a/uui/source/passwordcontainer.cxx +++ b/uui/source/passwordcontainer.cxx @@ -292,7 +292,7 @@ PasswordContainerInteractionHandler::~PasswordContainerInteractionHandler() OUString SAL_CALL PasswordContainerInteractionHandler::getImplementationName() { - return getImplementationName_Static(); + return "com.sun.star.comp.uui.PasswordContainerInteractionHandler"; } @@ -309,24 +309,7 @@ PasswordContainerInteractionHandler::supportsService( uno::Sequence< OUString > SAL_CALL PasswordContainerInteractionHandler::getSupportedServiceNames() { - return getSupportedServiceNames_Static(); -} - - -// static -OUString -PasswordContainerInteractionHandler::getImplementationName_Static() -{ - return "com.sun.star.comp.uui.PasswordContainerInteractionHandler"; -} - - -// static -uno::Sequence< OUString > -PasswordContainerInteractionHandler::getSupportedServiceNames_Static() -{ - uno::Sequence< OUString > aSNS { "com.sun.star.task.PasswordContainerInteractionHandler" }; - return aSNS; + return { "com.sun.star.task.PasswordContainerInteractionHandler" }; } @@ -395,31 +378,13 @@ PasswordContainerInteractionHandler::handleInteractionRequest( } -// Service factory implementation. - -/// @throws uno::Exception -static uno::Reference< uno::XInterface > -PasswordContainerInteractionHandler_CreateInstance( - const uno::Reference< lang::XMultiServiceFactory> & rSMgr ) -{ - lang::XServiceInfo* pX - = new PasswordContainerInteractionHandler(comphelper::getComponentContext(rSMgr)); - return uno::Reference< uno::XInterface >::query( pX ); -} - +} // namespace uui -// static -uno::Reference< lang::XSingleServiceFactory > -PasswordContainerInteractionHandler::createServiceFactory( - const uno::Reference< lang::XMultiServiceFactory >& rxServiceMgr ) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* +com_sun_star_comp_uui_PasswordContainerInteractionHandler_get_implementation( + css::uno::XComponentContext* context, css::uno::Sequence<css::uno::Any> const&) { - return cppu::createOneInstanceFactory( - rxServiceMgr, - PasswordContainerInteractionHandler::getImplementationName_Static(), - PasswordContainerInteractionHandler_CreateInstance, - PasswordContainerInteractionHandler::getSupportedServiceNames_Static() ); + return cppu::acquire(new uui::PasswordContainerInteractionHandler(context)); } -} // namespace uui - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |