fpspreadsheet: Fix formula parser ignoring errors in binary nodes (see https://forum.lazarus.freepascal.org/index.php/topic,44426.0.html)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6819 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-02-26 09:03:12 +00:00
parent 748fea48a1
commit 8e86543dde

View File

@ -3531,9 +3531,10 @@ var
LRes, RRes: TsExpressionResult;
fL, fR: TsExprFloat;
begin
{
if HasError(AResult) then
exit;
}
Left.GetNodeValue(LRes);
Right.GetNodeValue(RRes);
@ -3567,9 +3568,10 @@ var
lRes, RRes: TsExpressionResult;
fL, fR: TsExprFloat;
begin
{
if HasError(AResult) then
exit;
}
Left.GetNodeValue(LRes);
Right.GetNodeValue(RRes);
@ -3603,9 +3605,10 @@ var
LRes, RRes: TsExpressionResult;
fL, fR: TsExprFloat;
begin
{
if HasError(AResult) then
exit;
}
Left.GetNodeValue(LRes);
Right.GetNodeValue(RRes);
fL := ArgToFloat(LRes);
@ -3642,9 +3645,10 @@ var
LRes, RRes: TsExpressionResult;
fL, fR: TsExprFloat;
begin
{
if HasError(AResult) then
exit;
}
Left.GetNodeValue(LRes);
Right.GetNodeValue(RRes);
@ -3690,9 +3694,10 @@ var
LRes, RRes: TsExpressionResult;
fL, fR: TsExprFloat;
begin
{
if HasError(AResult) then
exit;
}
Left.GetNodeValue(LRes);
Right.GetNodeValue(RRes);
fL := ArgToFloat(LRes);
@ -4469,6 +4474,7 @@ begin
rtBoolean : if Arg.ResBoolean then Result := 1.0;
rtString,
rtHyperlink : TryStrToFloat(ArgToString(Arg), Result);
rtError : Result := NaN;
rtCell : begin
cell := ArgToCell(Arg);
if Assigned(cell) then
@ -4486,6 +4492,8 @@ begin
if not TryStrToFloat(s, Result, fs) then
Result := NaN;
end;
cctError:
Result := NaN;
end;
end;
end;