ucb/source/ucp/webdav-curl/webdavcontent.cxx | 102 +++++++++++++-------------- 1 file changed, 51 insertions(+), 51 deletions(-)
New commits: commit dac69982586001cb42af900382c544f052820913 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Fri Oct 8 19:02:08 2021 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon Nov 1 18:33:19 2021 +0100 ucb: webdav-curl: indent that temporarily Change-Id: I8cd3373b64c29d1f76c19a8f229cda0060cc79cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123286 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx index a90f1970f513..3ffde115c8ed 100644 --- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx +++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx @@ -3474,64 +3474,64 @@ Content::ResourceType Content::getResourceType( ResourceType eResourceType = UNKNOWN; - try { - // Try to fetch some frequently used property value, e.g. those - // used when loading documents... along with identifying whether - // this is a DAV resource. - std::vector< DAVResource > resources; - std::vector< OUString > aPropNames; - uno::Sequence< beans::Property > aProperties( 5 ); - aProperties[ 0 ].Name = "IsFolder"; - aProperties[ 1 ].Name = "IsDocument"; - aProperties[ 2 ].Name = "IsReadOnly"; - aProperties[ 3 ].Name = "MediaType"; - aProperties[ 4 ].Name = DAVProperties::SUPPORTEDLOCK; - - ContentProperties::UCBNamesToDAVNames( aProperties, aPropNames ); - - rResAccess->PROPFIND( DAVZERO, aPropNames, resources, xEnv ); - - // TODO - is this really only one? - if ( resources.size() == 1 ) + try { - osl::MutexGuard g(m_aMutex); - m_xCachedProps.reset( - new CachableContentProperties( ContentProperties( resources[ 0 ] ) ) ); - m_xCachedProps->containsAllNames( - aProperties, m_aFailedPropNames ); - } + // Try to fetch some frequently used property value, e.g. those + // used when loading documents... along with identifying whether + // this is a DAV resource. + std::vector< DAVResource > resources; + std::vector< OUString > aPropNames; + uno::Sequence< beans::Property > aProperties( 5 ); + aProperties[ 0 ].Name = "IsFolder"; + aProperties[ 1 ].Name = "IsDocument"; + aProperties[ 2 ].Name = "IsReadOnly"; + aProperties[ 3 ].Name = "MediaType"; + aProperties[ 4 ].Name = DAVProperties::SUPPORTEDLOCK; - eResourceType = DAV; - } - catch ( DAVException const & e ) - { - rResAccess->resetUri(); + ContentProperties::UCBNamesToDAVNames( aProperties, aPropNames ); - if ( e.getStatus() == SC_METHOD_NOT_ALLOWED ) - { - // Status SC_METHOD_NOT_ALLOWED is a safe indicator that the - // resource is NON_DAV - eResourceType = NON_DAV; - } - else if (networkAccessAllowed != nullptr) - { - *networkAccessAllowed = *networkAccessAllowed - && shouldAccessNetworkAfterException(e); + rResAccess->PROPFIND( DAVZERO, aPropNames, resources, xEnv ); + + if ( resources.size() == 1 ) + { + osl::MutexGuard g(m_aMutex); + m_xCachedProps.reset( + new CachableContentProperties( ContentProperties( resources[ 0 ] ) ) ); + m_xCachedProps->containsAllNames( + aProperties, m_aFailedPropNames ); + } + eResourceType = DAV; } - // if the two net events below happen, something - // is going on to the connection so break the command flow - if ( ( e.getError() == DAVException::DAV_HTTP_TIMEOUT ) || - ( e.getError() == DAVException::DAV_HTTP_CONNECT ) ) + catch ( DAVException const & e ) { - cancelCommandExecution( e, xEnv ); - // unreachable - } + rResAccess->resetUri(); - // cancel command execution is case that no user authentication data has been provided. - if ( e.getError() == DAVException::DAV_HTTP_NOAUTH ) - { - cancelCommandExecution( e, uno::Reference< ucb::XCommandEnvironment >() ); + if ( e.getStatus() == SC_METHOD_NOT_ALLOWED ) + { + // Status SC_METHOD_NOT_ALLOWED is a safe indicator that the + // resource is NON_DAV + eResourceType = NON_DAV; + } + else if (networkAccessAllowed != nullptr) + { + *networkAccessAllowed = *networkAccessAllowed + && shouldAccessNetworkAfterException(e); + } + // if the two net events below happen, something + // is going on to the connection so break the command flow + if ( ( e.getError() == DAVException::DAV_HTTP_TIMEOUT ) || + ( e.getError() == DAVException::DAV_HTTP_CONNECT ) ) + { + cancelCommandExecution( e, xEnv ); + // unreachable + } + + // cancel command execution is case that no user authentication data has been provided. + if ( e.getError() == DAVException::DAV_HTTP_NOAUTH ) + { + cancelCommandExecution( e, uno::Reference< ucb::XCommandEnvironment >() ); + } } }