summaryrefslogtreecommitdiff
path: root/sc/source/core/data/formulacell.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data/formulacell.cxx')
-rw-r--r--sc/source/core/data/formulacell.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index fed52b93ddec..615fbb8056f7 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -54,6 +54,7 @@
#include <svl/intitem.hxx>
#include <o3tl/make_unique.hxx>
#include <rtl/strbuf.hxx>
+#include <officecfg/Office/Calc.hxx>
#include <formulagroup.hxx>
#include <listenercontext.hxx>
#include <types.hxx>
@@ -4322,11 +4323,10 @@ bool ScFormulaCell::InterpretFormulaGroup()
return false;
}
- static const bool bThreadingRequested = std::getenv("CPU_THREADED_CALCULATION");
+ static const bool bThreadingProhibited = std::getenv("SC_NO_THREADED_CALCULATION");
// To temporarilu use threading for sc unit tests regardless of the size of the formula group,
- // add the condition !std::getenv("LO_TESTNAME") below (with &&), and run with
- // CPU_THREADED_CALCULATION=yes
+ // add the condition !std::getenv("LO_TESTNAME") below (with &&)
if (GetWeight() < ScInterpreter::GetGlobalConfig().mnOpenCLMinimumFormulaGroupSize)
{
mxGroup->meCalcState = sc::GroupCalcDisabled;
@@ -4341,7 +4341,7 @@ bool ScFormulaCell::InterpretFormulaGroup()
return false;
}
- if (!ScCalcConfig::isOpenCLEnabled() && bThreadingRequested)
+ if (!bThreadingProhibited && !ScCalcConfig::isOpenCLEnabled() && officecfg::Office::Calc::Formula::Calculation::UseThreadedCalculationForFormulaGroups::get())
{
// iterate over code in the formula ...
// ensure all input is pre-calculated -