fdo#83901: ROW() and COLUMN() to be properly recalculated on cell move.
For cases where ROW or COLUMN references another cell that has shifted. Change-Id: Ic4bef8672dab811ceff6886d9af0388306a66485
This commit is contained in:
@@ -2044,6 +2044,12 @@ class UpdateRefOnNonCopy : std::unary_function<sc::FormulaGroupEntry, void>
|
|||||||
if (pCode->IsRecalcModeOnRefMove())
|
if (pCode->IsRecalcModeOnRefMove())
|
||||||
aRes.mbValueChanged = true;
|
aRes.mbValueChanged = true;
|
||||||
}
|
}
|
||||||
|
else if (aRes.mbReferenceModified && pCode->IsRecalcModeOnRefMove())
|
||||||
|
{
|
||||||
|
// The cell itself hasn't shifted. But it may have ROW or COLUMN
|
||||||
|
// referencing another cell that has.
|
||||||
|
aRes.mbValueChanged = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (aRes.mbNameModified)
|
if (aRes.mbNameModified)
|
||||||
recompileTokenArray(*pTop);
|
recompileTokenArray(*pTop);
|
||||||
|
@@ -2788,7 +2788,7 @@ bool ScFormulaCell::UpdateReferenceOnShift(
|
|||||||
|
|
||||||
if (bOnRefMove)
|
if (bOnRefMove)
|
||||||
// Cell may reference itself, e.g. ocColumn, ocRow without parameter
|
// Cell may reference itself, e.g. ocColumn, ocRow without parameter
|
||||||
bOnRefMove = (bValChanged || (aPos != aOldPos));
|
bOnRefMove = (bValChanged || (aPos != aOldPos) || bRefModified);
|
||||||
|
|
||||||
bool bNewListening = false;
|
bool bNewListening = false;
|
||||||
bool bInDeleteUndo = false;
|
bool bInDeleteUndo = false;
|
||||||
|
Reference in New Issue
Block a user