You've already forked lazarus-ccr
fpspreadsheet: More general handling of conditional colors in number format strings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4091 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -301,6 +301,8 @@ begin
|
||||
if section^.Elements[el].IntValue < 0 then
|
||||
section^.Kind := section^.Kind + [nfkTimeInterval];
|
||||
end;
|
||||
nftColor:
|
||||
section^.Kind := section^.Kind + [nfkHasColor];
|
||||
end;
|
||||
|
||||
if FStatus <> psOK then
|
||||
|
@ -1440,9 +1440,9 @@ begin
|
||||
else
|
||||
if (Length(numFmt.Sections) > 2) and (lCell^.NumberValue = 0) then
|
||||
sidx := 2;
|
||||
if numFmt.Sections[sidx].Elements[0].Token = nftColor then
|
||||
if (nfkHasColor in numFmt.Sections[sidx].Kind) then
|
||||
begin
|
||||
clr := numFmt.Sections[sidx].Elements[0].IntValue;
|
||||
clr := numFmt.Sections[sidx].Color;
|
||||
Canvas.Font.Color := Workbook.GetPaletteColor(clr);
|
||||
end;
|
||||
end;
|
||||
|
@ -500,7 +500,8 @@ type
|
||||
|
||||
TsNumFormatElements = array of TsNumFormatElement;
|
||||
|
||||
TsNumFormatKind = (nfkPercent, nfkExp, nfkCurrency, nfkFraction, nfkDate, nfkTime, nfkTimeInterval);
|
||||
TsNumFormatKind = (nfkPercent, nfkExp, nfkCurrency, nfkFraction,
|
||||
nfkDate, nfkTime, nfkTimeInterval, nfkHasColor);
|
||||
TsNumFormatKinds = set of TsNumFormatKind;
|
||||
|
||||
TsNumFormatSection = record
|
||||
|
Reference in New Issue
Block a user