diff options
author | Joachim Lingner <jl@openoffice.org> | 2010-06-07 10:13:44 +0200 |
---|---|---|
committer | Joachim Lingner <jl@openoffice.org> | 2010-06-07 10:13:44 +0200 |
commit | 37a8224e7a1eb9084623f023a0830c9818e3d311 (patch) | |
tree | 2a727f2aef718d2d06ae20f7f228065da422f8a5 /ucb | |
parent | d0202ebd4e1be56cf1230a93a6d11cfc57050a5e (diff) | |
parent | 44ada130c3857b167e954b63c7a5490268b72c5b (diff) |
jl152 merge with DEV300_m80
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/core/ucb.cxx | 414 | ||||
-rw-r--r-- | ucb/source/core/ucb.hxx | 39 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVAuthListener.hxx | 5 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx | 17 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVResourceAccess.cxx | 6 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/NeonSession.cxx | 23 |
6 files changed, 462 insertions, 42 deletions
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx index 171a989f8b..e44956b2a0 100644 --- a/ucb/source/core/ucb.cxx +++ b/ucb/source/core/ucb.cxx @@ -40,7 +40,11 @@ #include <com/sun/star/ucb/XCommandInfo.hpp> #include <com/sun/star/ucb/XContentProvider.hpp> #include <com/sun/star/ucb/XContentProviderSupplier.hpp> -#include <ucbhelper/configureucb.hxx> +#include <com/sun/star/ucb/XParameterizedContentProvider.hpp> +#include <com/sun/star/ucb/XContentProviderFactory.hpp> +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/container/XNameAccess.hpp> +#include <com/sun/star/uno/Any.hxx> #include <ucbhelper/cancelcommandexecution.hxx> #include "identify.hxx" #include "ucbcmds.hxx" @@ -59,6 +63,126 @@ using namespace com::sun::star::uno; using namespace com::sun::star::lang; using namespace com::sun::star::ucb; using namespace ucb_impl; +using namespace com::sun::star; +using namespace ucbhelper; + + +#define CONFIG_CONTENTPROVIDERS_KEY \ + "/org.openoffice.ucb.Configuration/ContentProviders" + + +namespace { + +bool fillPlaceholders(rtl::OUString const & rInput, + uno::Sequence< uno::Any > const & rReplacements, + rtl::OUString * pOutput) +{ + sal_Unicode const * p = rInput.getStr(); + sal_Unicode const * pEnd = p + rInput.getLength(); + sal_Unicode const * pCopy = p; + rtl::OUStringBuffer aBuffer; + while (p != pEnd) + switch (*p++) + { + case '&': + if (pEnd - p >= 4 + && p[0] == 'a' && p[1] == 'm' && p[2] == 'p' + && p[3] == ';') + { + aBuffer.append(pCopy, p - 1 - pCopy); + aBuffer.append(sal_Unicode('&')); + p += 4; + pCopy = p; + } + else if (pEnd - p >= 3 + && p[0] == 'l' && p[1] == 't' && p[2] == ';') + { + aBuffer.append(pCopy, p - 1 - pCopy); + aBuffer.append(sal_Unicode('<')); + p += 3; + pCopy = p; + } + else if (pEnd - p >= 3 + && p[0] == 'g' && p[1] == 't' && p[2] == ';') + { + aBuffer.append(pCopy, p - 1 - pCopy); + aBuffer.append(sal_Unicode('>')); + p += 3; + pCopy = p; + } + break; + + case '<': + sal_Unicode const * q = p; + while (q != pEnd && *q != '>') + ++q; + if (q == pEnd) + break; + rtl::OUString aKey(p, q - p); + rtl::OUString aValue; + bool bFound = false; + for (sal_Int32 i = 2; i + 1 < rReplacements.getLength(); + i += 2) + { + rtl::OUString aReplaceKey; + if ((rReplacements[i] >>= aReplaceKey) + && aReplaceKey == aKey + && (rReplacements[i + 1] >>= aValue)) + { + bFound = true; + break; + } + } + if (!bFound) + return false; + aBuffer.append(pCopy, p - 1 - pCopy); + aBuffer.append(aValue); + p = q + 1; + pCopy = p; + break; + } + aBuffer.append(pCopy, pEnd - pCopy); + *pOutput = aBuffer.makeStringAndClear(); + return true; +} + +void makeAndAppendXMLName( + rtl::OUStringBuffer & rBuffer, const rtl::OUString & rIn ) +{ + sal_Int32 nCount = rIn.getLength(); + for ( sal_Int32 n = 0; n < nCount; ++n ) + { + const sal_Unicode c = rIn.getStr()[ n ]; + switch ( c ) + { + case '&': + rBuffer.appendAscii( "&" ); + break; + + case '"': + rBuffer.appendAscii( """ ); + break; + + case '\'': + rBuffer.appendAscii( "'" ); + break; + + case '<': + rBuffer.appendAscii( "<" ); + break; + + case '>': + rBuffer.appendAscii( ">" ); + break; + + default: + rBuffer.append( c ); + break; + } + } +} + +} //========================================================================= // @@ -132,6 +256,9 @@ void SAL_CALL UniversalContentBroker::dispose() aEvt.Source = SAL_STATIC_CAST( XComponent*, this ); m_pDisposeEventListeners->disposeAndClear( aEvt ); } + + if ( m_xNotifier.is() ) + m_xNotifier->removeChangesListener( this ); } //========================================================================= @@ -193,9 +320,11 @@ void SAL_CALL UniversalContentBroker::initialize( //@@@ At the moment, there's a problem when one (non-one-instance) factory // 'wraps' another (one-instance) factory, causing this method to be // called several times: + m_aArguments = aArguments; + oslInterlockedCount nCount = osl_incrementInterlockedCount(&m_nInitCount); if (nCount == 1) - ::ucbhelper::configureUcb(this, m_xSMgr, aArguments, 0); + configureUcb(); else osl_decrementInterlockedCount(&m_nInitCount); // make the possibility of overflow less likely... @@ -508,6 +637,80 @@ void SAL_CALL UniversalContentBroker::abort( sal_Int32 ) //========================================================================= // +// XChangesListener methods +// +//========================================================================= +// virtual +void SAL_CALL UniversalContentBroker::changesOccurred( const util::ChangesEvent& Event ) + throw( uno::RuntimeException ) +{ + sal_Int32 nCount = Event.Changes.getLength(); + if ( nCount ) + { + + uno::Reference< lang::XMultiServiceFactory > xConfigProv( + m_xSMgr->createInstance( + rtl::OUString::createFromAscii( + "com.sun.star.configuration.ConfigurationProvider" ) ), + uno::UNO_QUERY_THROW ); + + uno::Sequence< uno::Any > aArguments( 1 ); + beans::PropertyValue aProperty; + aProperty.Name + = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); + aProperty.Value <<= Event.Base; + aArguments[ 0 ] <<= aProperty; + + uno::Reference< uno::XInterface > xInterface( + xConfigProv->createInstanceWithArguments( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationAccess" ) ), + aArguments ) ); + + uno::Reference< container::XHierarchicalNameAccess > + xHierNameAccess( xInterface, uno::UNO_QUERY_THROW ); + + const util::ElementChange* pElementChanges + = Event.Changes.getConstArray(); + + ContentProviderDataList aData; + for ( sal_Int32 n = 0; n < nCount; ++n ) + { + const util::ElementChange& rElem = pElementChanges[ n ]; + rtl::OUString aKey; + rElem.Accessor >>= aKey; + + ContentProviderData aInfo; + + createContentProviderData(aKey, xHierNameAccess, aInfo); + + aData.push_back(aInfo); + } + + prepareAndRegister(aData); + } +} + +//========================================================================= +// +// XEventListener methods +// +//========================================================================= +// virtual +void SAL_CALL UniversalContentBroker::disposing(const lang::EventObject&) + throw( uno::RuntimeException ) +{ + if ( m_xNotifier.is() ) + { + osl::Guard< osl::Mutex > aGuard( m_aMutex ); + + if ( m_xNotifier.is() ) + m_xNotifier.clear(); + } +} + +//========================================================================= +// // Non-interface methods // //========================================================================= @@ -524,6 +727,212 @@ Reference< XContentProvider > UniversalContentBroker::queryContentProvider( : Reference< XContentProvider >(); } +bool UniversalContentBroker::configureUcb() + throw (uno::RuntimeException) +{ + rtl::OUString aKey1; + rtl::OUString aKey2; + if (m_aArguments.getLength() < 2 + || !(m_aArguments[0] >>= aKey1) || !(m_aArguments[1] >>= aKey2)) + { + OSL_ENSURE(false, "UniversalContentBroker::configureUcb(): Bad arguments"); + return false; + } + + ContentProviderDataList aData; + if (!getContentProviderData(aKey1, aKey2, aData)) + { + OSL_ENSURE(false, "UniversalContentBroker::configureUcb(): No configuration"); + return false; + } + + prepareAndRegister(aData); + + return true; +} + +void UniversalContentBroker::prepareAndRegister( + const ContentProviderDataList& rData) +{ + ContentProviderDataList::const_iterator aEnd(rData.end()); + for (ContentProviderDataList::const_iterator aIt(rData.begin()); + aIt != aEnd; ++aIt) + { + rtl::OUString aProviderArguments; + if (fillPlaceholders(aIt->Arguments, + m_aArguments, + &aProviderArguments)) + { + registerAtUcb(this, + m_xSMgr, + aIt->ServiceName, + aProviderArguments, + aIt->URLTemplate, + 0); + + } + else + OSL_ENSURE(false, + "UniversalContentBroker::prepareAndRegister(): Bad argument placeholders"); + } +} + +//========================================================================= +bool UniversalContentBroker::getContentProviderData( + const rtl::OUString & rKey1, + const rtl::OUString & rKey2, + ContentProviderDataList & rListToFill ) +{ + if ( !m_xSMgr.is() || !rKey1.getLength() || !rKey2.getLength() ) + { + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - Invalid argument!" ); + return false; + } + + try + { + uno::Reference< lang::XMultiServiceFactory > xConfigProv( + m_xSMgr->createInstance( + rtl::OUString::createFromAscii( + "com.sun.star.configuration.ConfigurationProvider" ) ), + uno::UNO_QUERY_THROW ); + + rtl::OUStringBuffer aFullPath; + aFullPath.appendAscii( CONFIG_CONTENTPROVIDERS_KEY "/['" ); + makeAndAppendXMLName( aFullPath, rKey1 ); + aFullPath.appendAscii( "']/SecondaryKeys/['" ); + makeAndAppendXMLName( aFullPath, rKey2 ); + aFullPath.appendAscii( "']/ProviderData" ); + + uno::Sequence< uno::Any > aArguments( 1 ); + beans::PropertyValue aProperty; + aProperty.Name + = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "nodepath" ) ); + aProperty.Value <<= aFullPath.makeStringAndClear(); + aArguments[ 0 ] <<= aProperty; + + uno::Reference< uno::XInterface > xInterface( + xConfigProv->createInstanceWithArguments( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.configuration.ConfigurationAccess" ) ), + aArguments ) ); + + if ( !m_xNotifier.is() ) + { + m_xNotifier = uno::Reference< util::XChangesNotifier >( + xInterface, uno::UNO_QUERY_THROW ); + + m_xNotifier->addChangesListener( this ); + } + + uno::Reference< container::XNameAccess > xNameAccess( + xInterface, uno::UNO_QUERY_THROW ); + + uno::Sequence< rtl::OUString > aElems = xNameAccess->getElementNames(); + const rtl::OUString* pElems = aElems.getConstArray(); + sal_Int32 nCount = aElems.getLength(); + + if ( nCount > 0 ) + { + uno::Reference< container::XHierarchicalNameAccess > + xHierNameAccess( xInterface, uno::UNO_QUERY_THROW ); + + // Iterate over children. + for ( sal_Int32 n = 0; n < nCount; ++n ) + { + + try + { + + ContentProviderData aInfo; + + rtl::OUStringBuffer aElemBuffer; + aElemBuffer.appendAscii( "['" ); + makeAndAppendXMLName( aElemBuffer, pElems[ n ] ); + aElemBuffer.appendAscii( "']" ); + + createContentProviderData(aElemBuffer.makeStringAndClear(), xHierNameAccess, aInfo); + + rListToFill.push_back( aInfo ); + } + catch ( container::NoSuchElementException& ) + { + // getByHierarchicalName + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - " + "caught NoSuchElementException!" ); + } + } + } + } + catch ( uno::RuntimeException& ) + { + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - caught RuntimeException!" ); + return false; + } + catch ( uno::Exception& ) + { + // createInstance, createInstanceWithArguments + + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - caught Exception!" ); + return false; + } + + return true; +} + +void UniversalContentBroker::createContentProviderData( + const rtl::OUString & rProvider, + const uno::Reference< container::XHierarchicalNameAccess >& rxHierNameAccess, + ContentProviderData & rInfo) +{ + // Obtain service name. + rtl::OUStringBuffer aKeyBuffer (rProvider); + aKeyBuffer.appendAscii( "/ServiceName" ); + + rtl::OUString aValue; + if ( !( rxHierNameAccess->getByHierarchicalName( + aKeyBuffer.makeStringAndClear() ) >>= aValue ) ) + { + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - " + "Error getting item value!" ); + } + + rInfo.ServiceName = aValue; + + // Obtain URL Template. + aKeyBuffer.append(rProvider); + aKeyBuffer.appendAscii( "/URLTemplate" ); + + if ( !( rxHierNameAccess->getByHierarchicalName( + aKeyBuffer.makeStringAndClear() ) >>= aValue ) ) + { + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - " + "Error getting item value!" ); + } + + rInfo.URLTemplate = aValue; + + // Obtain Arguments. + aKeyBuffer.append(rProvider); + aKeyBuffer.appendAscii( "/Arguments" ); + + if ( !( rxHierNameAccess->getByHierarchicalName( + aKeyBuffer.makeStringAndClear() ) >>= aValue ) ) + { + OSL_ENSURE( false, + "UniversalContentBroker::getContentProviderData - " + "Error getting item value!" ); + } + + rInfo.Arguments = aValue; +} + //========================================================================= // // ProviderListEntry_Impl implementation. @@ -545,4 +954,3 @@ Reference< XContentProvider > ProviderListEntry_Impl::resolveProvider() const return m_xResolvedProvider; } - diff --git a/ucb/source/core/ucb.hxx b/ucb/source/core/ucb.hxx index 0b52812d19..db54af4688 100644 --- a/ucb/source/core/ucb.hxx +++ b/ucb/source/core/ucb.hxx @@ -37,13 +37,20 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XTypeProvider.hpp> +#include <com/sun/star/util/XChangesListener.hpp> +#include <com/sun/star/util/XChangesNotifier.hpp> +#include <com/sun/star/container/XContainer.hpp> +#include <com/sun/star/container/XHierarchicalNameAccess.hpp> + #include <rtl/ustrbuf.hxx> #include <cppuhelper/weak.hxx> #include <osl/mutex.hxx> #include <osl/interlck.h> #include <ucbhelper/macros.hxx> #include "providermap.hxx" +#include <ucbhelper/registerucb.hxx> +#include <vector> //========================================================================= #define UCB_SERVICE_NAME "com.sun.star.ucb.UniversalContentBroker" @@ -66,7 +73,8 @@ class UniversalContentBroker : public com::sun::star::ucb::XContentProviderManager, public com::sun::star::ucb::XContentProvider, public com::sun::star::ucb::XContentIdentifierFactory, - public com::sun::star::ucb::XCommandProcessor + public com::sun::star::ucb::XCommandProcessor, + public com::sun::star::util::XChangesListener { public: UniversalContentBroker( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rXSMgr ); @@ -162,6 +170,14 @@ public: abort( sal_Int32 CommandId ) throw( com::sun::star::uno::RuntimeException ); + // XChangesListener + virtual void SAL_CALL changesOccurred( const com::sun::star::util::ChangesEvent& Event ) + throw( com::sun::star::uno::RuntimeException ); + + // XEventListener ( base of XChangesLisetenr ) + virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) + throw( com::sun::star::uno::RuntimeException ); + private: com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider > queryContentProvider( const rtl::OUString& Identifier, @@ -177,8 +193,29 @@ private: com::sun::star::ucb::XCommandEnvironment >& xEnv ) throw( com::sun::star::uno::Exception ); + + bool configureUcb() + throw ( com::sun::star::uno::RuntimeException); + + bool getContentProviderData( + const rtl::OUString & rKey1, + const rtl::OUString & rKey2, + ucbhelper::ContentProviderDataList & rListToFill); + + void prepareAndRegister( const ucbhelper::ContentProviderDataList& rData); + + void createContentProviderData( + const rtl::OUString& rProvider, + const com::sun::star::uno::Reference< com::sun::star::container::XHierarchicalNameAccess >& rxHierNameAccess, + ucbhelper::ContentProviderData& rInfo); + com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr; + + com::sun::star::uno::Reference< + com::sun::star::util::XChangesNotifier > m_xNotifier; + + com::sun::star::uno::Sequence< com::sun::star::uno::Any > m_aArguments; ProviderMap_Impl m_aProviders; osl::Mutex m_aMutex; cppu::OInterfaceContainerHelper* m_pDisposeEventListeners; diff --git a/ucb/source/ucp/webdav/DAVAuthListener.hxx b/ucb/source/ucp/webdav/DAVAuthListener.hxx index fb5f0d0449..71bed1c0a1 100644 --- a/ucb/source/ucp/webdav/DAVAuthListener.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListener.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -30,9 +30,7 @@ #include <salhelper/simplereferenceobject.hxx> #include <rtl/ustring.hxx> -#ifndef _COM_SUN_STAR_UCB_XREFERENCE_HPP_ #include <com/sun/star/uno/XReference.hpp> -#endif #include <com/sun/star/ucb/XCommandEnvironment.hpp> namespace webdav_ucp @@ -46,7 +44,6 @@ class DAVAuthListener : public salhelper::SimpleReferenceObject const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ) = 0; }; diff --git a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx index 3ee5bf152c..c0c9968613 100644 --- a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -33,7 +33,7 @@ namespace webdav_ucp { - + //========================================================================= //========================================================================= @@ -43,28 +43,27 @@ namespace webdav_ucp // //========================================================================= //========================================================================= - - + + class DAVAuthListener_Impl : public DAVAuthListener { public: - + DAVAuthListener_Impl( const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment>& xEnv, const ::rtl::OUString & inURL ) - : m_xEnv( xEnv ), m_aURL( inURL ) + : m_xEnv( xEnv ), m_aURL( inURL ) { } - + virtual int authenticate( const ::rtl::OUString & inRealm, const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ); private: - + const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xEnv; const rtl::OUString m_aURL; diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index 71d4eabdbf..872d454057 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -57,7 +57,6 @@ int DAVAuthListener_Impl::authenticate( const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, ::rtl::OUString & outPassWord, - sal_Bool bAllowPersistentStoring, sal_Bool bCanUseSystemCredentials ) { if ( m_xEnv.is() ) @@ -79,7 +78,8 @@ int DAVAuthListener_Impl::authenticate( = new ucbhelper::SimpleAuthenticationRequest( m_aURL, inHostName, inRealm, inoutUserName, outPassWord, ::rtl::OUString(), - bAllowPersistentStoring, bCanUseSystemCredentials ); + true /*bAllowPersistentStoring*/, + bCanUseSystemCredentials ); xIH->handle( xRequest.get() ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 6ab782b322..254fae5469 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -60,7 +60,6 @@ #include <com/sun/star/security/CertificateContainerStatus.hpp> #include <com/sun/star/security/CertificateContainer.hpp> #include <com/sun/star/security/XCertificateContainer.hpp> -#include <com/sun/star/task/XMasterPasswordHandling.hpp> #include <com/sun/star/ucb/Lock.hpp> #include <com/sun/star/xml/crypto/XSEInitializer.hpp> @@ -330,31 +329,11 @@ extern "C" int NeonSession_NeonAuth( void * inUserData, ( ne_strcasecmp( inAuthProtocol, "Negotiate" ) == 0 ) ); #endif - // #i97003# (tkr): Ask XMasterPasswordHandling if we should store the - // credentials persistently and give this information to the auth listener - uno::Reference< task::XMasterPasswordHandling > xMasterPasswordHandling; - try - { - xMasterPasswordHandling = - uno::Reference< task::XMasterPasswordHandling >( - theSession->getMSF()->createInstance( - rtl::OUString::createFromAscii( - "com.sun.star.task.PasswordContainer" ) ), - uno::UNO_QUERY ); - } - catch ( uno::Exception const & ) - { - } - int theRetVal = pListener->authenticate( rtl::OUString::createFromAscii( inRealm ), theSession->getHostName(), theUserName, thePassWord, - xMasterPasswordHandling.is() - ? xMasterPasswordHandling-> - isPersistentStoringAllowed() - : sal_False, bCanUseSystemCreds); rtl::OString aUser( |