From 934e210a4fb00e8337dfcc0977904156a259ecfc Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sat, 24 May 2014 18:20:30 +0000 Subject: [PATCH] fpspreadsheet: Fix incorrect dection of cell ranges when reading biff rpn formulas git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3090 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../examples/fpsgrid/fpsgrid.lpi | 84 +++++++++---------- components/fpspreadsheet/xlscommon.pas | 9 +- 2 files changed, 44 insertions(+), 49 deletions(-) diff --git a/components/fpspreadsheet/examples/fpsgrid/fpsgrid.lpi b/components/fpspreadsheet/examples/fpsgrid/fpsgrid.lpi index e3acf8cd8..13d62caca 100644 --- a/components/fpspreadsheet/examples/fpsgrid/fpsgrid.lpi +++ b/components/fpspreadsheet/examples/fpsgrid/fpsgrid.lpi @@ -150,7 +150,6 @@ - @@ -264,10 +263,11 @@ + - - + + @@ -291,8 +291,8 @@ - - + + @@ -599,124 +599,124 @@ - - + + - + - + - + - + - - + + - + - - + + - + - + - + - - + + - + - + - + - - + + - + - - + + - + - + - + - + - + - + - + - + - + - - + + - + - + diff --git a/components/fpspreadsheet/xlscommon.pas b/components/fpspreadsheet/xlscommon.pas index c8d18c025..87eab0a64 100644 --- a/components/fpspreadsheet/xlscommon.pas +++ b/components/fpspreadsheet/xlscommon.pas @@ -1431,17 +1431,12 @@ begin while (AStream.Position < p0 + n) and supported do begin token := AStream.ReadByte; case token of - INT_EXCEL_TOKEN_TREFV: - begin; - ReadRPNCellAddress(AStream, r, c, flags); - rpnItem := RPNCellValue(r, c, flags, rpnItem); - end; - INT_EXCEL_TOKEN_TREFR: + INT_EXCEL_TOKEN_TREFV, INT_EXCEL_TOKEN_TREFR: begin ReadRPNCellAddress(AStream, r, c, flags); rpnItem := RPNCellRef(r, c, flags, rpnItem); end; - INT_EXCEL_TOKEN_TREFA: + INT_EXCEL_TOKEN_TAREA_R, INT_EXCEL_TOKEN_TAREA_V: begin ReadRPNCellRangeAddress(AStream, r, c, r2, c2, flags); rpnItem := RPNCellRange(r, c, r2, c2, flags, rpnItem);