diff options
author | Noel Grandin <noel@peralex.com> | 2012-09-05 09:47:35 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-11 18:51:54 +0200 |
commit | 77897f5994bd18c3b771e51abce5ee6be01322fc (patch) | |
tree | 83e748eae69283ba5fde7ccc6bab32f23c34ad77 /cui/source/options/optinet2.cxx | |
parent | a9b9ffacac74310c38f152cb9bcc56fe06b0e1d6 (diff) |
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
Diffstat (limited to 'cui/source/options/optinet2.cxx')
-rw-r--r-- | cui/source/options/optinet2.cxx | 16 |
1 files changed, 6 insertions, 10 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() ) |