ucb/source/ucp/webdav/webdavcontent.cxx | 16 ++++++++++------ ucb/source/ucp/webdav/webdavcontent.hxx | 3 ++- 2 files changed, 12 insertions(+), 7 deletions(-)
New commits: commit d2001cad7f117de66837a884ec5185cb473216e3 Author: Matúš Kukan <[email protected]> Date: Mon Jun 23 10:39:49 2014 +0200 webdav: Do not throw when saving new document. Propagate information about !shouldAccessNetworkAfterException from getResourceType out to getPropertyValues, to avoid further calls which would result in cancelCommandExecution, when trying get properties of document which does not exist yet, but we want to create it. This was done in webdav-neon for other reasons as part of 0c3500115c4fd86284a027fc32be704afcf77061. Change-Id: Ia434a707d2946a6982075f9bf53904b78dc07a5e (cherry picked from commit 96e23564e95d2ecc5483e55b022c8a4db04d116b) Reviewed-on: https://gerrit.libreoffice.org/9888 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Michael Stahl <[email protected]> diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 3d720b7..8cc72bb 100644 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -1375,14 +1375,12 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( if ( !m_bTransient && !bHasAll ) { - // Obtain values from server... // First, identify whether resource is DAV or not - const ResourceType & rType = getResourceType( xEnv, xResAccess ); - bool bNetworkAccessAllowed = true; + const ResourceType & rType = getResourceType( xEnv, xResAccess, &bNetworkAccessAllowed ); if ( DAV == rType ) { @@ -3327,15 +3325,15 @@ Content::getBaseURI( const boost::scoped_ptr< DAVResourceAccess > & rResAccess ) const Content::ResourceType & Content::getResourceType( const uno::Reference< ucb::XCommandEnvironment >& xEnv, - const boost::scoped_ptr< DAVResourceAccess > & rResAccess ) + const boost::scoped_ptr< DAVResourceAccess > & rResAccess, + bool * networkAccessAllowed ) throw ( uno::Exception ) { if ( m_eResourceType == UNKNOWN ) { osl::Guard< osl::Mutex > aGuard( m_aMutex ); - ResourceType eResourceType; - eResourceType = m_eResourceType; + ResourceType eResourceType = UNKNOWN; try { @@ -3378,6 +3376,12 @@ const Content::ResourceType & Content::getResourceType( // resource is NON_DAV eResourceType = NON_DAV; } + else if (networkAccessAllowed != 0) + { + *networkAccessAllowed = *networkAccessAllowed + && shouldAccessNetworkAfterException(e); + } + // cancel command execution is case that no user authentication data has been provided. if ( e.getError() == DAVException::DAV_HTTP_NOAUTH ) { diff --git a/ucb/source/ucp/webdav/webdavcontent.hxx b/ucb/source/ucp/webdav/webdavcontent.hxx index daa948c..f6e0639 100644 --- a/ucb/source/ucp/webdav/webdavcontent.hxx +++ b/ucb/source/ucp/webdav/webdavcontent.hxx @@ -133,7 +133,8 @@ private: const ResourceType & getResourceType( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xEnv, - const boost::scoped_ptr< DAVResourceAccess > & rResAccess ) + const boost::scoped_ptr< DAVResourceAccess > & rResAccess, + bool * networkAccessAllowed = 0 ) throw ( ::com::sun::star::uno::Exception ); // Command "open"
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
