[Libreoffice-commits] core.git: desktop/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 18 14:27:13 UTC 2018
desktop/source/app/opencl.cxx | 11 +++++++++++
1 file changed, 11 insertions(+)
New commits:
commit b9796d00be8ac90b4e3b8cecbf34a3117bc92ce6
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Fri Sep 14 15:47:24 2018 +0200
Commit: Luboš Luňák <l.lunak at collabora.com>
CommitDate: Tue Sep 18 16:26:49 2018 +0200
make sure testOpenCLCompute() doesn't fail because of a stale lockfile
If the lockfile for the testing .ods stays around, e.g. because of a crash,
the next loading will fail (because no UI interaction is allowed at that
point) and so the whole openCL test will fail.
Change-Id: Ic193003f52e407e47cd634773b6eb4cdefcc2753
Reviewed-on: https://gerrit.libreoffice.org/60497
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
diff --git a/desktop/source/app/opencl.cxx b/desktop/source/app/opencl.cxx
index 5c991842b94f..f62c93e32e1f 100644
--- a/desktop/source/app/opencl.cxx
+++ b/desktop/source/app/opencl.cxx
@@ -24,6 +24,8 @@
#include <officecfg/Office/Calc.hxx>
#include <officecfg/Office/Common.hxx>
+#include <svl/documentlockfile.hxx>
+
#include <com/sun/star/table/XCell2.hpp>
#include <com/sun/star/sheet/XCalculatable.hpp>
#include <com/sun/star/sheet/XSpreadsheet.hpp>
@@ -54,6 +56,15 @@ static bool testOpenCLCompute(const Reference< XDesktop2 > &xDesktop, const OUSt
SAL_INFO("opencl", "Starting CL test spreadsheet");
+ // A stale lock file would make the loading fail, so make sure to remove it.
+ try {
+ ::svt::DocumentLockFile lockFile( rURL );
+ lockFile.RemoveFileDirectly();
+ }
+ catch (const css::uno::Exception&)
+ {
+ }
+
try {
css::uno::Reference< css::frame::XComponentLoader > xLoader(xDesktop, css::uno::UNO_QUERY_THROW);
More information about the Libreoffice-commits
mailing list