You've already forked lazarus-ccr
fpspreadsheet: Add some more record descriptions to BIFFExplorer
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2987 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -154,7 +154,7 @@
|
||||
<Unit3>
|
||||
<Filename Value="bebiffutils.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="bebiffutils"/>
|
||||
<UnitName Value="beBIFFUtils"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="behtml.pas"/>
|
||||
|
@ -24,6 +24,7 @@ type
|
||||
function GetStringType: String;
|
||||
|
||||
procedure ShowBackup;
|
||||
procedure ShowBlankCell;
|
||||
procedure ShowBOF;
|
||||
procedure ShowBookBool;
|
||||
procedure ShowBottomMargin;
|
||||
@ -221,6 +222,8 @@ begin
|
||||
case FRecType of
|
||||
$0000, $0200:
|
||||
ShowDimensions;
|
||||
$0001, $0201:
|
||||
ShowBlankCell;
|
||||
$0002:
|
||||
ShowInteger;
|
||||
$0003, $0203:
|
||||
@ -397,6 +400,86 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
procedure TBIFFGrid.ShowBlankCell;
|
||||
var
|
||||
numBytes: Integer;
|
||||
b: Byte = 0;
|
||||
w: Word = 0;
|
||||
dbl: Double;
|
||||
begin
|
||||
RowCount := IfThen(FFormat = sfExcel2, FixedRows + 5, FixedRows + 3);
|
||||
// Offset 0: Row & Offset 2: Column
|
||||
ShowRowColData(FBufferIndex);
|
||||
|
||||
// Offset 4: Cell attributes (BIFF2) or XF record index (> BIFF2)
|
||||
if FFormat = sfExcel2 then begin
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Cell protection and XF index:'#13);
|
||||
FDetails.Add(Format('Bits 5-0 = %d: XF Index', [b and $3F]));
|
||||
case b and $40 of
|
||||
0: FDetails.Add('Bit 6 = 0: Cell is NOT locked.');
|
||||
1: FDetails.Add('Bit 6 = 1: Cell is locked.');
|
||||
end;
|
||||
case b and $80 of
|
||||
0: FDetails.Add('Bit 7 = 0: Formula is NOT hidden.');
|
||||
1: FDetails.Add('Bit 7 = 1: Formula is hidden.');
|
||||
end;
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('%d ($%.2x)', [b, b]),
|
||||
'Cell protection and XF index');
|
||||
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Indexes to format and font records:'#13);
|
||||
FDetails.Add(Format('Bits 5-0 = %d: Index to FORMAT record', [b and $3f]));
|
||||
FDetails.Add(Format('Bits 7-6 = %d: Index to FONT record', [(b and $C0) shr 6]));
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('%d ($%.2x)', [b, b]),
|
||||
'Indexes of format and font records');
|
||||
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Cell style:'#13);
|
||||
case b and $07 of
|
||||
0: FDetails.Add('Bits 2-0 = 0: Horizontal alignment is GENERAL');
|
||||
1: FDetails.Add('Bits 2-0 = 1: Horizontal alignment is LEFT');
|
||||
2: FDetails.Add('Bits 2-0 = 2: Horizontal alignment is CENTERED');
|
||||
3: FDetails.Add('Bits 2-0 = 3: Horizontal alignment is RIGHT');
|
||||
4: FDetails.Add('Bits 2-0 = 4: Horizontal alignment is FILLED');
|
||||
end;
|
||||
if b and $08 = 0
|
||||
then FDetails.Add('Bit 3 = 0: Cell has NO left border')
|
||||
else FDetails.Add('Bit 3 = 1: Cell has left black border');
|
||||
if b and $10 = 0
|
||||
then FDetails.Add('Bit 4 = 0: Cell has NO right border')
|
||||
else FDetails.Add('Bit 4 = 1: Cell has right black border');
|
||||
if b and $20 = 0
|
||||
then FDetails.Add('Bit 5 = 0: Cell has NO top border')
|
||||
else FDetails.Add('Bit 5 = 1: Cell has top black border');
|
||||
if b and $40 = 0
|
||||
then FDetails.Add('Bit 6 = 0: Cell has NO bottom border')
|
||||
else FDetails.Add('Bit 6 = 1: Cell has bottom black border');
|
||||
if b and $80 = 0
|
||||
then FDetails.Add('Bit 7 = 0: Cell has NO shaded background')
|
||||
else FDetails.Add('Bit 7 = 1: Cell has shaded background');
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numbytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Cell style');
|
||||
end else
|
||||
begin
|
||||
numBytes := 2;
|
||||
Move(FBuffer[FBufferIndex], w, numBytes);
|
||||
w := WordLEToN(w);
|
||||
ShowInRow(FCurrROw, FBufferIndex, numBytes, Format('%d ($%.4x)', [w, w]),
|
||||
'Index of XF record');
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TBIFFGrid.ShowBOF;
|
||||
var
|
||||
numBytes: Integer;
|
||||
@ -1162,16 +1245,58 @@ begin
|
||||
if FFormat = sfExcel2 then begin
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Cell protection and XF index:'#13);
|
||||
FDetails.Add(Format('Bits 5-0 = %d: XF Index', [b and $3F]));
|
||||
case b and $40 of
|
||||
0: FDetails.Add('Bit 6 = 0: Cell is NOT locked.');
|
||||
1: FDetails.Add('Bit 6 = 1: Cell is locked.');
|
||||
end;
|
||||
case b and $80 of
|
||||
0: FDetails.Add('Bit 7 = 0: Formula is NOT hidden.');
|
||||
1: FDetails.Add('Bit 7 = 1: Formula is hidden.');
|
||||
end;
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Cell protection and XF index');
|
||||
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Indexes to format and font records:'#13);
|
||||
FDetails.Add(Format('Bits 5-0 = %d: Index to FORMAT record', [b and $3f]));
|
||||
FDetails.Add(Format('Bits 7-6 = %d: Index to FONT record', [(b and $C0) shr 6]));
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Indexes of format and font records');
|
||||
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Cell style:'#13);
|
||||
case b and $07 of
|
||||
0: FDetails.Add('Bits 2-0 = 0: Horizontal alignment is GENERAL');
|
||||
1: FDetails.Add('Bits 2-0 = 1: Horizontal alignment is LEFT');
|
||||
2: FDetails.Add('Bits 2-0 = 2: Horizontal alignment is CENTERED');
|
||||
3: FDetails.Add('Bits 2-0 = 3: Horizontal alignment is RIGHT');
|
||||
4: FDetails.Add('Bits 2-0 = 4: Horizontal alignment is FILLED');
|
||||
end;
|
||||
if b and $08 = 0
|
||||
then FDetails.Add('Bit 3 = 0: Cell has NO left border')
|
||||
else FDetails.Add('Bit 3 = 1: Cell has left black border');
|
||||
if b and $10 = 0
|
||||
then FDetails.Add('Bit 4 = 0: Cell has NO right border')
|
||||
else FDetails.Add('Bit 4 = 1: Cell has right black border');
|
||||
if b and $20 = 0
|
||||
then FDetails.Add('Bit 5 = 0: Cell has NO top border')
|
||||
else FDetails.Add('Bit 5 = 1: Cell has top black border');
|
||||
if b and $40 = 0
|
||||
then FDetails.Add('Bit 6 = 0: Cell has NO bottom border')
|
||||
else FDetails.Add('Bit 6 = 1: Cell has bottom black border');
|
||||
if b and $80 = 0
|
||||
then FDetails.Add('Bit 7 = 0: Cell has NO shaded background')
|
||||
else FDetails.Add('Bit 7 = 1: Cell has shaded background');
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numbytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Cell style');
|
||||
end else begin
|
||||
@ -1692,12 +1817,56 @@ begin
|
||||
|
||||
numBytes := 1;
|
||||
b := FBuffer[FBufferIndex];
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Cell protection and XF index:'#13);
|
||||
FDetails.Add(Format('Bits 5-0 = %d: XF Index', [b and $3F]));
|
||||
case b and $40 of
|
||||
0: FDetails.Add('Bit 6 = 0: Cell is NOT locked.');
|
||||
1: FDetails.Add('Bit 6 = 1: Cell is locked.');
|
||||
end;
|
||||
case b and $80 of
|
||||
0: FDetails.Add('Bit 7 = 0: Formula is NOT hidden.');
|
||||
1: FDetails.Add('Bit 7 = 1: Formula is hidden.');
|
||||
end;
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Cell protection and XF index');
|
||||
|
||||
b := FBuffer[FBufferIndex];
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Indexes to format and font records:'#13);
|
||||
FDetails.Add(Format('Bits 5-0 = %d: Index to FORMAT record', [b and $3f]));
|
||||
FDetails.Add(Format('Bits 7-6 = %d: Index to FONT record', [(b and $C0) shr 6]));
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Indexes of format and font records');
|
||||
|
||||
b := FBuffer[FBufferIndex];
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Cell style:'#13);
|
||||
case b and $07 of
|
||||
0: FDetails.Add('Bits 2-0 = 0: Horizontal alignment is GENERAL');
|
||||
1: FDetails.Add('Bits 2-0 = 1: Horizontal alignment is LEFT');
|
||||
2: FDetails.Add('Bits 2-0 = 2: Horizontal alignment is CENTERED');
|
||||
3: FDetails.Add('Bits 2-0 = 3: Horizontal alignment is RIGHT');
|
||||
4: FDetails.Add('Bits 2-0 = 4: Horizontal alignment is FILLED');
|
||||
end;
|
||||
if b and $08 = 0
|
||||
then FDetails.Add('Bit 3 = 0: Cell has NO left border')
|
||||
else FDetails.Add('Bit 3 = 1: Cell has left black border');
|
||||
if b and $10 = 0
|
||||
then FDetails.Add('Bit 4 = 0: Cell has NO right border')
|
||||
else FDetails.Add('Bit 4 = 1: Cell has right black border');
|
||||
if b and $20 = 0
|
||||
then FDetails.Add('Bit 5 = 0: Cell has NO top border')
|
||||
else FDetails.Add('Bit 5 = 1: Cell has top black border');
|
||||
if b and $40 = 0
|
||||
then FDetails.Add('Bit 6 = 0: Cell has NO bottom border')
|
||||
else FDetails.Add('Bit 6 = 1: Cell has bottom black border');
|
||||
if b and $80 = 0
|
||||
then FDetails.Add('Bit 7 = 0: Cell has NO shaded background')
|
||||
else FDetails.Add('Bit 7 = 1: Cell has shaded background');
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numbytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Cell style');
|
||||
|
||||
@ -1765,16 +1934,58 @@ begin
|
||||
if (FFormat = sfExcel2) then begin
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Cell protection and XF index:'#13);
|
||||
FDetails.Add(Format('Bits 5-0 = %d: XF Index', [b and $3F]));
|
||||
case b and $40 of
|
||||
0: FDetails.Add('Bit 6 = 0: Cell is NOT locked.');
|
||||
1: FDetails.Add('Bit 6 = 1: Cell is locked.');
|
||||
end;
|
||||
case b and $80 of
|
||||
0: FDetails.Add('Bit 7 = 0: Formula is NOT hidden.');
|
||||
1: FDetails.Add('Bit 7 = 1: Formula is hidden.');
|
||||
end;
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Cell protection and XF index');
|
||||
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Indexes to format and font records:'#13);
|
||||
FDetails.Add(Format('Bits 5-0 = %d: Index to FORMAT record', [b and $3f]));
|
||||
FDetails.Add(Format('Bits 7-6 = %d: Index to FONT record', [(b and $C0) shr 6]));
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Indexes of format and font records');
|
||||
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Cell style:'#13);
|
||||
case b and $07 of
|
||||
0: FDetails.Add('Bits 2-0 = 0: Horizontal alignment is GENERAL');
|
||||
1: FDetails.Add('Bits 2-0 = 1: Horizontal alignment is LEFT');
|
||||
2: FDetails.Add('Bits 2-0 = 2: Horizontal alignment is CENTERED');
|
||||
3: FDetails.Add('Bits 2-0 = 3: Horizontal alignment is RIGHT');
|
||||
4: FDetails.Add('Bits 2-0 = 4: Horizontal alignment is FILLED');
|
||||
end;
|
||||
if b and $08 = 0
|
||||
then FDetails.Add('Bit 3 = 0: Cell has NO left border')
|
||||
else FDetails.Add('Bit 3 = 1: Cell has left black border');
|
||||
if b and $10 = 0
|
||||
then FDetails.Add('Bit 4 = 0: Cell has NO right border')
|
||||
else FDetails.Add('Bit 4 = 1: Cell has right black border');
|
||||
if b and $20 = 0
|
||||
then FDetails.Add('Bit 5 = 0: Cell has NO top border')
|
||||
else FDetails.Add('Bit 5 = 1: Cell has top black border');
|
||||
if b and $40 = 0
|
||||
then FDetails.Add('Bit 6 = 0: Cell has NO bottom border')
|
||||
else FDetails.Add('Bit 6 = 1: Cell has bottom black border');
|
||||
if b and $80 = 0
|
||||
then FDetails.Add('Bit 7 = 0: Cell has NO shaded background')
|
||||
else FDetails.Add('Bit 7 = 1: Cell has shaded background');
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numbytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Cell style');
|
||||
end else begin
|
||||
@ -1908,16 +2119,58 @@ begin
|
||||
if FFormat = sfExcel2 then begin
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Cell protection and XF index:'#13);
|
||||
FDetails.Add(Format('Bits 5-0 = %d: XF Index', [b and $3F]));
|
||||
case b and $40 of
|
||||
0: FDetails.Add('Bit 6 = 0: Cell is NOT locked.');
|
||||
1: FDetails.Add('Bit 6 = 1: Cell is locked.');
|
||||
end;
|
||||
case b and $80 of
|
||||
0: FDetails.Add('Bit 7 = 0: Formula is NOT hidden.');
|
||||
1: FDetails.Add('Bit 7 = 1: Formula is hidden.');
|
||||
end;
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Cell protection and XF index');
|
||||
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Indexes to format and font records:'#13);
|
||||
FDetails.Add(Format('Bits 5-0 = %d: Index to FORMAT record', [b and $3f]));
|
||||
FDetails.Add(Format('Bits 7-6 = %d: Index to FONT record', [(b and $C0) shr 6]));
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Indexes of format and font records');
|
||||
|
||||
numBytes := 1;
|
||||
Move(FBuffer[FBufferIndex], b, numBytes);
|
||||
if Row = FCurrRow then begin
|
||||
FDetails.Add('Cell style:'#13);
|
||||
case b and $07 of
|
||||
0: FDetails.Add('Bits 2-0 = 0: Horizontal alignment is GENERAL');
|
||||
1: FDetails.Add('Bits 2-0 = 1: Horizontal alignment is LEFT');
|
||||
2: FDetails.Add('Bits 2-0 = 2: Horizontal alignment is CENTERED');
|
||||
3: FDetails.Add('Bits 2-0 = 3: Horizontal alignment is RIGHT');
|
||||
4: FDetails.Add('Bits 2-0 = 4: Horizontal alignment is FILLED');
|
||||
end;
|
||||
if b and $08 = 0
|
||||
then FDetails.Add('Bit 3 = 0: Cell has NO left border')
|
||||
else FDetails.Add('Bit 3 = 1: Cell has left black border');
|
||||
if b and $10 = 0
|
||||
then FDetails.Add('Bit 4 = 0: Cell has NO right border')
|
||||
else FDetails.Add('Bit 4 = 1: Cell has right black border');
|
||||
if b and $20 = 0
|
||||
then FDetails.Add('Bit 5 = 0: Cell has NO top border')
|
||||
else FDetails.Add('Bit 5 = 1: Cell has top black border');
|
||||
if b and $40 = 0
|
||||
then FDetails.Add('Bit 6 = 0: Cell has NO bottom border')
|
||||
else FDetails.Add('Bit 6 = 1: Cell has bottom black border');
|
||||
if b and $80 = 0
|
||||
then FDetails.Add('Bit 7 = 0: Cell has NO shaded background')
|
||||
else FDetails.Add('Bit 7 = 1: Cell has shaded background');
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numbytes, Format('%d ($%.2x)', [b,b]),
|
||||
'Cell style');
|
||||
end else begin
|
||||
@ -3052,7 +3305,7 @@ begin
|
||||
then FDetails.Add('Bit 7 = 0: Formula is not hidden')
|
||||
else FDetails.Add('Bit 7 = 1: Formula is hidden');
|
||||
end;
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('$%.2x', [b]),
|
||||
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('%d ($%.2x)', [b, b]),
|
||||
'Number format and cell flags');
|
||||
|
||||
b := FBuffer[FBufferIndex];
|
||||
|
@ -90,18 +90,18 @@ end;
|
||||
function RecTypeName(ARecType: Word): String;
|
||||
begin
|
||||
case ARecType of
|
||||
$0000: Result := 'Dimension';
|
||||
$0001: Result := 'Blank';
|
||||
$0002: Result := 'Integer';
|
||||
$0003: Result := 'Number';
|
||||
$0004: Result := 'Label';
|
||||
$0000: Result := 'DIMENSION';
|
||||
$0001: Result := 'BLANK';
|
||||
$0002: Result := 'INTEGER';
|
||||
$0003: Result := 'NUMBER';
|
||||
$0004: Result := 'LABEL';
|
||||
$0005: Result := 'BoolErr';
|
||||
$0006: Result := 'Formula';
|
||||
$0007: Result := 'String';
|
||||
$0008: Result := 'Row';
|
||||
$0006: Result := 'FORMULA';
|
||||
$0007: Result := 'STRING';
|
||||
$0008: Result := 'ROW';
|
||||
$0009: Result := 'BOF';
|
||||
$000A: Result := 'EOF: End of file';
|
||||
$000B: Result := 'Index';
|
||||
$000B: Result := 'INDEX';
|
||||
$000C: Result := 'CALCCOUNT: Iteration count';
|
||||
$000D: Result := 'CALCMODE: Calculation mode';
|
||||
$000E: Result := 'PRECISION: Precision';
|
||||
@ -119,14 +119,14 @@ begin
|
||||
$001A: Result := 'VERTICALPAGEBREAKS: Explicit column page breaks';
|
||||
$001B: Result := 'HORIZONALPAGEBREAKS: Explicit row page breaks';
|
||||
$001C: Result := 'NOTE: Comment associated with a cell';
|
||||
$001D: Result := 'SELECTION: current selection';
|
||||
$001E: Result := 'Format';
|
||||
$001F: Result := 'BuiltInFmtCount';
|
||||
$001D: Result := 'SELECTION: Current selection';
|
||||
$001E: Result := 'FORMAT: Number format record';
|
||||
$001F: Result := 'FORMATCOUNT: Count of number formats';
|
||||
$0020: Result := 'ColumnDefault';
|
||||
$0021: Result := 'Array';
|
||||
$0022: Result := '1904: 1904 date system';
|
||||
$0023: Result := 'ExternalName';
|
||||
$0024: Result := 'ColWidth';
|
||||
$0024: Result := 'COLWIDTH';
|
||||
$0025: Result := 'DefaultRowHeight';
|
||||
$0026: Result := 'LEFTMARGIN: Left margin measurement';
|
||||
$0027: Result := 'RIGHTMARGIN: Right margin measurement';
|
||||
@ -136,19 +136,19 @@ begin
|
||||
$002B: Result := 'PRINTGRIDLINES: Print gridlines flag';
|
||||
$002F: Result := 'FILEPASS: File is password-protected';
|
||||
$0031: Result := 'FONT: Font and font formatting information';
|
||||
$0032: Result := 'Font2';
|
||||
$0032: Result := 'FONT2';
|
||||
$0033: Result := 'PRINTSIZE: Printed size of chart';
|
||||
$0036: Result := 'DataTable';
|
||||
$0037: Result := 'DateTable2';
|
||||
$003C: Result := 'CONTINUE: Continues long records';
|
||||
$003D: Result := 'WINDOW1: Window information';
|
||||
$003E: Result := 'Window2';
|
||||
$003E: Result := 'WINDOW2';
|
||||
$0040: Result := 'BACKUP: Save backup version of the file';
|
||||
$0041: Result := 'PANE: Number of panes and their position';
|
||||
$0042: Result := 'CODEPAGE: Default code page'; // also: CODENAME: VBE object name ???
|
||||
$0043: Result := 'XF: Extended f';
|
||||
$0043: Result := 'XF: Extended format';
|
||||
$0044: Result := 'IXFE';
|
||||
$0045: Result := 'FontColor';
|
||||
$0045: Result := 'FONTCOLOR';
|
||||
$004D: Result := 'PLS: Environment-specific print record';
|
||||
$0050: Result := 'DCON: Data consolidation information';
|
||||
$0051: Result := 'DCONREF: Data consolidation references';
|
||||
@ -287,7 +287,7 @@ begin
|
||||
$0231: Result := 'FONT: Font description';
|
||||
$0236: Result := 'TABLE: Data table';
|
||||
$023E: Result := 'WINDOW2: Sheet window information';
|
||||
$0243: Result := 'XF';
|
||||
$0243: Result := 'XF: Extended format';
|
||||
$027E: Result := 'RK';
|
||||
$0293: Result := 'STYLE: Style information';
|
||||
$0406: Result := 'FORMULA: Cell formula';
|
||||
|
@ -62,30 +62,97 @@ object MainForm: TMainForm
|
||||
ClientHeight = 507
|
||||
ClientWidth = 665
|
||||
TabOrder = 2
|
||||
object HexSplitter: TSplitter
|
||||
object PageControl: TPageControl
|
||||
Left = 0
|
||||
Height = 507
|
||||
Top = 0
|
||||
Width = 665
|
||||
ActivePage = PgValues
|
||||
Align = alClient
|
||||
TabIndex = 1
|
||||
TabOrder = 0
|
||||
OnChange = PageControlChange
|
||||
object PgAnalysis: TTabSheet
|
||||
Caption = 'Analysis'
|
||||
ClientHeight = 479
|
||||
ClientWidth = 657
|
||||
object AnalysisDetails: TMemo
|
||||
Left = 0
|
||||
Height = 191
|
||||
Top = 288
|
||||
Width = 657
|
||||
Align = alBottom
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Height = -12
|
||||
Font.Name = 'Courier New'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqDraft
|
||||
ParentFont = False
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 0
|
||||
WordWrap = False
|
||||
end
|
||||
object DetailsSplitter: TSplitter
|
||||
Cursor = crVSplit
|
||||
Left = 0
|
||||
Height = 5
|
||||
Top = 244
|
||||
Width = 665
|
||||
Top = 283
|
||||
Width = 657
|
||||
Align = alBottom
|
||||
ResizeAnchor = akBottom
|
||||
end
|
||||
end
|
||||
object PgValues: TTabSheet
|
||||
Caption = 'Values'
|
||||
ClientHeight = 479
|
||||
ClientWidth = 657
|
||||
object ValueGrid: TStringGrid
|
||||
Left = 0
|
||||
Height = 158
|
||||
Top = 321
|
||||
Width = 657
|
||||
Align = alBottom
|
||||
ColCount = 3
|
||||
DefaultColWidth = 100
|
||||
FixedCols = 0
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goDrawFocusSelected, goColSizing, goSmoothScroll]
|
||||
RowCount = 9
|
||||
TabOrder = 0
|
||||
TitleStyle = tsNative
|
||||
OnPrepareCanvas = ValueGridPrepareCanvas
|
||||
ColWidths = (
|
||||
112
|
||||
142
|
||||
141
|
||||
)
|
||||
Cells = (
|
||||
3
|
||||
0
|
||||
0
|
||||
'Data type'
|
||||
1
|
||||
0
|
||||
'Value'
|
||||
2
|
||||
0
|
||||
'Offset range'
|
||||
)
|
||||
end
|
||||
object HexPanel: TPanel
|
||||
Left = 0
|
||||
Height = 244
|
||||
Height = 316
|
||||
Top = 0
|
||||
Width = 665
|
||||
Width = 657
|
||||
Align = alClient
|
||||
Caption = 'HexPanel'
|
||||
ClientHeight = 244
|
||||
ClientWidth = 665
|
||||
ClientHeight = 316
|
||||
ClientWidth = 657
|
||||
TabOrder = 1
|
||||
object HexGrid: TStringGrid
|
||||
Left = 1
|
||||
Height = 242
|
||||
Height = 314
|
||||
Top = 1
|
||||
Width = 398
|
||||
Width = 390
|
||||
Align = alClient
|
||||
AutoFillColumns = True
|
||||
ColCount = 17
|
||||
@ -115,7 +182,7 @@ object MainForm: TMainForm
|
||||
22
|
||||
22
|
||||
22
|
||||
36
|
||||
28
|
||||
)
|
||||
Cells = (
|
||||
16
|
||||
@ -170,8 +237,8 @@ object MainForm: TMainForm
|
||||
)
|
||||
end
|
||||
object AlphaGrid: TStringGrid
|
||||
Left = 404
|
||||
Height = 242
|
||||
Left = 396
|
||||
Height = 314
|
||||
Top = 1
|
||||
Width = 260
|
||||
Align = alRight
|
||||
@ -255,88 +322,22 @@ object MainForm: TMainForm
|
||||
)
|
||||
end
|
||||
object HexDumpSplitter: TSplitter
|
||||
Left = 399
|
||||
Height = 242
|
||||
Left = 391
|
||||
Height = 314
|
||||
Top = 1
|
||||
Width = 5
|
||||
Align = alRight
|
||||
ResizeAnchor = akRight
|
||||
end
|
||||
end
|
||||
object PageControl: TPageControl
|
||||
object HexSplitter: TSplitter
|
||||
Cursor = crVSplit
|
||||
Left = 0
|
||||
Height = 258
|
||||
Top = 249
|
||||
Width = 665
|
||||
ActivePage = PgValues
|
||||
Align = alBottom
|
||||
TabIndex = 1
|
||||
TabOrder = 2
|
||||
OnChange = PageControlChange
|
||||
object PgAnalysis: TTabSheet
|
||||
Caption = 'Analysis'
|
||||
ClientHeight = 225
|
||||
ClientWidth = 657
|
||||
object AnalysisDetails: TMemo
|
||||
Left = 428
|
||||
Height = 225
|
||||
Top = 0
|
||||
Width = 229
|
||||
Align = alRight
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Height = -12
|
||||
Font.Name = 'Courier New'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqDraft
|
||||
ParentFont = False
|
||||
ScrollBars = ssAutoBoth
|
||||
TabOrder = 0
|
||||
WordWrap = False
|
||||
end
|
||||
object DetailsSplitter: TSplitter
|
||||
Left = 423
|
||||
Height = 225
|
||||
Top = 0
|
||||
Width = 5
|
||||
Align = alRight
|
||||
ResizeAnchor = akRight
|
||||
end
|
||||
end
|
||||
object PgValues: TTabSheet
|
||||
Caption = 'Values'
|
||||
ClientHeight = 230
|
||||
ClientWidth = 657
|
||||
object ValueGrid: TStringGrid
|
||||
Left = 0
|
||||
Height = 230
|
||||
Top = 0
|
||||
Height = 5
|
||||
Top = 316
|
||||
Width = 657
|
||||
Align = alClient
|
||||
ColCount = 3
|
||||
DefaultColWidth = 100
|
||||
FixedCols = 0
|
||||
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goDrawFocusSelected, goColSizing, goSmoothScroll]
|
||||
RowCount = 9
|
||||
TabOrder = 0
|
||||
TitleStyle = tsNative
|
||||
OnPrepareCanvas = ValueGridPrepareCanvas
|
||||
ColWidths = (
|
||||
112
|
||||
142
|
||||
141
|
||||
)
|
||||
Cells = (
|
||||
3
|
||||
0
|
||||
0
|
||||
'Data type'
|
||||
1
|
||||
0
|
||||
'Value'
|
||||
2
|
||||
0
|
||||
'Offset range'
|
||||
)
|
||||
Align = alBottom
|
||||
ResizeAnchor = akBottom
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -514,7 +515,7 @@ object MainForm: TMainForm
|
||||
Align = alClient
|
||||
ButtonStyle = bsTriangle
|
||||
DefaultText = 'Node'
|
||||
Header.AutoSizeIndex = 3
|
||||
Header.AutoSizeIndex = 4
|
||||
Header.Columns = <
|
||||
item
|
||||
Alignment = taRightJustify
|
||||
@ -539,10 +540,16 @@ object MainForm: TMainForm
|
||||
Width = 130
|
||||
end
|
||||
item
|
||||
MinWidth = 80
|
||||
Alignment = taCenter
|
||||
MinWidth = 50
|
||||
Position = 3
|
||||
Text = 'Index'
|
||||
end
|
||||
item
|
||||
MinWidth = 80
|
||||
Position = 4
|
||||
Text = 'Record description'
|
||||
Width = 125
|
||||
Width = 80
|
||||
end>
|
||||
Header.DefaultHeight = 24
|
||||
Header.Font.Style = [fsBold]
|
||||
|
@ -22,6 +22,7 @@ type
|
||||
RecordID: Integer;
|
||||
RecordName: String;
|
||||
RecordDescription: String;
|
||||
Index: Integer;
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
@ -131,6 +132,10 @@ type
|
||||
FFormat: TsSpreadsheetFormat;
|
||||
FBuffer: TBIFFBuffer;
|
||||
FCurrOffset: Integer;
|
||||
FXFIndex: Integer;
|
||||
FFontIndex: Integer;
|
||||
FFormatIndex: Integer;
|
||||
FRowIndex: Integer;
|
||||
FLockHexDumpGrids: Integer;
|
||||
FAnalysisGrid: TBIFFGrid;
|
||||
FMRUMenuManager : TMRUMenuManager;
|
||||
@ -446,7 +451,8 @@ begin
|
||||
0: CellText := IntToStr(data.Offset);
|
||||
1: CellText := Format('$%.4x', [data.RecordID]);
|
||||
2: CellText := data.RecordName;
|
||||
3: CellText := data.RecordDescription;
|
||||
3: if data.Index > -1 then CellText := IntToStr(data.Index);
|
||||
4: CellText := data.RecordDescription;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -589,6 +595,11 @@ 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;
|
||||
@ -1000,7 +1011,7 @@ begin
|
||||
try
|
||||
ReadFormFromIni(ini, 'MainForm', self);
|
||||
|
||||
BiffTree.Width := ini.ReadInteger('MainForm', 'RecordList_Width', BiffTree.Width);
|
||||
TreePanel.Width := ini.ReadInteger('MainForm', 'RecordList_Width', TreePanel.Width);
|
||||
for i:=0 to BiffTree.Header.Columns.Count-1 do
|
||||
BiffTree.Header.Columns[i].Width := ini.ReadInteger('MainForm',
|
||||
Format('RecordList_ColWidth_%d', [i+1]), BiffTree.Header.Columns[i].Width);
|
||||
@ -1010,7 +1021,7 @@ begin
|
||||
ValueGrid.ColWidths[i] := ini.ReadInteger('MainForm',
|
||||
Format('ValueGrid_ColWidth_%d', [i+1]), ValueGrid.ColWidths[i]);
|
||||
|
||||
AlphaGrid.Width := ini.ReadInteger('MainForm', 'AlphaGrid_Width', AlphaGrid.Width);
|
||||
AlphaGrid.Height := ini.ReadInteger('MainForm', 'AlphaGrid_Height', AlphaGrid.Height);
|
||||
for i:=0 to AlphaGrid.ColCount-1 do
|
||||
AlphaGrid.ColWidths[i] := ini.ReadInteger('MainForm',
|
||||
Format('AlphaGrid_ColWidth_%d', [i+1]), AlphaGrid.ColWidths[i]);
|
||||
@ -1019,9 +1030,8 @@ begin
|
||||
FAnalysisGrid.ColWidths[i] := ini.ReadInteger('MainForm',
|
||||
Format('AnalysisGrid_ColWidth_%d', [i+1]), FAnalysisGrid.ColWidths[i]);
|
||||
|
||||
AnalysisDetails.Width := ini.ReadInteger('MainForm', 'AnalysisDetails_Width', AnalysisDetails.Width);
|
||||
AnalysisDetails.Height := ini.ReadInteger('MainForm', 'AnalysisDetails_Height', AnalysisDetails.Height);
|
||||
|
||||
PageControl.Height := ini.ReadInteger('MainForm', 'PageControl_Height', PageControl.Height);
|
||||
PageControl.ActivePageIndex := ini.ReadInteger('MainForm', 'PageIndex', PageControl.ActivePageIndex);
|
||||
finally
|
||||
ini.Free;
|
||||
@ -1071,6 +1081,7 @@ begin
|
||||
parentnode := BIFFTree.AddChild(nil);
|
||||
ptr := BIFFTree.GetNodeData(parentnode);
|
||||
ptr^.Data := parentdata;
|
||||
FRowIndex := -1;
|
||||
end;
|
||||
// add node to parent node
|
||||
data := TBiffNodeData.Create;
|
||||
@ -1083,6 +1094,30 @@ begin
|
||||
data.RecordName := s;
|
||||
data.RecordDescription := '';
|
||||
end;
|
||||
case recType of
|
||||
$0008, $0208: // Row
|
||||
begin
|
||||
inc(FRowIndex);
|
||||
data.Index := FRowIndex;
|
||||
end;
|
||||
$0031, $0231: // Font record
|
||||
begin
|
||||
inc(FFontIndex);
|
||||
data.Index := FFontIndex;
|
||||
end;
|
||||
$0043, $00E0: // XF record
|
||||
begin
|
||||
inc(FXFIndex);
|
||||
data.Index := FXFIndex;
|
||||
end;
|
||||
$001E, $041E: // Format record
|
||||
begin
|
||||
inc(FFormatIndex);
|
||||
data.Index := FFormatIndex;
|
||||
end;
|
||||
else
|
||||
data.Index := -1;
|
||||
end;
|
||||
node := BIFFTree.AddChild(parentnode);
|
||||
ptr := BIFFTree.GetNodeData(node);
|
||||
ptr^.Data := data;
|
||||
@ -1143,7 +1178,7 @@ begin
|
||||
try
|
||||
WriteFormToIni(ini, 'MainForm', self);
|
||||
|
||||
ini.WriteInteger('MainForm', 'RecordList_Width', BiffTree.Width);
|
||||
ini.WriteInteger('MainForm', 'RecordList_Width', TreePanel.Width);
|
||||
for i:=0 to BiffTree.Header.Columns.Count-1 do
|
||||
ini.WriteInteger('MainForm', Format('RecordList_ColWidth_%d', [i+1]), BiffTree.Header.Columns[i].Width);
|
||||
|
||||
@ -1158,10 +1193,9 @@ begin
|
||||
for i:=0 to FAnalysisGrid.ColCount-1 do
|
||||
ini.WriteInteger('MainForm', Format('AnalysisGrid_ColWidth_%d', [i+1]), FAnalysisGrid.ColWidths[i]);
|
||||
|
||||
ini.WriteInteger('MainForm', 'AnalysisDetails_Width', AnalysisDetails.Width);
|
||||
ini.WriteInteger('MainForm', 'AnalysisDetails_Height', AnalysisDetails.Height);
|
||||
|
||||
ini.WriteInteger('MainForm', 'PageIndex', PageControl.ActivePageIndex);
|
||||
ini.WriteInteger('MainForm', 'PageControl_Height', PageControl.Height);
|
||||
finally
|
||||
ini.Free;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user