fpspreadsheet: Add date/time reading/writing support to BIFF2 and the corresponding "write-read" unit test cases. Passed.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2988 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-05-02 18:49:05 +00:00
parent 5325f81daf
commit 1676d31702
8 changed files with 504 additions and 129 deletions

View File

@ -48,6 +48,7 @@ type
procedure ShowFont;
procedure ShowFooter;
procedure ShowFormat;
procedure ShowFormatCount;
procedure ShowFormula;
procedure ShowHeader;
procedure ShowHideObj;
@ -268,6 +269,8 @@ begin
ShowSelection;
$001E, $041E:
ShowFormat;
$001F:
ShowFormatCount;
$0022:
ShowDateMode;
$0024:
@ -1219,6 +1222,21 @@ begin
end;
procedure TBIFFGrid.ShowFormatCount;
var
numBytes: Integer;
w: Word;
begin
if FFormat = sfExcel2 then begin
RowCount := 1 + FixedRows;
numBytes := 2;
Move(FBuffer[FBufferIndex], w, numBytes);
ShowInRow(FCurrRow, FBufferIndex, numbytes, IntToStr(WordLEToN(w)),
'Number of FORMAT records');
end;
end;
procedure TBIFFGrid.ShowFormula;
const
ABS_REL: array[boolean] of string = ('abs', 'rel');

View File

@ -595,11 +595,6 @@ begin
OnRecentFile := @MRUMenuManagerRecentFile;
end;
FXFIndex := -1;
FFontIndex := -1;
FFormatIndex := -1;
FRowIndex := -1;
HexGrid.ColWidths[HexGrid.ColCount-1] := 5;
HexGrid.DefaultRowHeight := HexGrid.Canvas.TextHeight('Tg') + 4;
AlphaGrid.DefaultRowHeight := HexGrid.DefaultRowHeight;
@ -1059,6 +1054,10 @@ begin
Screen.Cursor := crHourGlass;
BiffTree.Clear;
parentnode := nil;
FXFIndex := -1;
FFontIndex := -1;
FFormatIndex := -1;
FRowIndex := -1;
AStream.Position := 0;
while AStream.Position < AStream.Size do begin
p := AStream.Position;