fpspreadsheet: Fix formulas from prev sheet overrunning other formulas in sheet, xlsx issue (SharedFormulaBase list must be reset for each sheet) - see http://forum.lazarus.freepascal.org/index.php/topic,35903.0.html)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5753 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-02-18 17:31:05 +00:00
parent ef4c18081d
commit 280dc39ddc

View File

@ -2104,7 +2104,7 @@ var
Doc : TXMLDocument;
RelsNode: TDOMNode;
SheetList: TStringList;
i: Integer;
i, j: Integer;
fn: String;
fn_comments: String;
XMLStream: TStream;
@ -2204,6 +2204,11 @@ begin
XMLStream.Free;
end;
// clear sharedformulabase list
for j:=FSharedFormulaBaseList.Count-1 downto 0 do
TObject(FSharedFormulaBaseList[j]).Free;
FSharedFormulaBaseList.Clear;
// Sheet data, formats, etc.
ReadSheetViews(Doc.DocumentElement.FindNode('sheetViews'), FWorksheet);
ReadSheetFormatPr(Doc.DocumentElement.FindNode('sheetFormatPr'), FWorksheet);