diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-06-03 16:42:24 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-06-03 16:42:24 +0000 |
commit | d0d8f99a31800c45bbda6b14c28abeb93819f031 (patch) | |
tree | 72d5573b1bef3f0ecd277701b9f47d3bf95e22e0 /ucb | |
parent | a6aafcb54ea1cfd70d17a0c2bf1d92e46735d989 (diff) |
CWS-TOOLING: integrate CWS tkr20
2009-05-08 08:31:10 +0200 tkr r271700 : ##i97329# fixed merge conflict during rebase
2009-05-07 08:30:15 +0200 tkr r271622 : CWS-TOOLING: rebase CWS tkr20 to trunk@271427 (milestone: DEV300:m47)
2009-04-17 14:36:42 +0200 tkr r270947 : #i73893# implemented the XCommandProcessor:Abort method
2009-03-20 14:08:15 +0100 tkr r269806 : #i96392# use $(CPU) variable to determine if openssl should build with 64 bit
2009-03-19 16:15:26 +0100 tkr r269754 : #i96392# use $(CPU) variable to determine if openssl should build with 64 bit
2009-03-19 16:09:04 +0100 tkr r269753 : #i96392# use $(CPU) variable to determine if openssl should build with 64 bit
2009-03-19 15:57:05 +0100 tkr r269752 : #i97003# Ask password container if persistent storage should be used
2009-03-19 15:53:18 +0100 tkr r269751 : #i97003# ask if password container should use the persistent storage
2009-03-19 09:08:18 +0100 tkr r269726 : #i99774# ucb: patch to silence warnings in gcc 4.4
2009-03-19 09:05:38 +0100 tkr r269725 : #i99046# remove mime-type
2009-03-19 09:04:56 +0100 tkr r269724 : #i97329# fixed truncated text on buttons
2009-03-19 09:03:50 +0100 tkr r269723 : #i97542# Warning errors in uui / empty bodys in for loops
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/file/filrec.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVAuthListener.hxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVResourceAccess.cxx | 14 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVResourceAccess.hxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/DAVSession.hxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/NeonSession.cxx | 21 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/NeonSession.hxx | 3 | ||||
-rw-r--r-- | ucb/source/ucp/webdav/webdavcontent.cxx | 16 |
9 files changed, 61 insertions, 8 deletions
diff --git a/ucb/source/ucp/file/filrec.cxx b/ucb/source/ucp/file/filrec.cxx index 873c8b000ec1..58f12d3162b1 100644 --- a/ucb/source/ucp/file/filrec.cxx +++ b/ucb/source/ucp/file/filrec.cxx @@ -64,7 +64,7 @@ sal_Bool ReconnectingFile::reconnect() if ( nResult == ::osl::FileBase::E_None ) { if ( uFlags & OpenFlag_Create ) - m_nFlags = uFlags & ( ~OpenFlag_Create ) | OpenFlag_Write; + m_nFlags = (uFlags & ( ~OpenFlag_Create )) | OpenFlag_Write; else m_nFlags = uFlags; diff --git a/ucb/source/ucp/webdav/DAVAuthListener.hxx b/ucb/source/ucp/webdav/DAVAuthListener.hxx index 9718ef821cc4..4744b06f9649 100644 --- a/ucb/source/ucp/webdav/DAVAuthListener.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListener.hxx @@ -48,7 +48,8 @@ class DAVAuthListener : public salhelper::SimpleReferenceObject const ::rtl::OUString & inRealm, const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, - ::rtl::OUString & outPassWord ) = 0; + ::rtl::OUString & outPassWord, + const sal_Bool & bAllowPersistentStoring) = 0; }; } // namespace webdav_ucp diff --git a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx index df663ca1c74b..e697773eb198 100644 --- a/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx +++ b/ucb/source/ucp/webdav/DAVAuthListenerImpl.hxx @@ -63,7 +63,8 @@ namespace webdav_ucp virtual int authenticate( const ::rtl::OUString & inRealm, const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, - ::rtl::OUString & outPassWord ); + ::rtl::OUString & outPassWord, + const sal_Bool & bAllowPersistentStoring); private: com::sun::star::uno::Reference< diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.cxx b/ucb/source/ucp/webdav/DAVResourceAccess.cxx index fdd026f76963..0def59082476 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.cxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.cxx @@ -59,7 +59,8 @@ int DAVAuthListener_Impl::authenticate( const ::rtl::OUString & inRealm, const ::rtl::OUString & inHostName, ::rtl::OUString & inoutUserName, - ::rtl::OUString & outPassWord ) + ::rtl::OUString & outPassWord, + const sal_Bool & bAllowPersistentStoring) { if ( m_xEnv.is() ) { @@ -79,7 +80,9 @@ int DAVAuthListener_Impl::authenticate( = new ucbhelper::SimpleAuthenticationRequest( inHostName, inRealm, inoutUserName, - outPassWord ); + outPassWord, + ::rtl::OUString(), + bAllowPersistentStoring); xIH->handle( xRequest.get() ); rtl::Reference< ucbhelper::InteractionContinuation > xSelection @@ -531,6 +534,13 @@ void DAVResourceAccess::GET( } //========================================================================= +void DAVResourceAccess::ABORT() + throw( DAVException ) +{ + initialize(); + m_xSession->ABORT(); +} +//========================================================================= namespace { void resetInputStream( const uno::Reference< io::XInputStream > & rStream ) diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.hxx b/ucb/source/ucp/webdav/DAVResourceAccess.hxx index 267ce8f99d29..2ab863dc0b24 100644 --- a/ucb/source/ucp/webdav/DAVResourceAccess.hxx +++ b/ucb/source/ucp/webdav/DAVResourceAccess.hxx @@ -215,6 +215,10 @@ public: com::sun::star::ucb::XCommandEnvironment > & xEnv ) throw( DAVException ); + void + ABORT() + throw( DAVException ); + // helper static void getUserRequestHeaders( const com::sun::star::uno::Reference< diff --git a/ucb/source/ucp/webdav/DAVSession.hxx b/ucb/source/ucp/webdav/DAVSession.hxx index 68facf14cba2..b6de1c5b10ad 100644 --- a/ucb/source/ucp/webdav/DAVSession.hxx +++ b/ucb/source/ucp/webdav/DAVSession.hxx @@ -134,6 +134,9 @@ public: const DAVRequestEnvironment & rEnv ) throw( DAVException ) = 0; + virtual void ABORT() + throw( DAVException ) = 0; + virtual com::sun::star::uno::Reference< com::sun::star::io::XInputStream > POST( const rtl::OUString & inPath, const rtl::OUString & rContentType, diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 165824a44c93..4ceeef476d66 100644 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -60,6 +60,7 @@ #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> #ifndef _SIMPLECERTIFICATIONVALIDATIONREQUEST_HXX_ @@ -329,11 +330,19 @@ extern "C" int NeonSession_NeonAuth( void * inUserData, //thePassWord = rtl::OUString::createFromAscii( inoutPassWord ); } + //i97003 (tkr): Ask XMasterPasswordHandling if we should store the credentials persistently and give this information to the SimpleAuthenticationRequest + uno::Reference< ::com::sun::star::task::XMasterPasswordHandling > xMasterPasswordHandling = + uno::Reference< ::com::sun::star::task::XMasterPasswordHandling >( + theSession->getMSF().get()->createInstance( rtl::OUString::createFromAscii( "com.sun.star.task.PasswordContainer" )), uno::UNO_QUERY ); + // - + int theRetVal = pListener->authenticate( rtl::OUString::createFromAscii( inRealm ), theSession->getHostName(), theUserName, - thePassWord ); + thePassWord, + xMasterPasswordHandling.is() ? xMasterPasswordHandling->isPersistentStoringAllowed() : sal_False); + rtl::OString aUser( rtl::OUStringToOString( theUserName, RTL_TEXTENCODING_UTF8 ) ); if ( aUser.getLength() > ( NE_ABUFSIZ - 1 ) ) @@ -1250,6 +1259,16 @@ void NeonSession::POST( const rtl::OUString & inPath, } // ------------------------------------------------------------------- +// ABORT +// ------------------------------------------------------------------- +void NeonSession::ABORT() + throw ( DAVException ) +{ + if (NULL !=m_pHttpSession) + ne_close_connection(m_pHttpSession); +} + +// ------------------------------------------------------------------- // MKCOL // ------------------------------------------------------------------- void NeonSession::MKCOL( const rtl::OUString & inPath, diff --git a/ucb/source/ucp/webdav/NeonSession.hxx b/ucb/source/ucp/webdav/NeonSession.hxx index 98e9ea9fb17c..263169ae452a 100644 --- a/ucb/source/ucp/webdav/NeonSession.hxx +++ b/ucb/source/ucp/webdav/NeonSession.hxx @@ -209,6 +209,9 @@ class NeonSession : public DAVSession const DAVRequestEnvironment & rEnv ) throw ( DAVException ); + virtual void ABORT() + throw ( DAVException ); + // Note: Uncomment the following if locking support is required /* virtual void LOCK (const Lock & inLock, diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index dff18a5f1d73..afe2f2d3a7a8 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -862,8 +862,20 @@ uno::Any SAL_CALL Content::execute( void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ ) throw( uno::RuntimeException ) { - // @@@ Implement logic to abort running commands, if this makes - // sense for your conten.t + try + { + std::auto_ptr< DAVResourceAccess > xResAccess; + { + osl::MutexGuard aGuard( m_aMutex ); + xResAccess.reset( + new DAVResourceAccess( *m_xResAccess.get() ) ); + } + xResAccess->ABORT(); + } + catch ( DAVException const & /*e*/ ) + { + // ABORT command failed! + } } //========================================================================= |