diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/optinet2.cxx | 16 | ||||
-rw-r--r-- | cui/source/options/webconninfo.cxx | 16 |
2 files changed, 11 insertions, 21 deletions
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index 51ba59543806..7202ce06ad77 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -94,6 +94,7 @@ #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" #include "com/sun/star/task/XMasterPasswordHandling2.hpp" +#include "com/sun/star/task/PasswordContainer.hpp" #include "com/sun/star/task/XPasswordContainer.hpp" #include "securityoptions.hxx" #include "webconninfo.hxx" @@ -709,8 +710,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl) try { Reference< task::XMasterPasswordHandling > xMasterPasswd( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ), + task::PasswordContainer::create(comphelper::getProcessComponentContext()), UNO_QUERY_THROW ); if ( maSavePasswordsCB.IsChecked() ) @@ -766,8 +766,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, MasterPasswordHdl) try { Reference< task::XMasterPasswordHandling > xMasterPasswd( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ), + task::PasswordContainer::create(comphelper::getProcessComponentContext()), UNO_QUERY ); if ( xMasterPasswd.is() && xMasterPasswd->isPersistentStoringAllowed() ) @@ -784,8 +783,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, MasterPasswordCBHdl) try { Reference< task::XMasterPasswordHandling2 > xMasterPasswd( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ), + task::PasswordContainer::create(comphelper::getProcessComponentContext()), UNO_QUERY_THROW ); if ( maMasterPasswordCB.IsChecked() ) @@ -830,8 +828,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, ShowPasswordsHdl) try { Reference< task::XMasterPasswordHandling > xMasterPasswd( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ), + task::PasswordContainer::create(comphelper::getProcessComponentContext()), UNO_QUERY ); if ( xMasterPasswd.is() && xMasterPasswd->isPersistentStoringAllowed() && xMasterPasswd->authorizateWithMasterPassword( Reference< task::XInteractionHandler>() ) ) @@ -966,8 +963,7 @@ void SvxSecurityTabPage::InitControls() try { Reference< task::XMasterPasswordHandling > xMasterPasswd( - comphelper::getProcessServiceFactory()->createInstance( - rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.task.PasswordContainer" ) ) ), + task::PasswordContainer::create(comphelper::getProcessComponentContext()), UNO_QUERY_THROW ); if ( xMasterPasswd->isPersistentStoringAllowed() ) 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 <cuires.hrc> #include <sal/macros.h> #include <com/sun/star/task/UrlRecord.hpp> +#include <com/sun/star/task/PasswordContainer.hpp> #include <com/sun/star/task/XPasswordContainer.hpp> #include <com/sun/star/task/XMasterPasswordHandling.hpp> #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 ); |