[Libreoffice-commits] core.git: sfx2/source
Jaskaran
jvsg1303 at gmail.com
Wed Mar 23 11:35:26 UTC 2016
sfx2/source/doc/docfile.cxx | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 8d411a4a1ef6844c00bc714f8b144d3729e4f4e8
Author: Jaskaran <jvsg1303 at gmail.com>
Date: Fri Mar 11 00:40:18 2016 +0530
tdf#92817 Fix for Error on Save with empty lock file
An empty lock file is of no use except that it doesn't allow you
to save your file with that same name. An empty lock file doesn't
have OOOUSERNAME and SYSUSERNAME. So in that case we could take
ownership of our lock. bOwnLock = true makes it our own lock.
Change-Id: I9490f87d69bcad3c09f6c98b4fb9318f53e1d4bd
Reviewed-on: https://gerrit.libreoffice.org/23125
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index c48be3a..bd2fca7 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -829,6 +829,12 @@ sal_Int8 SfxMedium::ShowLockedDocumentDialog( const LockFileEntry& aData, bool b
{
sal_Int8 nResult = LOCK_UI_NOLOCK;
+ if( aData[LockFileComponent::OOOUSERNAME] == aData[LockFileComponent::SYSUSERNAME] ||
+ aData[LockFileComponent::OOOUSERNAME].isEmpty() ||
+ aData[LockFileComponent::SYSUSERNAME].isEmpty()
+ )
+ bOwnLock=true;
+
// show the interaction regarding the document opening
uno::Reference< task::XInteractionHandler > xHandler = GetInteractionHandler();
More information about the Libreoffice-commits
mailing list