From 33924c97bd34e2ab3f08dab218bbc14694480bc9 Mon Sep 17 00:00:00 2001 From: bigchimp Date: Wed, 25 Jun 2014 12:44:02 +0000 Subject: [PATCH] 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 --- .../reference/BIFFExplorer/BIFFExplorer.lpi | 17 ----------------- .../reference/BIFFExplorer/bebiffgrid.pas | 10 ++++++++-- .../reference/BIFFExplorer/beutils.pas | 2 ++ 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/components/fpspreadsheet/reference/BIFFExplorer/BIFFExplorer.lpi b/components/fpspreadsheet/reference/BIFFExplorer/BIFFExplorer.lpi index cdf19d04a..a074c35fb 100644 --- a/components/fpspreadsheet/reference/BIFFExplorer/BIFFExplorer.lpi +++ b/components/fpspreadsheet/reference/BIFFExplorer/BIFFExplorer.lpi @@ -56,11 +56,7 @@ - - - - @@ -98,11 +94,7 @@ - - - - @@ -136,7 +128,6 @@ - @@ -144,7 +135,6 @@ - @@ -154,12 +144,10 @@ - - @@ -177,7 +165,6 @@ - @@ -215,11 +202,7 @@ - - - - diff --git a/components/fpspreadsheet/reference/BIFFExplorer/bebiffgrid.pas b/components/fpspreadsheet/reference/BIFFExplorer/bebiffgrid.pas index db66d2d19..0661bd8b6 100644 --- a/components/fpspreadsheet/reference/BIFFExplorer/bebiffgrid.pas +++ b/components/fpspreadsheet/reference/BIFFExplorer/bebiffgrid.pas @@ -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); diff --git a/components/fpspreadsheet/reference/BIFFExplorer/beutils.pas b/components/fpspreadsheet/reference/BIFFExplorer/beutils.pas index f3044e475..f6409a865 100644 --- a/components/fpspreadsheet/reference/BIFFExplorer/beutils.pas +++ b/components/fpspreadsheet/reference/BIFFExplorer/beutils.pas @@ -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';