ucb/source/ucp/webdav-curl/DAVTypes.hxx      |   22 +++++++++++++---------
 ucb/source/ucp/webdav-curl/webdavcontent.cxx |    5 -----
 2 files changed, 13 insertions(+), 14 deletions(-)

New commits:
commit be53d60f85706eeae3a9300e75cae6ed1cd4e642
Author:     Giuseppe Castagno <giuseppe.casta...@acca-esse.eu>
AuthorDate: Tue Aug 16 16:09:46 2016 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Mon Nov 1 18:44:06 2021 +0100

    ucb: webdav-curl: tdf#101094 (25): Make a std::less explicit, add/remove 
TODOs...
    
    ... and a bit of function member signature change.
    
    [ port of commit 5300b55a1dbcbea6ea244e66e3bc91a0218db5c9 ]
    
    Change-Id: Ia9d8f78c2fb39bd0943d4c2fb7d9b11cbee1034a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123479
    Tested-by: Michael Stahl <michael.st...@allotropia.de>
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.hxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
index b7bc7004b613..7000945bbf43 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.hxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.hxx
@@ -89,20 +89,20 @@ namespace http_dav_ucp
 
         virtual ~DAVOptions();
 
-        bool isResourceFound() { return m_isResourceFound; };
+        bool isResourceFound() const { return m_isResourceFound; };
         void setResourceFound( bool ResourceFound = true ) { m_isResourceFound 
= ResourceFound; };
 
-        bool isClass1() { return m_isClass1; };
+        bool isClass1() const { return m_isClass1; };
         void setClass1( bool Class1 = true ) { m_isClass1 = Class1; };
 
-        bool isClass2() { return m_isClass2; };
+        bool isClass2() const { return m_isClass2; };
         void setClass2( bool Class2 = true ) { m_isClass2 = Class2; };
 
         bool isClass3() { return m_isClass3; };
         void setClass3( bool Class3 = true ) { m_isClass3 = Class3; };
 
-        sal_uInt32  getStaleTime() { return m_nStaleTime ; };
-        void setStaleTime( sal_uInt32 nStaleTime ) { m_nStaleTime = 
nStaleTime; };
+        sal_uInt32  getStaleTime() const { return m_nStaleTime ; };
+        void setStaleTime( const sal_uInt32 nStaleTime ) { m_nStaleTime = 
nStaleTime; };
 
         OUString & getURL() { return m_sURL; };
         void setURL( OUString & sURL ) { m_sURL = sURL; };
@@ -112,11 +112,11 @@ namespace http_dav_ucp
 
         void  setAllowedMethods( OUString & aAllowedMethods ) { 
m_aAllowedMethods = aAllowedMethods; } ;
         OUString & getAllowedMethods() { return m_aAllowedMethods; } ;
-        bool isLockAllowed() { return ( m_aAllowedMethods.indexOf( "LOCK" ) != 
-1 ); };
-        bool isUnlockAllowed() { return ( m_aAllowedMethods.indexOf( "UNLOCK" 
) != -1 ); };
+        bool isLockAllowed() const { return ( m_aAllowedMethods.indexOf( 
"LOCK" ) != -1 ); };
+        bool isUnlockAllowed() const { return ( m_aAllowedMethods.indexOf( 
"UNLOCK" ) != -1 ); };
 
         void setLocked( bool locked = true ) { m_isLocked = locked; } ;
-        bool isLocked() { return m_isLocked; };
+        bool isLocked() const { return m_isLocked; };
 
         void reset() {
             m_isResourceFound = false;
@@ -135,7 +135,11 @@ namespace http_dav_ucp
 
     };
 
-    typedef std::map< OUString, DAVOptions > DAVOptionsMap;
+    // TODO: the OUString key element in std::map needs to be changed with a 
URI representation
+    // along with a specific compare (std::less) implementation, as suggested 
in
+    // <https://tools.ietf.org/html/rfc3986#section-6>, to find by URI and not 
by string comparison
+    typedef std::map< OUString, DAVOptions,
+                      std::less< OUString > > DAVOptionsMap;
 
     class DAVOptionsCache
     {
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 7429eb075fcf..e69633f0d207 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -867,8 +867,6 @@ void Content::addProperty( const 
css::ucb::PropertyCommandArgument &aCmdArg,
             osl::Guard< osl::Mutex > aGuard( m_aMutex );
             m_xResAccess.reset( new DAVResourceAccess( *xResAccess ) );
         }
-        // TODO PLACEHOLDER:
-        // remove target URL options from cache, since PROPPATCH may change 
them
 
         // Notify propertyset info change listeners.
         beans::PropertySetInfoChangeEvent evt(
@@ -1891,8 +1889,6 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
             // Set property values at server.
             aStaticDAVOptionsCache.removeDAVOptions( xResAccess->getURL() );
             xResAccess->PROPPATCH( aProppatchValues, xEnv );
-            // TODO PLACEHOLDER:
-            // remove target URL options from cache, since PROPPATCH may 
change it
 
             for ( const auto& rProppatchValue : aProppatchValues )
             {
@@ -3031,7 +3027,6 @@ Content::ResourceType Content::resourceTypeForLocks(
                                 eResourceTypeForLocks = NOT_FOUND;
                                 break;
                                 // some servers returns SC_FORBIDDEN, instead
-                                // TODO: probably remove it, when OPTIONS 
implemented
                                 // the meaning of SC_FORBIDDEN is, according 
to <http://tools.ietf.org/html/rfc7231#section-6.5.3>:
                                 // The 403 (Forbidden) status code indicates 
that the server understood
                                 // the request but refuses to authorize it

Reply via email to