summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/formulacell.hxx4
-rw-r--r--sc/inc/tokenarray.hxx3
-rw-r--r--sc/source/core/data/formulacell.cxx9
-rw-r--r--sc/source/core/tool/token.cxx27
4 files changed, 1 insertions, 42 deletions
diff --git a/sc/inc/formulacell.hxx b/sc/inc/formulacell.hxx
index 746ca5505c32..86b8045ee1d6 100644
--- a/sc/inc/formulacell.hxx
+++ b/sc/inc/formulacell.hxx
@@ -410,10 +410,6 @@ public:
bool IsSharedTop() const;
SCROW GetSharedTopRow() const;
SCROW GetSharedLength() const;
-
- // An estimate of the number of cells referenced by the formula
- sal_Int32 GetWeight() const;
-
ScTokenArray* GetSharedCode();
const ScTokenArray* GetSharedCode() const;
diff --git a/sc/inc/tokenarray.hxx b/sc/inc/tokenarray.hxx
index ad61ef3cdc87..07f344b5bfce 100644
--- a/sc/inc/tokenarray.hxx
+++ b/sc/inc/tokenarray.hxx
@@ -59,9 +59,6 @@ public:
virtual ~ScTokenArray();
ScTokenArray* Clone() const; /// True copy!
- // An estimate of the number of cells referenced by the token array
- sal_Int32 GetWeight() const;
-
void GenHash();
size_t GetHash() const { return mnHashValue;}
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index daefcc6ab2b7..bc9ffbe4940c 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 (GetWeight() < ScInterpreter::GetGlobalConfig().mnOpenCLMinimumFormulaGroupSize)
+ if (GetSharedLength() < ScInterpreter::GetGlobalConfig().mnOpenCLMinimumFormulaGroupSize)
{
mxGroup->meCalcState = sc::GroupCalcDisabled;
return false;
@@ -4128,13 +4128,6 @@ 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;
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 89a33e6f2fce..8816b87df833 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1412,33 +1412,6 @@ bool ScTokenArray::ImplGetReference( ScRange& rRange, const ScAddress& rPos, boo
return bIs;
}
-sal_Int32 ScTokenArray::GetWeight() const
-{
- sal_Int32 result(0);
-
- FormulaToken** p = pCode;
- FormulaToken** pEnd = p + static_cast<size_t>(nLen);
- for (; p != pEnd; ++p)
- {
- switch ((*p)->GetType())
- {
- case svDoubleRef :
- case svExternalDoubleRef:
- {
- const ScComplexRefData& rRef = *(*p)->GetDoubleRef();
- result += ( (rRef.Ref2.Row() - rRef.Ref1.Row() + 1) * (rRef.Ref2.Col() - rRef.Ref1.Col() + 1) );
- }
- break;
- default:
- break;
- }
- }
- // Just print out the this pointer. It turns out to be quite complicated to get
- // a symbolic printout of the ScTokenArray here.
- SAL_INFO("sc.token", "GetWeight(" << this << "): " << result);
- return result;
-}
-
namespace {
// we want to compare for similar not identical formulae