From 3e79a95fc19e8e83bc5c87168003e0fbedfa82d1 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Sat, 11 Aug 2018 12:44:52 +0000 Subject: [PATCH] fpspreadsheet: Fix detection of underlined and strike-through font in xlsx files not written by Excel. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6595 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/source/common/xlsxooxml.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/fpspreadsheet/source/common/xlsxooxml.pas b/components/fpspreadsheet/source/common/xlsxooxml.pas index 684768a28..8dc6562cc 100644 --- a/components/fpspreadsheet/source/common/xlsxooxml.pas +++ b/components/fpspreadsheet/source/common/xlsxooxml.pas @@ -1517,14 +1517,14 @@ begin if nodename = 'u' then begin s := GetAttrValue(node, 'val'); - if (s = '') or StrIsTrue(s) then // if GetAttrValue(node, 'val') <> 'false' then + if not StrIsFalse(s) then // can have many values, not just booleans fntStyles := fntStyles+ [fssUnderline] end else if nodename = 'strike' then begin s := GetAttrValue(node, 'val'); - if (s = '') or StrIsTrue(s) then // if GetAttrValue(node, 'val') <> 'false' then + if not StrIsFalse(s) then // can have several values, not just booleans fntStyles := fntStyles + [fssStrikeout]; end else