fpspreadsheet: Fix format in predefined test files (test*_1899*.* and test*_1904*.*); fix biff8 ignoring cell format in shared formula range.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4108 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
3902f75dfc
commit
080efbf542
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1197,6 +1197,12 @@ var
|
||||
err: TsErrorValue;
|
||||
ok: Boolean;
|
||||
cell: PCell;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
fmt: TsCellFormat;
|
||||
begin
|
||||
{ Index to XF Record }
|
||||
ReadRowColXF(AStream, ARow, ACol, XF);
|
||||
@ -1217,7 +1223,9 @@ begin
|
||||
InitCell(ARow, ACol, FVirtualCell);
|
||||
cell := @FVirtualCell;
|
||||
end else
|
||||
cell := FWorksheet.AddCell(ARow, ACol); // "Real" cell
|
||||
cell := FWorksheet.GetCell(ARow, ACol); // "Real" cell
|
||||
// Don't call "AddCell" because, if the cell belongs to a shared formula, it
|
||||
// already has been created before, and then would exist in the tree twice.
|
||||
|
||||
// Now determine the type of the formula result
|
||||
if (Data[6] = $FF) and (Data[7] = $FF) then
|
||||
@ -1243,9 +1251,9 @@ begin
|
||||
{Find out what cell type, set content type and value}
|
||||
ExtractNumberFormat(XF, nf, nfs);
|
||||
if IsDateTime(ResultFormula, nf, nfs, dt) then
|
||||
FWorksheet.WriteDateTime(cell, dt, nf, nfs)
|
||||
FWorksheet.WriteDateTime(cell, dt) //, nf, nfs)
|
||||
else
|
||||
FWorksheet.WriteNumber(cell, ResultFormula, nf, nfs);
|
||||
FWorksheet.WriteNumber(cell, ResultFormula); //, nf, nfs);
|
||||
end;
|
||||
|
||||
{ Formula token array }
|
||||
@ -2025,7 +2033,9 @@ begin
|
||||
InitCell(r1, c1, FVirtualCell);
|
||||
cell := @FVirtualCell;
|
||||
end else
|
||||
cell := FWorksheet.AddCell(r1, c1); // "Real" cell
|
||||
cell := FWorksheet.GetCell(r1, c1); // "Real" cell
|
||||
// Don't use "AddCell" here because this cell already exists in files written
|
||||
// by Excel, and this would destroy its formatting.
|
||||
|
||||
// Unused
|
||||
AStream.ReadByte;
|
||||
|
Loading…
Reference in New Issue
Block a user