fpspreadsheet: Major reconstructor of color management: no more palettes now, use direct rgb colors instead. May break existing code - sorry! Update all demos and unit tests (passed).

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4156 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2015-05-28 20:08:24 +00:00
parent 46386a0f37
commit 545bd7ed0f
33 changed files with 1696 additions and 1025 deletions

View File

@ -1078,14 +1078,14 @@ procedure TsActionBorder.ApplyStyle(AWorkbook: TsWorkbook;
out ABorderStyle: TsCellBorderStyle);
begin
ABorderStyle.LineStyle := FLineStyle;
ABorderStyle.Color := AWorkbook.GetPaletteColor(ABorderStyle.Color);
ABorderStyle.Color := ABorderStyle.Color and $00FFFFFF;
end;
procedure TsActionBorder.ExtractStyle(AWorkbook: TsWorkbook;
ABorderStyle: TsCellBorderStyle);
begin
FLineStyle := ABorderStyle.LineStyle;
Color := AWorkbook.AddColorToPalette(ABorderStyle.Color);
Color := ColorToRGB(ABorderStyle.Color);
end;
constructor TsActionBorders.Create;
@ -1575,14 +1575,14 @@ end;
procedure TsBackgroundColorDialogAction.DoAccept;
begin
FBackgroundColor := Workbook.AddColorToPalette(TsColorValue(Dialog.Color));
FBackgroundColor := ColorToRgb(Dialog.Color);
inherited;
end;
procedure TsBackgroundColorDialogAction.DoBeforeExecute;
begin
inherited;
Dialog.Color := Workbook.GetPaletteColor(FBackgroundColor);
Dialog.Color := FBackgroundColor and $00FFFFFF;
end;
procedure TsBackgroundColorDialogAction.ExtractFromCell(ACell: PCell);