diff options
Diffstat (limited to 'uui/source')
-rw-r--r-- | uui/source/iahndl-authentication.cxx | 4 | ||||
-rw-r--r-- | uui/source/passwordcontainer.cxx | 20 | ||||
-rw-r--r-- | uui/source/passwordcontainer.hxx | 6 |
3 files changed, 15 insertions, 15 deletions
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index 0a03af980cb5..6e03e22f1b04 100644 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "comphelper/componentcontext.hxx" + #include "com/sun/star/task/DocumentPasswordRequest.hpp" #include "com/sun/star/task/DocumentPasswordRequest2.hpp" #include "com/sun/star/task/DocumentMSPasswordRequest.hpp" @@ -204,7 +206,7 @@ handleAuthenticationRequest_( ////////////////////////// // First, try to obtain credentials from password container service. - uui::PasswordContainerHelper aPwContainerHelper(xServiceFactory); + uui::PasswordContainerHelper aPwContainerHelper(comphelper::ComponentContext(xServiceFactory).getUNOContext()); if (aPwContainerHelper.handleAuthenticationRequest(rRequest, xSupplyAuthentication, rURL, diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx index eec9c1045d68..bf54620cf342 100644 --- a/uui/source/passwordcontainer.cxx +++ b/uui/source/passwordcontainer.cxx @@ -17,9 +17,11 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "comphelper/componentcontext.hxx" #include "cppuhelper/factory.hxx" #include "com/sun/star/lang/XMultiServiceFactory.hpp" +#include "com/sun/star/task/PasswordContainer.hpp" #include "com/sun/star/task/NoMasterException.hpp" #include "com/sun/star/task/XInteractionHandler.hpp" #include "com/sun/star/task/XMasterPasswordHandling.hpp" @@ -111,19 +113,15 @@ namespace uui { //========================================================================= PasswordContainerHelper::PasswordContainerHelper( - uno::Reference< lang::XMultiServiceFactory > const & xServiceFactory ) + uno::Reference< uno::XComponentContext > const & xContext ) { - OSL_ENSURE(xServiceFactory.is(), "no service factory given!"); - if (xServiceFactory.is()) + OSL_ENSURE(xContext.is(), "no service factory given!"); + if (xContext.is()) try { m_xPasswordContainer = uno::Reference< task::XPasswordContainer >( - xServiceFactory-> - createInstance( - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.task.PasswordContainer"))), + task::PasswordContainer::create(xContext), uno::UNO_QUERY); } catch (uno::Exception const &) @@ -308,8 +306,8 @@ bool PasswordContainerHelper::addRecord( //========================================================================= PasswordContainerInteractionHandler::PasswordContainerInteractionHandler( - const uno::Reference< lang::XMultiServiceFactory >& xSMgr ) -: m_aPwContainerHelper( xSMgr ) + const uno::Reference< uno::XComponentContext >& xContext ) +: m_aPwContainerHelper( xContext ) { } @@ -452,7 +450,7 @@ PasswordContainerInteractionHandler_CreateInstance( throw( uno::Exception ) { lang::XServiceInfo * pX = static_cast< lang::XServiceInfo * >( - new PasswordContainerInteractionHandler( rSMgr ) ); + new PasswordContainerInteractionHandler( comphelper::ComponentContext(rSMgr).getUNOContext() ) ); return uno::Reference< uno::XInterface >::query( pX ); } diff --git a/uui/source/passwordcontainer.hxx b/uui/source/passwordcontainer.hxx index 61ee44bd5818..a755fc5115ec 100644 --- a/uui/source/passwordcontainer.hxx +++ b/uui/source/passwordcontainer.hxx @@ -49,8 +49,8 @@ class PasswordContainerHelper public: PasswordContainerHelper( com::sun::star::uno::Reference< - com::sun::star::lang::XMultiServiceFactory > const & - xServiceFactory ); + com::sun::star::uno::XComponentContext > const & + xContext ); // ------------------------------------------------------------------------ @@ -145,7 +145,7 @@ class PasswordContainerInteractionHandler : public: PasswordContainerInteractionHandler( const com::sun::star::uno::Reference< - com::sun::star::lang::XMultiServiceFactory >& rXSMgr ); + com::sun::star::uno::XComponentContext >& xContext ); virtual ~PasswordContainerInteractionHandler(); // XServiceInfo |