summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-06-28 13:28:31 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-07-01 10:29:18 -0400
commite5bbf11028d524a5282e4ce1525cde41c2b1afa5 (patch)
tree509e2a7dfa889ab69b61162fffa7deb83d6eb024
parent94040c2034ed657b2c4d4d24c8d92ab7c9caadfd (diff)
Ensure that the group calculation path won't get called when it's disabled.
Change-Id: I0ea45616558bebf99c63862a0458776c67789bbc
-rw-r--r--sc/source/core/data/documen9.cxx6
-rw-r--r--sc/source/core/data/formulacell.cxx3
2 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 2938009d74c5..c4c14092366b 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -690,11 +690,7 @@ void ScDocument::ApplyAsianEditSettings( ScEditEngineDefaulter& rEngine )
void ScDocument::RebuildFormulaGroups()
{
- bool bEnableFormulaGroups;
-
- bEnableFormulaGroups = ScInterpreter::GetGlobalConfig().mbOpenCLEnabled;
-
- if ( !bEnableFormulaGroups )
+ if (!ScInterpreter::GetGlobalConfig().mbOpenCLEnabled)
return;
SCTAB nTab;
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index 26d7ee5e4c22..f2d72daf8e19 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -3084,6 +3084,9 @@ public:
bool ScFormulaCell::InterpretFormulaGroup()
{
+ if (!ScInterpreter::GetGlobalConfig().mbOpenCLEnabled)
+ return false;
+
// Re-build formulae groups if necessary - ideally this is done at
// import / insert / delete etc. and is integral to the data structures
pDocument->RebuildFormulaGroups();