sfx2/source/view/viewfrm.cxx | 3 +- ucb/source/ucp/webdav-curl/webdavresponseparser.cxx | 22 ++++++++++++++++++-- 2 files changed, 22 insertions(+), 3 deletions(-)
New commits: commit 1d5293dc8c010d0b81827682f30699fc597b7729 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Apr 19 17:34:52 2022 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Fri Apr 22 19:49:08 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> (cherry picked from commit 68f41f4e2dcec65e8885cdfa658c0568a26182a9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133142 Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx b/ucb/source/ucp/webdav-curl/webdavresponseparser.cxx index a236957c096e..8b7d0473585c 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> @@ -75,6 +77,7 @@ namespace { WebDAVName_unknown = 0, WebDAVName_activelock, + WebDAVName_lockdiscovery, WebDAVName_multistatus, WebDAVName_response, WebDAVName_href, @@ -114,6 +117,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)); @@ -751,6 +755,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 commit 5b5fb5e9c0580ecb70cf65882865bdaf16498fa5 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Apr 19 14:09:08 2022 +0200 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Fri Apr 22 19:48:55 2022 +0200 sfx2: do reload on SID_EDITDOC in SfxViewFrame::ExecReload_Impl() commit b505ca5b9c31b3d9c639406d03a25bea4e914242 "Switch to read-only mode: do not force reload document if possible" replaced "true" with "bNeedsReload" here - but this is a problem when switching from read-only to editable. 1. Start LO and load a document from WebDAV editable 2. Start other LO and load the same document from WebDAV read-only 3. In first LO, edit document, store it and close it 4. In second LO, click "Edit Document" button 5. LO doesn't reload the document and shows stale content It's not clear what problem that commit was trying to solve, but let's assume that it intended to change only what happens when switching from editable to read-only. Change-Id: I69c779c5c0c5c2ccda677ea8cb353c8716916861 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133171 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit c929c563e2029bbb969dc417a688cca8934e69b0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133141 Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index bc991ada4a36..ecae96b5d945 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -599,7 +599,8 @@ void SfxViewFrame::ExecReload_Impl( SfxRequest& rReq ) } } - rReq.AppendItem( SfxBoolItem( SID_FORCERELOAD, bNeedsReload) ); + rReq.AppendItem( SfxBoolItem(SID_FORCERELOAD, + rReq.GetSlot() == SID_EDITDOC || bNeedsReload) ); rReq.AppendItem( SfxBoolItem( SID_SILENT, true )); [[fallthrough]]; //TODO ???