fpspreadsheet: HTML reader reckignozes font specified in "styles" attribute of "table" element as default font of worksheet.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4255 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2015-08-05 19:32:27 +00:00
parent 8ad3ef69c7
commit 8432eece02

View File

@ -31,6 +31,7 @@ type
FCurrRow, FCurrCol: LongInt;
FCurrCellFormat: TsCellFormat;
FCellFont: TsFont;
FCurrFont: TsFont;
FCellText: String;
FAttrList: TsHTMLAttrList;
FColSpan, FRowSpan: Integer;
@ -148,10 +149,12 @@ begin
FTableCounter := -1;
FAttrList := TsHTMLAttrList.Create;
FCellFont := TsFont.Create;
FCurrFont := TsFont.Create;
end;
destructor TsHTMLReader.Destroy;
begin
FreeAndNil(FCurrFont);
FreeAndNil(FCellFont);
FreeAndNil(FAttrList);
FreeAndNil(parser);
@ -480,6 +483,11 @@ begin
FInTable := true;
FCurrRow := -1;
FCurrCol := -1;
InitFont(FCurrFont);
FAttrList.Parse(ActualTag);
ExtractFont(FCurrFont);
FWorkbook.ReplaceFont(DEFAULT_FONTINDEX, FCurrFont.FontName, FCurrFont.Size,
FCurrFont.Style, FCurrFont.Color, FCurrFont.Position);
end else
if FTableCounter = HTMLParams.TableIndex then
begin