From 4fc0ea60451c206a1ab8af69fd14b45adc317bd7 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sun, 26 Jul 2020 10:09:04 +0000 Subject: [PATCH] fpspreadsheet: Add proper log error message when XLSX writer tries to write a conditional font format. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7565 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/common/xlsxooxml.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/fpspreadsheet/source/common/xlsxooxml.pas b/components/fpspreadsheet/source/common/xlsxooxml.pas index c1e6d5e7a..77410e70f 100644 --- a/components/fpspreadsheet/source/common/xlsxooxml.pas +++ b/components/fpspreadsheet/source/common/xlsxooxml.pas @@ -6256,9 +6256,10 @@ begin { font } // TODO: Fix font handling: although correct in syntax something seems to be missing... - { if (uffFont in AFormat^.UsedFormattingFields) then begin + FWorkbook.AddErrorMsg('Writing conditional font not supported by XLSX writer.'); + { font := TsWorkbook(FWorkbook).GetFont(AFormat^.FontIndex); if font <> nil then begin @@ -6274,8 +6275,9 @@ begin // Font name, font size, and style underline not supported AppendToStream(AStream, ''); end; + } end; - } + { background fill } if (uffBackground in AFormat^.UsedFormattingFields) then begin