You've already forked lazarus-ccr
fpspreadsheet: Fix crash of BIFF Explorer when viewing RK records with negative numbers. Add info page for IXFE record (BIFF2 only). Fix info page for COLWIDTH records (BIFF2).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3081 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -57,6 +57,7 @@ type
|
||||
procedure ShowInterfaceEnd;
|
||||
procedure ShowInterfaceHdr;
|
||||
procedure ShowIteration;
|
||||
procedure ShowIXFE;
|
||||
procedure ShowLabelCell;
|
||||
procedure ShowLabelSSTCell;
|
||||
procedure ShowLeftMargin;
|
||||
@ -307,6 +308,8 @@ begin
|
||||
ShowCodePage;
|
||||
$0043:
|
||||
ShowXF;
|
||||
$0044:
|
||||
ShowIXFE;
|
||||
$0045:
|
||||
ShowFontColor;
|
||||
$0055:
|
||||
@ -764,20 +767,21 @@ procedure TBIFFGrid.ShowColWidth;
|
||||
var
|
||||
numBytes: Integer;
|
||||
w: Word;
|
||||
b: Byte;
|
||||
begin
|
||||
if FFormat <> sfExcel2 then
|
||||
exit;
|
||||
|
||||
RowCount := FixedRows + 3;
|
||||
|
||||
numBytes := 2;
|
||||
Move(FBuffer[FBufferIndex], w, numbytes);
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, IntToStr(WordLEToN(w)),
|
||||
numBytes := 1;
|
||||
b := FBuffer[FBufferIndex];
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, IntToStr(b),
|
||||
'Index of first column');
|
||||
|
||||
numBytes := 2;
|
||||
Move(FBuffer[FBufferIndex], w, numbytes);
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, IntToStr(WordLEToN(w)),
|
||||
numBytes := 1;
|
||||
b := FBuffer[FBufferIndex];
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, IntToStr(b),
|
||||
'Index of last column');
|
||||
|
||||
numBytes := 2;
|
||||
@ -1992,6 +1996,18 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TBIFFGrid.ShowIXFE;
|
||||
var
|
||||
numBytes: Integer;
|
||||
w: Word;
|
||||
begin
|
||||
RowCount := FixedRows + 1;
|
||||
numBytes := 2;
|
||||
Move(FBuffer[FBufferIndex], w, numBytes);
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, IntToStr(WordLEToN(w)),
|
||||
'Index to XF record');
|
||||
end;
|
||||
|
||||
procedure TBIFFGrid.ShowLabelCell;
|
||||
var
|
||||
numBytes: Integer;
|
||||
@ -2771,14 +2787,6 @@ begin
|
||||
Move(FBuffer[FBufferIndex], dw, numBytes);
|
||||
dw := DWordLEToN(dw);
|
||||
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('RK Value:'#13);
|
||||
if dw and $00000001 = 0
|
||||
then FDetails.Add('Bit 0 = 0: Value not changed')
|
||||
else FDetails.Add('Bit 0 = 1: Encoded value is multiplied by 100.');
|
||||
if dw and $00000002 = 0
|
||||
then FDetails.Add('Bit 1 = 0: Floating point value')
|
||||
else FDetails.Add('Bit 1 = 1: Signed integer value');
|
||||
if dw and $00000002 = 0 then begin
|
||||
encdbl := (QWord(dw) and QWord($FFFFFFFFFFFFFFFC)) shl 32;
|
||||
if dw and $00000001 = 1 then
|
||||
@ -2795,10 +2803,19 @@ begin
|
||||
else
|
||||
s := IntToStr(encint);
|
||||
end;
|
||||
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('RK Value:'#13);
|
||||
if dw and $00000001 = 0
|
||||
then FDetails.Add('Bit 0 = 0: Value not changed')
|
||||
else FDetails.Add('Bit 0 = 1: Encoded value is multiplied by 100.');
|
||||
if dw and $00000002 = 0
|
||||
then FDetails.Add('Bit 1 = 0: Floating point value')
|
||||
else FDetails.Add('Bit 1 = 1: Signed integer value');
|
||||
FDetails.Add('Bits 31-2: Encoded value ' + s);
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes,
|
||||
Format('$%.8x', [dw]), 'RK value');
|
||||
Format('$%.8x', [QWord(dw)]), 'RK value ['+s+']');
|
||||
end;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user