You've already forked lazarus-ccr
fpspreadsheet: Support font as conditional formatting style (so far, ODS writer only)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7510 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -49,7 +49,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');
|
||||
@@ -255,12 +255,13 @@ begin
|
||||
fmt.SetBackgroundColor(scRed);
|
||||
fmtIdx := wb.AddCellFormat(fmt);
|
||||
sh.WriteConditionalCellFormat(Range(row, 2, row, lastCol), cfcContainsErrors, fmtIdx);
|
||||
|
||||
*)
|
||||
// conditional format #6: no errors
|
||||
inc(row);
|
||||
sh.WriteText(row, 0, 'no errors');
|
||||
sh.WriteText(row, 1, 'background red');
|
||||
fmt.SetBackgroundColor(scRed);
|
||||
fmt.SetBackgroundColor(scYellow);
|
||||
fmt.SetFont(wb.AddFont('Courier New', 14, [fssBold], scRed));
|
||||
fmtIdx := wb.AddCellFormat(fmt);
|
||||
sh.WriteConditionalCellFormat(Range(row, 2, row, lastCol), cfcNotContainsErrors, fmtIdx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user