[Libreoffice-commits] core.git: ucb/source
Giuseppe Castagno
giuseppe.castagno at acca-esse.eu
Tue Aug 16 16:09:25 UTC 2016
ucb/source/ucp/webdav-neon/DAVTypes.hxx | 22 +++++++++++++---------
ucb/source/ucp/webdav-neon/webdavcontent.cxx | 5 -----
2 files changed, 13 insertions(+), 14 deletions(-)
New commits:
commit 5300b55a1dbcbea6ea244e66e3bc91a0218db5c9
Author: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
Date: Tue Aug 16 16:09:46 2016 +0200
tdf#101094 (25): Make a std::less explicit, add/remove TODOs...
... and a bit of function member signature change.
Change-Id: I0d41277bca3991c7c105400e932df96f7bcf0d79
Reviewed-on: https://gerrit.libreoffice.org/28172
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/DAVTypes.hxx b/ucb/source/ucp/webdav-neon/DAVTypes.hxx
index b1a97c2..53bc739 100644
--- a/ucb/source/ucp/webdav-neon/DAVTypes.hxx
+++ b/ucb/source/ucp/webdav-neon/DAVTypes.hxx
@@ -99,20 +99,20 @@ namespace webdav_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; };
@@ -122,11 +122,11 @@ namespace webdav_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;
@@ -144,7 +144,11 @@ namespace webdav_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-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index daae5fc..8f1fcce 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -860,8 +860,6 @@ void Content::addProperty( const ucb::PropertyCommandArgument& aCmdArg,
osl::Guard< osl::Mutex > aGuard( m_aMutex );
m_xResAccess.reset( new DAVResourceAccess( *xResAccess.get() ) );
}
- // TODO PLACEHOLDER:
- // remove target URL options from cache, since PROPPATCH may change them
// Notify propertyset info change listeners.
beans::PropertySetInfoChangeEvent evt(
@@ -1875,8 +1873,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
std::vector< ProppatchValue >::const_iterator it
= aProppatchValues.begin();
@@ -3023,7 +3019,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
More information about the Libreoffice-commits
mailing list