diff --git a/components/fpspreadsheet/source/common/xlsxooxml.pas b/components/fpspreadsheet/source/common/xlsxooxml.pas index 1cf995585..c1e6d5e7a 100644 --- a/components/fpspreadsheet/source/common/xlsxooxml.pas +++ b/components/fpspreadsheet/source/common/xlsxooxml.pas @@ -6249,10 +6249,33 @@ procedure TsSpreadOOXMLWriter.WriteDifferentialFormat(AStream: TStream; var pt, bc, fc, diag: string; + font: TsFont; begin AppendToStream(AStream, ''); + { font } + // TODO: Fix font handling: although correct in syntax something seems to be missing... + { + if (uffFont in AFormat^.UsedFormattingFields) then + begin + font := TsWorkbook(FWorkbook).GetFont(AFormat^.FontIndex); + if font <> nil then + begin + AppendToStream(AStream, ''); + if font.Color <> scNotDefined then + AppendToStream(AStream, Format('', [fc] )); + if fssBold in font.Style then + AppendToStream(AStream, ''); + if fssItalic in font.Style then + AppendToStream(AStream, ''); + if fssStrikeout in font.Style then + AppendToStream(AStream, ''); + // Font name, font size, and style underline not supported + AppendToStream(AStream, ''); + end; + end; + } { background fill } if (uffBackground in AFormat^.UsedFormattingFields) then begin @@ -6291,26 +6314,6 @@ begin WriteBorderStyle(AStream, AFormat, cbDiagUp, 'diagonal'); AppendToStream(AStream, ''); - - // TODO: Fix font handling: although correct in syntax something seems to be missing... - { font } - { - font := TsWorkbook(FWorkbook).GetFont(AFormat^.FontIndex); - if font <> nil then - begin - fc := ColorToHTMLColorStr(font.Color, true); - AppendToStream(AStream, ''); - AppendToStream(AStream, Format('', [fc] )); - if fssBold in font.Style then - AppendToStream(AStream, ''); - if fssItalic in font.Style then - AppendToStream(AStream, ''); - if fssStrikeout in font.Style then - AppendToStream(AStream, ''); - // Font name, font size, and style underline not supported - AppendToStream(AStream, ''); - end; - } end; AppendToStream(AStream,