fpspreadsheet: Handle numeric cells strings in TUPlusExprNode of the formula parser.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8247 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2022-04-08 17:18:11 +00:00
parent 520e94f2d7
commit c5c3755b64

View File

@@ -3168,6 +3168,7 @@ end;
procedure TsUPlusExprNode.GetNodeValue(out Result: TsExpressionResult);
var
cell: PCell;
val: Extended;
begin
Operand.GetNodeValue(Result);
case Result.ResultType of
@@ -3179,6 +3180,12 @@ begin
if cell = nil then
Result := FloatResult(0.0)
else
if (cell^.ContentType = cctUTF8String) then begin
if TryStrToFloat(cell^.UTF8StringValue, val) then
Result := FloatResult(val)
else
Result := ErrorResult(errWrongType);
end else
if cell^.ContentType = cctNumber then
begin
if (frac(cell^.NumberValue) = 0.0) and