Kaydet (Commit) 2f72495c authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Move the invariant group handler into its own method.

Change-Id: I3ed8da3c9673b990d5ae17d235bcf4fc1a4541f1
üst 1eaf73af
......@@ -303,6 +303,7 @@ public:
CompareState CompareByTokenArray( ScFormulaCell *pOther ) const;
bool InterpretFormulaGroup();
bool InterpretInvariantFormulaGroup();
// nOnlyNames may be one or more of SC_LISTENING_NAMES_*
void StartListeningTo( ScDocument* pDoc );
......
......@@ -2965,7 +2965,40 @@ bool ScFormulaCell::InterpretFormulaGroup()
}
if (xGroup->mbInvariant)
{
return InterpretInvariantFormulaGroup();
// scan the formula ...
// have a document method: "Get2DRangeAsDoublesArray" that does the
// column-based heavy lifting call it for each absolute range from the
// first cell pos in the formula group.
//
// Project single references to ranges by adding their vector * xGroup->mnLength
//
// TODO:
// elide multiple dimensional movement in vectors eg. =SUM(A1<1,1>)
// produces a diagonal 'column' that serves no useful purpose for us.
// these should be very rare. Should elide in GetDeltas anyway and
// assert here.
//
// Having built our input data ...
// Throw it, and the formula over to some 'OpenCLCalculage' hook
//
// on return - release references on these double buffers
//
// transfer the result to the formula cells (as above)
// store the doubles in the columns' maDoubles array for
// dependent formulae
//
// TODO:
// need to abort/fail when we get errors returned and fallback to
// stock interpreting [ I guess ], unless we can use NaN etc. to
// signal errors.
return false;
}
bool ScFormulaCell::InterpretInvariantFormulaGroup()
{
if (pCode->GetVectorState() == FormulaVectorCheckReference)
{
// An invariant group should only have absolute references, and no
......@@ -3039,37 +3072,8 @@ bool ScFormulaCell::InterpretFormulaGroup()
// FIXME: there is a view / refresh missing here it appears.
}
return true;
}
// scan the formula ...
// have a document method: "Get2DRangeAsDoublesArray" that does the
// column-based heavy lifting call it for each absolute range from the
// first cell pos in the formula group.
//
// Project single references to ranges by adding their vector * xGroup->mnLength
//
// TODO:
// elide multiple dimensional movement in vectors eg. =SUM(A1<1,1>)
// produces a diagonal 'column' that serves no useful purpose for us.
// these should be very rare. Should elide in GetDeltas anyway and
// assert here.
//
// Having built our input data ...
// Throw it, and the formula over to some 'OpenCLCalculage' hook
//
// on return - release references on these double buffers
//
// transfer the result to the formula cells (as above)
// store the doubles in the columns' maDoubles array for
// dependent formulae
//
// TODO:
// need to abort/fail when we get errors returned and fallback to
// stock interpreting [ I guess ], unless we can use NaN etc. to
// signal errors.
return false;
return true;
}
void ScFormulaCell::StartListeningTo( ScDocument* pDoc )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment