From 001fc5eccef97572e1e13d8327442d68cb4ea052 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Wed, 15 Jul 2020 17:05:12 +0000 Subject: [PATCH] fpspreadsheet: Remove expression error in CF demo. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7543 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../conditional_formatting/demo_conditional_formatting.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/fpspreadsheet/examples/other/conditional_formatting/demo_conditional_formatting.pas b/components/fpspreadsheet/examples/other/conditional_formatting/demo_conditional_formatting.pas index 614ffa6b5..c30f9f37d 100644 --- a/components/fpspreadsheet/examples/other/conditional_formatting/demo_conditional_formatting.pas +++ b/components/fpspreadsheet/examples/other/conditional_formatting/demo_conditional_formatting.pas @@ -48,7 +48,7 @@ begin sh.WriteFormula(i, 18, '=1.0/1.0'); end; lastCol := 18; - (* + // conditional format #1: equal to number constant sh.WriteText(row, 0, 'equal to constant 5'); sh.WriteText(row, 1, 'background yellow'); @@ -264,7 +264,7 @@ begin fmt.SetFont(wb.AddFont('Courier New', 14, [fssBold], scRed)); fmtIdx := wb.AddCellFormat(fmt); sh.WriteConditionalCellFormat(Range(row, 2, row, lastCol), cfcNotContainsErrors, fmtIdx); -*) + // conditional format: expression inc(row); sh.WriteText(row, 0, 'expression: ISNUMBER($E$5)'); @@ -272,7 +272,7 @@ begin InitFormatRecord(fmt); fmt.SetBackgroundColor(scBlue); fmtIdx := wb.AddCellFormat(fmt); - sh.WriteConditionalCellFormat(Range(row, 2, row, 2), cfcExpression, '=IS-NUMBER($E$5)', fmtIdx); + sh.WriteConditionalCellFormat(Range(row, 2, row, 2), cfcExpression, '=ISNUMBER($E$5)', fmtIdx); // Two rules in the same conditional format inc(row);