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
This commit is contained in:
wp_xxyyzz
2020-07-01 17:58:29 +00:00
parent f1421b2b80
commit c22cdde14b

View File

@ -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);