From 77897f5994bd18c3b771e51abce5ee6be01322fc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 5 Sep 2012 09:47:35 +0200 Subject: fdo#46808, Adapt task::PasswordContainer UNO service to new style Create a merged XPasswordContainer2 interface for this service to implement. Which is backwards-compatible, but does not require creating a new service. Change-Id: I245b566b43e4646f10914b0aee13b2a0b0e296ae --- cui/source/options/webconninfo.cxx | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'cui/source/options/webconninfo.cxx') diff --git a/cui/source/options/webconninfo.cxx b/cui/source/options/webconninfo.cxx index 0f43f19cb069..198d1fc4d578 100644 --- a/cui/source/options/webconninfo.cxx +++ b/cui/source/options/webconninfo.cxx @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include "com/sun/star/task/XUrlContainer.hpp" @@ -183,8 +184,7 @@ void WebConnectionInfoDialog::FillPasswordList() try { uno::Reference< task::XMasterPasswordHandling > xMasterPasswd( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ), + task::PasswordContainer::create(comphelper::getProcessComponentContext()), uno::UNO_QUERY ); if ( xMasterPasswd.is() && xMasterPasswd->isPersistentStoringAllowed() ) @@ -244,9 +244,7 @@ IMPL_LINK_NOARG(WebConnectionInfoDialog, RemovePasswordHdl) ::rtl::OUString aUserName = m_aPasswordsLB.GetEntryText( pEntry, 1 ); uno::Reference< task::XPasswordContainer > xPasswdContainer( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.task.PasswordContainer" ) ) ), + task::PasswordContainer::create(comphelper::getProcessComponentContext()), uno::UNO_QUERY_THROW ); sal_Int32 nPos = (sal_Int32)(sal_IntPtr)pEntry->GetUserData(); @@ -275,9 +273,7 @@ IMPL_LINK_NOARG(WebConnectionInfoDialog, RemoveAllPasswordsHdl) try { uno::Reference< task::XPasswordContainer > xPasswdContainer( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.task.PasswordContainer" ) ) ), + task::PasswordContainer::create(comphelper::getProcessComponentContext()), uno::UNO_QUERY_THROW ); // should the master password be requested before? @@ -327,9 +323,7 @@ IMPL_LINK_NOARG(WebConnectionInfoDialog, ChangePasswordHdl) aPasswd[0] = aNewPass; uno::Reference< task::XPasswordContainer > xPasswdContainer( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.task.PasswordContainer" ) ) ), + task::PasswordContainer::create(comphelper::getProcessComponentContext()), uno::UNO_QUERY_THROW ); xPasswdContainer->addPersistent( aURL, aUserName, aPasswd, xInteractionHandler ); -- cgit