From 1da8569c84ea62865a75f56e9f7fa3983dcf22a0 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Thu, 9 Aug 2018 22:42:36 +0000 Subject: [PATCH] fpspreadsheet: Fix reading of IF formulas written by Excel (modified patch by Soner, https://forum.lazarus.freepascal.org/index.php/topic,42168.msg293864.html#msg293864). git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6578 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/common/xlscommon.pas | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/fpspreadsheet/source/common/xlscommon.pas b/components/fpspreadsheet/source/common/xlscommon.pas index d9be2fb1f..f3482ad31 100644 --- a/components/fpspreadsheet/source/common/xlscommon.pas +++ b/components/fpspreadsheet/source/common/xlscommon.pas @@ -2531,6 +2531,8 @@ begin Result := false; case AIdentifier of $01: AStream.ReadWord; // tAttrVolatile token, data not used + $02: AStream.ReadWord; // tAttrIf token, data not used + $08: AStream.ReadWord; // tAttrSkip token, data not used $10: AStream.ReadWord; // tAttrSum token, data not used else exit; // others not supported by fps --> Result = false end; @@ -2943,10 +2945,8 @@ begin supported := ReadRPNAttr(AStream, b); if supported then begin case b of - $10: - begin // one-parameter sum - rpnItem := RPNFunc('SUM', 1, rpnItem) - end; + $02: ; + $10: rpnItem := RPNFunc('SUM', 1, rpnItem); // one-parameter SUM end; end; end;