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.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index bc9ffbe4940c..daefcc6ab2b7 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -3750,7 +3750,7 @@ bool ScFormulaCell::InterpretFormulaGroup()
if (mxGroup->meCalcState == sc::GroupCalcDisabled)
return false;
- if (GetSharedLength() < ScInterpreter::GetGlobalConfig().mnOpenCLMinimumFormulaGroupSize)
+ if (GetWeight() < ScInterpreter::GetGlobalConfig().mnOpenCLMinimumFormulaGroupSize)
{
mxGroup->meCalcState = sc::GroupCalcDisabled;
return false;
@@ -4128,6 +4128,13 @@ SCROW ScFormulaCell::GetSharedLength() const
return mxGroup ? mxGroup->mnLength : 0;
}
+sal_Int32 ScFormulaCell::GetWeight() const
+{
+ if (!mxGroup)
+ return pCode->GetWeight();
+ return GetSharedLength() * GetSharedCode()->GetWeight();
+}
+
ScTokenArray* ScFormulaCell::GetSharedCode()
{
return mxGroup ? mxGroup->mpCode : NULL;