diff --git a/components/fpspreadsheet/fpshtml.pas b/components/fpspreadsheet/fpshtml.pas index 65077c2c3..c8668ba08 100644 --- a/components/fpspreadsheet/fpshtml.pas +++ b/components/fpspreadsheet/fpshtml.pas @@ -458,8 +458,9 @@ var f: Double; defFntSize: Single; begin - // style tags - idx := FAttrList.IndexOfName('font-family'); + idx := FAttrList.IndexOfName('font-family'); // style tag + if idx = -1 then + idx := FAttrList.IndexOfName('face'); // html tag if idx > -1 then begin L := TStringList.Create; try @@ -472,6 +473,8 @@ begin end; idx := FAttrList.IndexOfName('font-size'); + if idx = -1 then + idx := FAttrList.IndexOfName('size'); if idx > -1 then begin defFntSize := FWorkbook.GetDefaultFont.Size; s := FAttrList[idx].Value; @@ -710,7 +713,7 @@ begin ReadHorAlign; ReadVertAlign; ReadFont(FCellFont); - if NoCaseTag[3] = 'H' then begin + if NoCaseTag[3] = 'H' then begin // for Include(FCellFont.Style, fssBold); FCurrCellFormat.HorAlignment := haCenter; Include(FCurrCellFormat.UsedFormattingFields, uffHorAlign); @@ -782,8 +785,19 @@ begin FCurrFont.Position := fpNormal else FCurrFont.Position := fpSuperscript; AddRichTextParam(FCurrFont); - end - else + end else + if (pos(' ';') do begin value := value + AStyle[i]; inc(i); end; - // inc(i); // skip final ';' Add(TsHTMLAttr.Create(lowercase(trim(nam)), UnquoteStr(trim(value)))); nam := ''; end; - ' ': ; + ' ': ; // skip white space else nam := nam + AStyle[i]; end; inc(i);