diff options
Diffstat (limited to 'sc/source/ui/unoobj')
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index aa555196f025..94a06f050073 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2324,17 +2324,19 @@ void ScModelObj::HandleCalculateEvents() sal_Bool ScModelObj::isOpenCLEnabled() throw (uno::RuntimeException, std::exception) { - return ScInterpreter::GetGlobalConfig().mbOpenCLEnabled; + return officecfg::Office::Common::Misc::UseOpenCL::get(); } void ScModelObj::enableOpenCL(sal_Bool bEnable) throw (uno::RuntimeException, std::exception) { + boost::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Misc::UseOpenCL::set(bEnable, batch); + batch->commit(); + ScCalcConfig aConfig = ScInterpreter::GetGlobalConfig(); if (bEnable) aConfig.setOpenCLConfigToDefault(); - else - aConfig.mbOpenCLEnabled = false; ScInterpreter::SetGlobalConfig(aConfig); } |