[Libreoffice-commits] core.git: ucb/source

Giuseppe Castagno giuseppe.castagno at acca-esse.eu
Fri Jul 29 11:13:48 UTC 2016


 ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx |   26 ++++++++++++++---------
 1 file changed, 16 insertions(+), 10 deletions(-)

New commits:
commit be47f60b51c053c6329637e829ce16e2e90610fe
Author: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
Date:   Mon Jan 11 16:35:34 2016 +0100

    tdf#101094 (9) OPTIONS: Add options check in Content::getProperties
    
    Change-Id: I1937d51158f67055ed4bbeb60dafbf8ffee090ae
    Reviewed-on: https://gerrit.libreoffice.org/27667
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>

diff --git a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
index 3a2e566..4dd8f41 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx
@@ -312,18 +312,24 @@ uno::Sequence< beans::Property > Content::getProperties(
     if ( !bTransient )
     {
         // Obtain all properties supported for this resource from server.
-        try
+        DAVOptions aDAVOptions;
+        getResourceOptions( xEnv, aDAVOptions, xResAccess );
+        // only Class 1 is needed for PROPFIND
+        if ( aDAVOptions.isClass1() )
         {
-            std::vector< DAVResourceInfo > props;
-            xResAccess->PROPFIND( DAVZERO, props, xEnv );
+            try
+            {
+                std::vector< DAVResourceInfo > props;
+                xResAccess->PROPFIND( DAVZERO, props, xEnv );
 
-            // Note: vector always contains exactly one resource info, because
-            //       we used a depth of DAVZERO for PROPFIND.
-            aPropSet.insert( (*props.begin()).properties.begin(),
-                             (*props.begin()).properties.end() );
-        }
-        catch ( DAVException const & )
-        {
+                // Note: vector always contains exactly one resource info, because
+                //       we used a depth of DAVZERO for PROPFIND.
+                aPropSet.insert( (*props.begin()).properties.begin(),
+                                 (*props.begin()).properties.end() );
+            }
+            catch ( DAVException const & )
+            {
+            }
         }
     }
 


More information about the Libreoffice-commits mailing list