sc/source/core/tool/formulaopt.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
New commits: commit f8b86f6dec86eb30a4e522d4dceeb04b06edc0c3 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Fri Nov 29 01:36:33 2013 +0100 only call switchOpenCLDevice only once Change-Id: Id926b139b14ee667ce4ac0674a3c090b52680649 diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx index 21a453f..f333686 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -442,6 +442,7 @@ void ScFormulaCfg::Commit() Sequence<OUString> aNames = GetPropertyNames(); Sequence<Any> aValues(aNames.getLength()); Any* pValues = aValues.getArray(); + bool bSetOpenCL = false; for (int nProp = 0; nProp < aNames.getLength(); ++nProp) { @@ -535,28 +536,31 @@ void ScFormulaCfg::Commit() { sal_Bool bVal = GetCalcConfig().mbOpenCLEnabled; pValues[nProp] <<= bVal; + bSetOpenCL = bVal; } break; case SCFORMULAOPT_OPENCL_AUTOSELECT: { sal_Bool bVal = GetCalcConfig().mbOpenCLAutoSelect; pValues[nProp] <<= bVal; - sc::FormulaGroupInterpreter::switchOpenCLDevice( - GetCalcConfig().maOpenCLDevice, bVal); + bSetOpenCL = true; } break; case SCFORMULAOPT_OPENCL_DEVICE: { OUString aOpenCLDevice = GetCalcConfig().maOpenCLDevice; pValues[nProp] <<= aOpenCLDevice; - sc::FormulaGroupInterpreter::switchOpenCLDevice( - aOpenCLDevice, GetCalcConfig().mbOpenCLAutoSelect); + bSetOpenCL = true; } break; default: ; } } + if(bSetOpenCL) + sc::FormulaGroupInterpreter::switchOpenCLDevice( + GetCalcConfig().maOpenCLDevice, GetCalcConfig().mbOpenCLAutoSelect); + PutProperties(aNames, aValues); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits