[Libreoffice-commits] core.git: sfx2/source

Giuseppe Castagno giuseppe.castagno at acca-esse.eu
Sat Jul 30 12:34:47 UTC 2016


 sfx2/source/doc/docfile.cxx |   10 ++++++++++
 1 file changed, 10 insertions(+)

New commits:
commit 97353e5c43815b45a6f365ccaea474899683d38e
Author: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>
Date:   Sat Jul 30 11:53:34 2016 +0200

    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 at libreoffice.org>
    Reviewed-by: Giuseppe Castagno <giuseppe.castagno at acca-esse.eu>

diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 4ac0240..6007d25 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 )


More information about the Libreoffice-commits mailing list