ucb/source/ucp/webdav-curl/webdavresponseparser.cxx | 22 ++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
New commits: commit 68f41f4e2dcec65e8885cdfa658c0568a26182a9 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Apr 19 17:34:52 2022 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Apr 19 19:02:13 2022 +0200 ucb: webdav-curl: fix getting DAV:lockdiscovery property commit b4576f3da4d90139fc5140962d13cb91dab98797 "tdf#82744: fix WebDAV lock/unlock behaviour - part 3" added a call to get the DAV:lockdiscovery property. But WebDAVResponseParser puts lock related properties into a separate return value maResult_Lock that is only returned for LOCK requests. Just add it as a normal property too, then PROPFIND can get it, and the dialog in SfxMedium::LockOrigFileOnDemand() no longer displays "Unknown user". Change-Id: Icee920588ea40b6e203b18287d75484528cfdebb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133185 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx index 41f9a8232748..b2ec174688e4 100644 --- a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx +++ b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx @@ -22,11 +22,13 @@ #include "DAVProperties.hxx" #include "UCBDeadPropertyValue.hxx" -#include <com/sun/star/xml/sax/XDocumentHandler.hpp> +#include <comphelper/processfactory.hxx> +#include <comphelper/sequence.hxx> + #include <cppuhelper/implbase.hxx> #include <com/sun/star/xml/sax/Parser.hpp> #include <com/sun/star/xml/sax/InputSource.hpp> -#include <comphelper/processfactory.hxx> +#include <com/sun/star/xml/sax/XDocumentHandler.hpp> #include <com/sun/star/ucb/LockEntry.hpp> #include <com/sun/star/ucb/LockScope.hpp> #include <com/sun/star/ucb/LockType.hpp> @@ -76,6 +78,7 @@ namespace { WebDAVName_unknown = 0, WebDAVName_activelock, + WebDAVName_lockdiscovery, WebDAVName_multistatus, WebDAVName_response, WebDAVName_href, @@ -115,6 +118,7 @@ namespace if(aWebDAVNameMapperList.empty()) { aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("activelock"), WebDAVName_activelock)); + aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("lockdiscovery"), WebDAVName_lockdiscovery)); aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("multistatus"), WebDAVName_multistatus)); aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("response"), WebDAVName_response)); aWebDAVNameMapperList.insert(WebDAVNameValueType(OUString("href"), WebDAVName_href)); @@ -752,6 +756,20 @@ namespace maResult_Lock.push_back(maLock); break; } + case WebDAVName_lockdiscovery: + { + // lockdiscovery may be requested via PROPFIND, + // in addition to LOCK! so return it 2 ways + if (isCollectingProperties()) + { + http_dav_ucp::DAVPropertyValue aDAVPropertyValue; + + aDAVPropertyValue.Name = "DAV:lockdiscovery"; + aDAVPropertyValue.Value <<= ::comphelper::containerToSequence(maResult_Lock); + maPropStatProperties.push_back(aDAVPropertyValue); + } + break; + } case WebDAVName_propstat: { // propstat end, check status