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
This commit is contained in:
wp_xxyyzz
2018-08-09 22:42:36 +00:00
parent ba5e4da9be
commit 1da8569c84

View File

@ -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;