path: root/svl/source
diff options
authorJuergen Funk <>2017-04-12 11:26:10 +0200
committerKatarina Behrens <>2017-06-06 15:58:02 +0200
commit6ca3b3648e25ae9d4d2d29a0df83349198ec3f5e (patch)
tree664881fdfb741597f78898650a2a0e0396e1084d /svl/source
parentcab3468e96552348ae46121a490f1f6160b65213 (diff)
tdf#106942 Wrong message when lock file is empty or corrupt
1. Erase empty or corrupt lockfile, when reading it fails and skip "Locked Document Dialog" in that case 2. Show Dialog (use LockFileIgnoreRequest -> LockFailedQueryBox) when create lock file is not possible. Two Dialogs: "lock file create error" and "empty lockfile is present" Set the document to read-only when creating lockfile is not possible. If lockfile is corrupt or empty, inform the user. They can interrupt loading the document or open it read-only, which also erases the corrupt lock file after closing the document 3. Handling for the two Dialogs Use LockFileIgnoreRequst for create lockfile error and add a new LockFileCorruptRequest, (lock file is corrupt). Change and generate new messages for both dialogs in english Change-Id: I35c377f85b5113e8ffb89d83b9544b8ebc81d89f Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Katarina Behrens <>
Diffstat (limited to 'svl/source')
1 files changed, 7 insertions, 0 deletions
diff --git a/svl/source/misc/documentlockfile.cxx b/svl/source/misc/documentlockfile.cxx
index f79e55e3f240..162b9dcab7c9 100644
--- a/svl/source/misc/documentlockfile.cxx
+++ b/svl/source/misc/documentlockfile.cxx
@@ -207,12 +207,19 @@ void DocumentLockFile::RemoveFile()
|| !aFileData[LockFileComponent::USERURL].equals( aNewEntry[LockFileComponent::USERURL] ) )
throw io::IOException(); // not the owner, access denied
+ RemoveFileDirectly();
+void DocumentLockFile::RemoveFileDirectly()
uno::Reference < css::ucb::XCommandEnvironment > xEnv;
::ucbhelper::Content aCnt(m_aURL, xEnv, comphelper::getProcessComponentContext());
} // namespace svt
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */