diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-04-19 20:08:42 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-04-20 11:53:40 +0200 |
commit | 6d7c3848560883034a4ff12ac1ef52d2d1d28606 (patch) | |
tree | bbaa597a569ecefc4029f57c4ebaeef01b08a8d3 /ucb | |
parent | 0350c84a5e6bf7c48cd77c7fcb29a3bbdc1d8c8d (diff) |
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.stahl@allotropia.de>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav-curl/webdavcontent.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
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, |