diff options
author | Jaskaran <jvsg1303@gmail.com> | 2016-03-11 00:40:18 +0530 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2016-03-23 11:34:56 +0000 |
commit | 8d411a4a1ef6844c00bc714f8b144d3729e4f4e8 (patch) | |
tree | ec8768ad97a85a9433045f1d0e9d872a105700d4 | |
parent | 2355067fa131c136555cb290c4e9d5042e005184 (diff) |
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@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index c48be3a45088..bd2fca7cecfe 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(); |