fpspreadsheet: Fix 2nd parameter of formula HYPERLINK

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3996 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2015-03-05 21:47:27 +00:00
parent 52515073d2
commit 7dc4fd2a7e

View File

@ -4087,11 +4087,20 @@ var
cell: PCell;
fs: TFormatSettings;
dt: TDateTime;
p: Integer;
s: String;
begin
Result := '';
case Arg.ResultType of
rtString,
rtHyperlink : result := Arg.ResString;
rtString : result := Arg.ResString;
rtHyperlink : begin
s := Arg.ResString;
p := pos(HYPERLINK_SEPARATOR, s);
if p = 0 then
Result := s
else
Result := Copy(s, p + Length(HYPERLINK_SEPARATOR), Length(s));
end;
rtInteger : Result := IntToStr(Arg.ResInteger);
rtFloat : Result := FloatToStr(Arg.ResFloat);
rtBoolean : if Arg.ResBoolean then Result := '1' else Result := '0';