Fixed memory leak in WriteWorksheet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@953 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
c9cad114e8
commit
75dd051f39
@ -404,7 +404,7 @@ var
|
|||||||
CurCell: PCell;
|
CurCell: PCell;
|
||||||
CurRow: array of PCell;
|
CurRow: array of PCell;
|
||||||
LastColNum: Cardinal;
|
LastColNum: Cardinal;
|
||||||
ACell: PCell;
|
LCell: TCell;
|
||||||
AVLNode: TAVLTreeNode;
|
AVLNode: TAVLTreeNode;
|
||||||
begin
|
begin
|
||||||
LastColNum := CurSheet.GetLastColNumber;
|
LastColNum := CurSheet.GetLastColNumber;
|
||||||
@ -415,8 +415,6 @@ begin
|
|||||||
' <table:table-column table:style-name="co1" table:number-columns-repeated="' +
|
' <table:table-column table:style-name="co1" table:number-columns-repeated="' +
|
||||||
IntToStr(LastColNum + 1) + '" table:default-cell-style-name="Default"/>' + LineEnding;
|
IntToStr(LastColNum + 1) + '" table:default-cell-style-name="Default"/>' + LineEnding;
|
||||||
|
|
||||||
ACell := GetMem(SizeOf(TCell));
|
|
||||||
|
|
||||||
// The cells need to be written in order, row by row, cell by cell
|
// The cells need to be written in order, row by row, cell by cell
|
||||||
for j := 0 to CurSheet.GetLastRowNumber do
|
for j := 0 to CurSheet.GetLastRowNumber do
|
||||||
begin
|
begin
|
||||||
@ -426,9 +424,9 @@ begin
|
|||||||
// Write cells from this row.
|
// Write cells from this row.
|
||||||
for k := 0 to LastColNum do
|
for k := 0 to LastColNum do
|
||||||
begin
|
begin
|
||||||
ACell^.Row := j;
|
LCell.Row := j;
|
||||||
ACell^.Col := k;
|
LCell.Col := k;
|
||||||
AVLNode := CurSheet.Cells.Find(ACell);
|
AVLNode := CurSheet.Cells.Find(@LCell);
|
||||||
if Assigned(AVLNode) then
|
if Assigned(AVLNode) then
|
||||||
WriteCellCallback(PCell(AVLNode.Data), nil)
|
WriteCellCallback(PCell(AVLNode.Data), nil)
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user