fpspreadsheet: compile fix for BIFFExplorer: Excel3 & Excel4 no longer supported

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3239 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
bigchimp
2014-06-25 12:44:02 +00:00
parent 114d29d65a
commit 33924c97bd
3 changed files with 10 additions and 19 deletions

View File

@ -56,11 +56,7 @@
</Options>
</Linking>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-duse_new_ole"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</Item2>
@ -98,11 +94,7 @@
</Options>
</Linking>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-duse_new_ole"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</Item3>
@ -136,7 +128,6 @@
<Unit0>
<Filename Value="BIFFExplorer.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="BIFFExplorer"/>
</Unit0>
<Unit1>
<Filename Value="beabout.pas"/>
@ -144,7 +135,6 @@
<ComponentName Value="AboutForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="beAbout"/>
</Unit1>
<Unit2>
<Filename Value="bebiffgrid.pas"/>
@ -154,12 +144,10 @@
<Unit3>
<Filename Value="bebiffutils.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="beBIFFUtils"/>
</Unit3>
<Unit4>
<Filename Value="behtml.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="behtml"/>
</Unit4>
<Unit5>
<Filename Value="bemain.pas"/>
@ -177,7 +165,6 @@
<Unit7>
<Filename Value="mrumanager.pp"/>
<IsPartOfProject Value="True"/>
<UnitName Value="mrumanager"/>
</Unit7>
<Unit8>
<Filename Value="bemain.lfm"/>
@ -215,11 +202,7 @@
</Options>
</Linking>
<Other>
<CompilerMessages>
<MsgFileName Value=""/>
</CompilerMessages>
<CustomOptions Value="-duse_new_ole"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>

View File

@ -515,7 +515,9 @@ var
begin
case FFormat of
sfExcel2: RowCount := FixedRows + 2;
{ //Excel3 & 4 not supported by fpspreadsheet
sfExcel3, sfExcel4: RowCount := FixedRows + 3;
}
sfExcel5: RowCount := FixedRows + 4;
sfExcel8: RowCount := FixedRows + 6;
end;
@ -562,10 +564,12 @@ begin
if FFormat > sfExcel2 then begin
numBytes := 2;
Move(FBuffer[FBufferIndex], w, numBytes);
{ Excel3/4 not supported in fpSpreadsheet
if FFormat in [sfExcel3, sfExcel4] then
ShowInRow(FCurrRow, FBUfferIndex, numBytes, IntToStr(WordLEToN(w)),
'not used')
else begin
else}
begin
ShowInRow(FCurrRow, FBufferIndex, numBytes, IntToStr(WordLEToN(w)),
'Build identifier (must not be zero)');
@ -2592,6 +2596,8 @@ begin
ShowInRow(FCurrRow, FBufferIndex, numBytes, IntToStr(w),
'Fit worksheet height to this number of pages (0 = use as many as needed)');
{ Excel4 not supported in fpspreadsheet }
{
if FFormat = sfExcel4 then begin
Move(FBuffer[FBufferIndex], w, numbytes);
w := WordLETON(w);
@ -2614,7 +2620,7 @@ begin
end;
ShowInRow(FCurrRow, FBufferIndex, numBytes, Format('$%.4x (%d)', [w, w]),
'Option flags');
end else
end else }
if (FFormat in [sfExcel5, sfExcel8]) then begin
Move(FBuffer[FBufferIndex], w, numBytes);
w := WordLEToN(w);

View File

@ -68,8 +68,10 @@ function GetFileFormatName(AFormat: TsSpreadsheetFormat): string;
begin
case AFormat of
sfExcel2 : Result := 'BIFF2';
{ Excel3/4 not supported fpspreadsheet
sfExcel3 : Result := 'BIFF3';
sfExcel4 : Result := 'BIFF4';
}
sfExcel5 : Result := 'BIFF5';
sfExcel8 : Result := 'BIFF8';
sfooxml : Result := 'OOXML';