[Libreoffice-commits] core.git: Branch 'feature/formula-core-rework' - sc/source

Kohei Yoshida kohei.yoshida at gmail.com
Fri Jun 28 10:28:54 PDT 2013


 sc/source/core/data/documen9.cxx    |    6 +-----
 sc/source/core/data/formulacell.cxx |    3 +++
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 6972c788286b151145067ac5be65540fc6ac7bc6
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date:   Fri Jun 28 13:28:31 2013 -0400

    Ensure that the group calculation path won't get called when it's disabled.
    
    Change-Id: I0ea45616558bebf99c63862a0458776c67789bbc

diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 2938009..c4c1409 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 26d7ee5..f2d72da 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();


More information about the Libreoffice-commits mailing list