summaryrefslogtreecommitdiff
path: root/cui/source/options/webconninfo.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-09-05 09:47:35 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-11 18:51:54 +0200
commit77897f5994bd18c3b771e51abce5ee6be01322fc (patch)
tree83e748eae69283ba5fde7ccc6bab32f23c34ad77 /cui/source/options/webconninfo.cxx
parenta9b9ffacac74310c38f152cb9bcc56fe06b0e1d6 (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/webconninfo.cxx')
-rw-r--r--cui/source/options/webconninfo.cxx16
1 files changed, 5 insertions, 11 deletions
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 );