fpspreadsheet: Avoid duplicate assignment of Result in TsWorksheet.ReadAsText. Put Hyperlink code used here in more general context.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7172 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-10-26 11:15:21 +00:00
parent 8c879bfca5
commit 5bd2fd23eb

View File

@ -2839,6 +2839,7 @@ begin
numFmt := Workbook.GetNumberFormat(fmt^.NumberFormatIndex);
with ACell^ do
begin
case ContentType of
cctUTF8String:
Result := UTF8StringValue;
@ -2868,15 +2869,15 @@ begin
cctError:
Result := GetErrorValueStr(TsErrorValue(ErrorValue));
else // blank --> display hyperlink target if available
Result := '';
if HasHyperlink(ACell) then
begin
hyperlink := FindHyperlink(ACell);
if hyperlink <> nil then Result := hyperlink^.Target;
end;
end;
if Result = '' then // blank --> display hyperlink target if available
if HasHyperlink(ACell) then
begin
hyperlink := FindHyperlink(ACell);
if hyperlink <> nil then Result := hyperlink^.Target;
end;
end;
end;
function TsWorksheet.ReadAsUTF8Text(ACell: PCell;