fpspreadsheet: Fix usage of strings in compare operations for conditional formatting.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7505 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-06-30 20:45:14 +00:00
parent aff774ebc9
commit 23003e75b3

View File

@ -3404,9 +3404,17 @@ begin
case ARule.Condition of case ARule.Condition of
cfcEqual..cfcNotBetween: cfcEqual..cfcNotBetween:
begin begin
formula1Str := Format('<formula>%s</formula>', [ARule.Operand1]); s := VarToStr(ARule.Operand1);
if VarIsStr(ARule.Operand1) then
s := UTF8TextToXMLText(SafeQuoteStr(s));
formula1Str := Format('<formula>%s</formula>', [s]);
if (ARule.Condition in [cfcBetween, cfcNotBetween]) then if (ARule.Condition in [cfcBetween, cfcNotBetween]) then
formula2Str := Format('<formula>%s</formula>',[ ARule.Operand2]); begin
s := VarToStr(ARule.Operand2);
if VarIsStr(ARule.Operand2) then
s := UTF8TextToXMLText(SafeQuoteStr(s));
formula2Str := Format('<formula>%s</formula>', [s]);
end;
end; end;
cfcAboveAverage..cfcBelowEqualAverage: cfcAboveAverage..cfcBelowEqualAverage:
begin begin