summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorGiuseppe Castagno <giuseppe.castagno@acca-esse.eu>2016-07-30 11:53:34 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-08-03 09:46:28 +0000
commitc4c30cfac570aeb0f8ac91b36b986e438e2811bc (patch)
tree72add52d3767dc79b07038c1f4f85c833b218d5c /sfx2
parentc4c6ad9cacc09c40fb47ebd98450d3aad91bfb41 (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> (cherry picked from commit 97353e5c43815b45a6f365ccaea474899683d38e) Reviewed-on: https://gerrit.libreoffice.org/27728 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docfile.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 6a0c4c9f927d..288632cfb185 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1006,7 +1006,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 )