summaryrefslogtreecommitdiff
path: root/desktop/source/app/opencl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source/app/opencl.cxx')
-rw-r--r--desktop/source/app/opencl.cxx11
1 files changed, 11 insertions, 0 deletions
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);