fpspreadsheet: Some clean-up: Less hints and warnings.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7555 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-07-22 09:07:59 +00:00
parent d0fe6490d8
commit 901b92fa72
17 changed files with 94 additions and 101 deletions

View File

@ -951,6 +951,7 @@ var
len: Integer;
nrtp: Integer;
begin
ARichTextParams := nil;
analyzer := TsHTMLAnalyzer.Create(AWorkbook as TsWorkbook, AFont, AHTMLText + '<end>');
try
analyzer.PreserveSpaces := true;
@ -967,8 +968,7 @@ begin
SetLength(ARichTextParams, nrtp);
for j:=0 to nrtp-1 do
ARichTextParams[j] := analyzer.RichTextParams[j];
end else
SetLength(ARichTextParams, 0);
end;
finally
analyzer.Free;
end;
@ -1162,7 +1162,7 @@ procedure TsHTMLComposer.GetFontsFromWorkbook(out AFonts: TsFontArray);
var
i: Integer;
begin
SetLength(AFonts, Length(FRichTextParams));
SetLength(AFonts{%H-}, Length(FRichTextParams));
for i:=0 to High(AFonts) do
AFonts[i] := FWorkbook.GetFont(FRichTextParams[i].FontIndex);
end;