summaryrefslogtreecommitdiff
path: root/ucb/source/ucp
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-10-08 19:02:08 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-11-01 18:33:19 +0100
commitdac69982586001cb42af900382c544f052820913 (patch)
treee01a7d6c5254ca2d805195b3f17817ff4a088603 /ucb/source/ucp
parent2b0c3c6c83f630f0bde1866b368dced7489a2d2f (diff)
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.stahl@allotropia.de>
Diffstat (limited to 'ucb/source/ucp')
-rw-r--r--ucb/source/ucp/webdav-curl/webdavcontent.cxx102
1 files changed, 51 insertions, 51 deletions
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 >() );
+ }
}
}