ucb/source/ucp/webdav-curl/webdavcontent.cxx |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 6d7c3848560883034a4ff12ac1ef52d2d1d28606
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Tue Apr 19 20:08:42 2022 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Wed Apr 20 11:53:40 2022 +0200

    ucb: webdav-curl: check UseUserData before sending user name
    
    Hope this should be acceptable.
    
    Change-Id: I567e0cb358c8693db8f1c674b4fa6f841506f331
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133188
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/ucb/source/ucp/webdav-curl/webdavcontent.cxx 
b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
index a8d7ef233030..995da2c7ba26 100644
--- a/ucb/source/ucp/webdav-curl/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-curl/webdavcontent.cxx
@@ -22,6 +22,7 @@
 #include <cppuhelper/queryinterface.hxx>
 #include <rtl/uri.hxx>
 #include <sal/log.hxx>
+#include <officecfg/Office/Common.hxx>
 #include <officecfg/Inet.hxx>
 #include <ucbhelper/contentidentifier.hxx>
 #include <ucbhelper/macros.hxx>
@@ -3236,7 +3237,10 @@ void Content::lock(
         }
 
         uno::Any aOwnerAny;
-        aOwnerAny <<= OUString("LibreOffice - " + 
::svt::LockFileCommon::GetOOOUserName());
+        OUString const 
user(officecfg::Office::Common::Save::Document::UseUserData::get()
+                ? " - " + ::svt::LockFileCommon::GetOOOUserName()
+                : OUString());
+        aOwnerAny <<= OUString("LibreOffice" + user);
 
         ucb::Lock aLock(
             ucb::LockScope_EXCLUSIVE,

Reply via email to