biffexplorer: Fix display of protection items.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5796 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2017-03-06 23:31:48 +00:00
parent 4505fb76cd
commit dfc01330c2
2 changed files with 25 additions and 4 deletions

View File

@ -11,8 +11,6 @@
<UseXPManifest Value="True"/> <UseXPManifest Value="True"/>
<XPManifest> <XPManifest>
<DpiAware Value="True"/> <DpiAware Value="True"/>
<TextName Value="CompanyName.ProductName.AppName"/>
<TextDesc Value="Your application description."/>
</XPManifest> </XPManifest>
<Icon Value="0"/> <Icon Value="0"/>
</General> </General>

View File

@ -91,6 +91,7 @@ type
procedure ShowNote; procedure ShowNote;
procedure ShowNumberCell; procedure ShowNumberCell;
procedure ShowObj; procedure ShowObj;
procedure ShowObjProtect;
procedure ShowPageSetup; procedure ShowPageSetup;
procedure ShowPalette; procedure ShowPalette;
procedure ShowPane; procedure ShowPane;
@ -493,6 +494,8 @@ begin
ShowObj; ShowObj;
$005F: $005F:
ShowRecalc; ShowRecalc;
$0063:
ShowObjProtect;
$007D: $007D:
ShowColInfo; ShowColInfo;
$0081: $0081:
@ -4290,11 +4293,11 @@ begin
if Row = FCurrRow then begin if Row = FCurrRow then begin
FDetails.Add('Cell protection and XF index:'#13); FDetails.Add('Cell protection and XF index:'#13);
FDetails.Add(Format('x Bits 5-0 = %d: XF Index', [b and $3F])); FDetails.Add(Format('x Bits 5-0 = %d: XF Index', [b and $3F]));
case b and $40 of case (b and $40) shr 6 of
0: FDetails.Add(' Bit 6 = 0: Cell is NOT locked.'); 0: FDetails.Add(' Bit 6 = 0: Cell is NOT locked.');
1: FDetails.Add('x Bit 6 = 1: Cell is locked.'); 1: FDetails.Add('x Bit 6 = 1: Cell is locked.');
end; end;
case b and $80 of case (b and $80) shr 7 of
0: FDetails.Add(' Bit 7 = 0: Formula is NOT hidden.'); 0: FDetails.Add(' Bit 7 = 0: Formula is NOT hidden.');
1: FDetails.Add('x Bit 7 = 1: Formula is hidden.'); 1: FDetails.Add('x Bit 7 = 1: Formula is hidden.');
end; end;
@ -4530,6 +4533,26 @@ begin
end; end;
procedure TBIFFGrid.ShowObjProtect;
var
numBytes: Integer;
w: Word;
begin
RowCount := FixedRows + 1;
numBytes := 2;
Move(FBuffer[FBufferIndex], w, numBytes);
w := WordLEToN(w);
if Row = FCurrRow then begin
FDetails.Add('Protection state of objects (drawings etc) in the workbook:'#13);
if w = 0
then FDetails.Add(' 0 = Objects are NOT protected.')
else FDetails.Add('x 1 = Objects are protected.');
end;
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('$%.4x', [w]),
'Protection state of objects in the workbook');
end;
procedure TBIFFGrid.ShowPageSetup; procedure TBIFFGrid.ShowPageSetup;
var var
numBytes: Integer; numBytes: Integer;