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
|
if section^.Elements[el].IntValue < 0 then
|
||||||
section^.Kind := section^.Kind + [nfkTimeInterval];
|
section^.Kind := section^.Kind + [nfkTimeInterval];
|
||||||
end;
|
end;
|
||||||
|
nftColor:
|
||||||
|
section^.Kind := section^.Kind + [nfkHasColor];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if FStatus <> psOK then
|
if FStatus <> psOK then
|
||||||
|
@ -1440,9 +1440,9 @@ begin
|
|||||||
else
|
else
|
||||||
if (Length(numFmt.Sections) > 2) and (lCell^.NumberValue = 0) then
|
if (Length(numFmt.Sections) > 2) and (lCell^.NumberValue = 0) then
|
||||||
sidx := 2;
|
sidx := 2;
|
||||||
if numFmt.Sections[sidx].Elements[0].Token = nftColor then
|
if (nfkHasColor in numFmt.Sections[sidx].Kind) then
|
||||||
begin
|
begin
|
||||||
clr := numFmt.Sections[sidx].Elements[0].IntValue;
|
clr := numFmt.Sections[sidx].Color;
|
||||||
Canvas.Font.Color := Workbook.GetPaletteColor(clr);
|
Canvas.Font.Color := Workbook.GetPaletteColor(clr);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -500,7 +500,8 @@ type
|
|||||||
|
|
||||||
TsNumFormatElements = array of TsNumFormatElement;
|
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;
|
TsNumFormatKinds = set of TsNumFormatKind;
|
||||||
|
|
||||||
TsNumFormatSection = record
|
TsNumFormatSection = record
|
||||||
|
Reference in New Issue
Block a user