You've already forked lazarus-ccr
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:
@ -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,8 +4492,10 @@ begin
|
||||
if not TryStrToFloat(s, Result, fs) then
|
||||
Result := NaN;
|
||||
end;
|
||||
cctError:
|
||||
Result := NaN;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user