diff options
author | Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> | 2016-07-30 11:53:34 +0200 |
---|---|---|
committer | Giuseppe Castagno <giuseppe.castagno@acca-esse.eu> | 2016-07-30 12:34:14 +0000 |
commit | 97353e5c43815b45a6f365ccaea474899683d38e (patch) | |
tree | 6c82e3fb7faf5e5006ea483b3cd5ad86f37f0156 /sfx2 | |
parent | 4a6329badc9c8679945d1a1ec225e26e15d7bfd2 (diff) |
Fix the WebDAV lock owner name shown on file locked dialog UI
Probably due to 8d411a4a1ef6844c00bc714f8b144d3729e4f4e8.
See comment in the added code for details.
Change-Id: I3e8a856a715385ed2ab1d9ecda31dd25e05e6c59
Reviewed-on: https://gerrit.libreoffice.org/27716
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Giuseppe Castagno <giuseppe.castagno@acca-esse.eu>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 4ac02407fbe8..6007d25f2026 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1016,7 +1016,17 @@ void SfxMedium::LockOrigFileOnDemand( bool bLoading, bool bNoUI ) css::ucb::Lock aLock = aLocks[0]; OUString aOwner; if(aLock.Owner >>= aOwner) + { + // This solution works right when the LO user name and the WebDAV user + // name are the same. + // A better thing to do would be to obtain the 'real' WebDAV user name, + // but that's not possible from a WebDAV UCP provider client. + LockFileEntry aOwnData = svt::LockFileCommon::GenerateOwnEntry(); + // use the current LO user name as the system name + aLockData[LockFileComponent::SYSUSERNAME] = aOwnData[LockFileComponent::SYSUSERNAME]; + // we need to display the WebDAV user name owning the lock, not the local one aLockData[LockFileComponent::OOOUSERNAME] = aOwner; + } } if ( !bResult && !bNoUI ) |