You've already forked lazarus-ccr
fpspreadsheet: Fix crash when a row is deleted with a formula and referenced cells of another formula (see discussion in https://forum.lazarus.freepascal.org/index.php/topic,41161.msg287707.html#msg287707).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6452 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1453,11 +1453,12 @@ begin
|
|||||||
// Remove and destroy the formula record if it is in the deleted row
|
// Remove and destroy the formula record if it is in the deleted row
|
||||||
if formula^.Row = AIndex then
|
if formula^.Row = AIndex then
|
||||||
Delete(node)
|
Delete(node)
|
||||||
else
|
else begin
|
||||||
if formula^.Row > AIndex then
|
if formula^.Row > AIndex then
|
||||||
dec(formula^.Row);
|
dec(formula^.Row);
|
||||||
// Update all RowCol records at row indexes above the deleted row
|
// Update all RowCol records at row indexes above the deleted row
|
||||||
changed := formula^.Parser.IterateNodes(@FixDeletedRow, Pointer(PtrInt(AIndex)));
|
changed := formula^.Parser.IterateNodes(@FixDeletedRow, Pointer(PtrInt(AIndex)));
|
||||||
|
end;
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
// Remove and destroy the formula record if it is in the deleted column
|
// Remove and destroy the formula record if it is in the deleted column
|
||||||
|
Reference in New Issue
Block a user