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 99bdd887a6 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>
This commit is contained in:
Michael Stahl 2022-04-19 18:01:37 +02:00
parent 68f41f4e2d
commit 70bea73ffb
2 changed files with 3 additions and 2 deletions

View file

@ -23,6 +23,7 @@ $(eval $(call gb_Library_use_libraries,ucpdav1,\
cppuhelper \
sal \
salhelper \
svl \
ucbhelper \
tl \
))

View file

@ -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,