sc/source/core/tool/formulaopt.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
New commits: commit 71591666441cfe39fd21560734e754371289ee6f 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 ec6696a..181f9d6 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -447,6 +447,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) { @@ -540,28 +541,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