summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-11-24 18:08:55 +0200
committerTor Lillqvist <tml@collabora.com>2014-11-28 10:21:30 +0200
commit2f0d4b3c41def8a2bc5a1440d53a008fe40da577 (patch)
tree588217e33686ef21f678cc1d3f056dbec2d0a261 /sc/source/core/data
parent030c604642e3ce5058b9d83cb94319cd6b7ef4d5 (diff)
Make whether to use OpenCL or not a global option
Add a toggle to the "General" page. Change-Id: If35b1472032706b09a3bc3499c55cbd3ac2e13ac
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/formulacell.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index b0a39da71521..e364a6e029ce 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -59,6 +59,7 @@
#include <listenerquery.hxx>
#include <listenerqueryids.hxx>
#include <grouparealistener.hxx>
+#include <officecfg/Office/Common.hxx>
#include <boost/scoped_ptr.hpp>
#include <boost/ptr_container/ptr_map.hpp>
@@ -460,7 +461,7 @@ ScFormulaCellGroup::ScFormulaCellGroup() :
meKernelState(sc::OpenCLKernelNone)
{
#if ENABLE_THREADED_OPENCL_KERNEL_COMPILATION
- if (ScInterpreter::GetGlobalConfig().mbOpenCLEnabled)
+ if (officecfg::Office::Common::Misc::UseOpenCL::get())
{
osl::MutexGuard aGuard(getOpenCLCompilationThreadMutex());
if (snCount++ == 0)
@@ -476,7 +477,7 @@ ScFormulaCellGroup::ScFormulaCellGroup() :
ScFormulaCellGroup::~ScFormulaCellGroup()
{
#if ENABLE_THREADED_OPENCL_KERNEL_COMPILATION
- if (ScInterpreter::GetGlobalConfig().mbOpenCLEnabled)
+ if (officecfg::Office::Common::Misc::UseOpenCL::get())
{
osl::MutexGuard aGuard(getOpenCLCompilationThreadMutex());
if (--snCount == 0 && sxCompilationThread.is())
@@ -3719,7 +3720,7 @@ ScFormulaCell::CompareState ScFormulaCell::CompareByTokenArray( ScFormulaCell& r
bool ScFormulaCell::InterpretFormulaGroup()
{
- if (!ScInterpreter::GetGlobalConfig().mbOpenCLEnabled)
+ if (!officecfg::Office::Common::Misc::UseOpenCL::get())
return false;
if (!mxGroup || !pCode)