From b6d9f2f0f0951aa34e6a7740711f9578ebdd11d4 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sun, 3 Aug 2014 21:43:08 +0000 Subject: [PATCH] fpspreadsheet: Fix xlsx reader ignoring cell attributes for cells having font #1 in files not written by fps (confused by uffBold). git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3419 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/xlsxooxml.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/fpspreadsheet/xlsxooxml.pas b/components/fpspreadsheet/xlsxooxml.pas index 6b46691c5..ea262480d 100755 --- a/components/fpspreadsheet/xlsxooxml.pas +++ b/components/fpspreadsheet/xlsxooxml.pas @@ -340,10 +340,10 @@ begin xf := TXFListData(FXfList.Items[XfIndex]); // Font - if xf.FontIndex = 1 then + if FWrittenByFPS and (xf.FontIndex = 1) then Include(ACell^.UsedFormattingFields, uffBold) else - if xf.FontIndex > 1 then + if xf.FontIndex > 0 then Include(ACell^.UsedFormattingFields, uffFont); ACell^.FontIndex := xf.FontIndex;