From c22cdde14b180d726da2479a0f9cd6bc75b865c1 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Wed, 1 Jul 2020 17:58:29 +0000 Subject: [PATCH] fpspreadsheet: Support remaining format properties in writing of conditional formats to ODS. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7514 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../demo_conditional_formatting.pas | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 64112e812..89c50d7c7 100644 --- a/components/fpspreadsheet/examples/other/conditional_formatting/demo_conditional_formatting.pas +++ b/components/fpspreadsheet/examples/other/conditional_formatting/demo_conditional_formatting.pas @@ -275,7 +275,17 @@ begin sh.WriteConditionalCellFormat(Range(row, 2, row, lastCol), cfcEqual, 5, fmtIdx); fmt.SetBackgroundColor(scGreen); fmtIdx := wb.AddCellFormat(fmt); - sh.WriteConditionalCellFormat(Range(row, 2, row, lastCol), cfcEqual, 3, fmtIdx); + sh.WriteConditionalCellFormat(Range(row, 2, row, lastCol), cfcEqual, 3, fmtIdx); // use the same cell range + + // Rotated text + inc(row); + sh.WriteText(row, 0, 'Equal to "abc"'); + sh.WriteText(row, 1, 'Rotated text (90 CCW), hor center, vert top'); + InitFormatRecord(fmt); + fmt.SetTextRotation(rt90DegreeCounterClockwiseRotation); + fmt.SetHorAlignment(haCenter); + fmt.SetVertAlignment(vaTop); + sh.WriteConditionalCellFormat(Range(row, 2, row, lastCol), cfcEqual, 'abc', wb.AddCellFormat(fmt)); { ------ Save workbook to file-------------------------------------------- } wb.WriteToFile('test.xlsx', true);