summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-04-19 18:01:37 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2022-04-19 19:55:22 +0200
commit70bea73ffbe815c2d5b7067f20d3eebbb98df61f (patch)
tree423e4831b7c7b1523f652f9460770fff134324f0 /ucb
parent68f41f4e2dcec65e8885cdfa658c0568a26182a9 (diff)
ucb: webdav-curl: put user name from config into LOCK request
... so that the dialog in SfxMedium::LockOrigFileOnDemand() can show something more useful than hard-coded URL, which has been used since commit 99bdd887a6141883878978bad9beb35e7b326cd1 in 2009 when locking was added. This is half of the user info that is put into LO's own lock files (see svt::LockFileCommon::GenerateOwnEntry()). Change-Id: Iefac724644a536fc37c3c79ce862e25bd9be38af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133186 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/Library_ucpdav1.mk1
-rw-r--r--ucb/source/ucp/webdav-curl/webdavcontent.cxx4
2 files changed, 3 insertions, 2 deletions
diff --git a/ucb/Library_ucpdav1.mk b/ucb/Library_ucpdav1.mk
index b3c9a2342d6e..be8205baed8a 100644
--- a/ucb/Library_ucpdav1.mk
+++ b/ucb/Library_ucpdav1.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_Library_use_libraries,ucpdav1,\
cppuhelper \
sal \
salhelper \
+ svl \
ucbhelper \
tl \
))
diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index 8528f31fa263..a8d7ef233030 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -28,6 +28,7 @@
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/simpleinteractionrequest.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
+#include <svl/lockfilecommon.hxx>
#include <com/sun/star/beans/IllegalTypeException.hpp>
#include <com/sun/star/beans/NotRemoveableException.hpp>
@@ -3235,8 +3236,7 @@ void Content::lock(
}
uno::Any aOwnerAny;
- aOwnerAny
- <<= OUString("LibreOffice - http://www.libreoffice.org/");
+ aOwnerAny <<= OUString("LibreOffice - " + ::svt::LockFileCommon::GetOOOUserName());
ucb::Lock aLock(
ucb::LockScope_EXCLUSIVE,