fpspreadsheet: Clean-up

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6520 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-06-21 08:45:14 +00:00
parent b8352398b0
commit b2cc14f2bc

View File

@ -1505,50 +1505,6 @@ begin
Delete(ARow, ACol); // will release memory automatically Delete(ARow, ACol); // will release memory automatically
end; end;
(*
procedure TsFormulas.DeleteRowOrCol(AIndex: Cardinal; IsRow: Boolean;
InSheet: TsBasicWorksheet);
var
node, nextnode: TAvgLvlTreeNode;
formula: PsFormula;
changed: Boolean;
begin
node := FindLowest;
while Assigned(node) do
begin
changed := false;
nextnode := FindSuccessor(node);
formula := PsFormula(node.Data);
if IsRow then
begin
// Remove and destroy the formula record if it is in the deleted row
if formula^.Row = AIndex then
Delete(node)
else begin
if formula^.Row > AIndex then
dec(formula^.Row);
// Update all RowCol records at row indexes above the deleted row
changed := formula^.Parser.IterateNodes(@FixDeletedRow, Pointer(PtrInt(AIndex)));
end;
end else
begin
// Remove and destroy the formula record if it is in the deleted column
if formula^.Col = AIndex then
Delete(node)
else begin
if formula^.Col > AIndex then
dec(formula^.Col);
// Update all RowCol records at column indexes above the deleted column
changed := formula^.Parser.IterateNodes(@FixDeletedCol, Pointer(PtrInt(AIndex)));
end;
end;
// Recreate the formula if required.
if changed then
formula^.Text := formula^.Parser.Expression;
node := nextnode;
end;
end; *)
procedure TsFormulas.DisposeData(var AData: Pointer); procedure TsFormulas.DisposeData(var AData: Pointer);
begin begin
if AData <> nil then begin if AData <> nil then begin
@ -1603,30 +1559,6 @@ function TsFormulas.GetEnumerator: TsFormulaEnumerator;
begin begin
Result := TsFormulaEnumerator.Create(self, 0, 0, $7FFFFFFF, $7FFFFFFF, false); Result := TsFormulaEnumerator.Create(self, 0, 0, $7FFFFFFF, $7FFFFFFF, false);
end; end;
(*
procedure TsFormulas.InsertRowOrCol(AIndex: Cardinal; IsRow: Boolean);
var
node: TAvgLvlTreeNode;
formula: PsFormula;
changed: Boolean;
begin
node := FindLowest;
while Assigned(node) do begin
formula := PsFormula(node.Data);
if IsRow then
begin
if formula^.Row >= AIndex then inc(formula^.Row);
changed := formula^.Parser.IterateNodes(@FixInsertedRow, Pointer(PtrInt(AIndex)));
end else
begin
if formula^.Col >= AIndex then inc(formula^.Col);
changed := formula^.Parser.IterateNodes(@FixInsertedCol, Pointer(PtrInt(AIndex)));
end;
if changed then
formula^.Text := formula^.Parser.Expression;
node := FindSuccessor(node);
end;
end; *)
function TsFormulas.NewData: Pointer; function TsFormulas.NewData: Pointer;
var var