fpspreadsheet: Add BiDiMode to TCell record helper.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4473 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-01-25 23:12:48 +00:00
parent 1184e0ce26
commit 85dd9bc35d

View File

@ -12,6 +12,7 @@ type
TCellHelper = record helper for TCell TCellHelper = record helper for TCell
private private
function GetBackgroundColor: TsColor; function GetBackgroundColor: TsColor;
function GetBiDiMode: TsBiDiMode;
function GetBorder: TsCellBorders; function GetBorder: TsCellBorders;
function GetBorderStyle(const ABorder: TsCellBorder): TsCellBorderStyle; function GetBorderStyle(const ABorder: TsCellBorder): TsCellBorderStyle;
function GetBorderStyles: TsCellBorderStyles; function GetBorderStyles: TsCellBorderStyles;
@ -28,6 +29,7 @@ type
function GetVertAlignment: TsVertAlignment; function GetVertAlignment: TsVertAlignment;
function GetWordwrap: Boolean; function GetWordwrap: Boolean;
procedure SetBackgroundColor(const AValue: TsColor); procedure SetBackgroundColor(const AValue: TsColor);
procedure SetBiDiMode(const AValue: TsBiDiMode);
procedure SetBorder(const AValue: TsCellBorders); procedure SetBorder(const AValue: TsCellBorders);
procedure SetBorderStyle(const ABorder: TsCellBorder; const AValue: TsCellBorderStyle); procedure SetBorderStyle(const ABorder: TsCellBorder; const AValue: TsCellBorderStyle);
procedure SetBorderStyles(const AValue: TsCellBorderStyles); procedure SetBorderStyles(const AValue: TsCellBorderStyles);
@ -50,6 +52,8 @@ type
public public
property BackgroundColor: TsColor property BackgroundColor: TsColor
read GetBackgroundColor write SetBackgroundColor; read GetBackgroundColor write SetBackgroundColor;
property BiDiMode: TsBiDiMode
read GetBiDiMode write SetBiDiMode;
property Border: TsCellBorders property Border: TsCellBorders
read GetBorder write SetBorder; read GetBorder write SetBorder;
property BorderStyle[ABorder: TsCellBorder]: TsCellBorderStyle property BorderStyle[ABorder: TsCellBorder]: TsCellBorderStyle
@ -89,6 +93,11 @@ begin
Result := GetWorksheet.ReadBackgroundColor(@self); Result := GetWorksheet.ReadBackgroundColor(@self);
end; end;
function TCellHelper.GetBiDiMode: TsBiDiMode;
begin
Result := GetWorksheet.ReadBiDiMode(@self);
end;
function TCellHelper.GetBorder: TsCellBorders; function TCellHelper.GetBorder: TsCellBorders;
begin begin
Result := GetWorksheet.ReadCellBorders(@self); Result := GetWorksheet.ReadCellBorders(@self);
@ -188,6 +197,11 @@ begin
GetWorksheet.WriteBackgroundColor(@self, AValue); GetWorksheet.WriteBackgroundColor(@self, AValue);
end; end;
procedure TCellHelper.SetBiDiMode(const AValue: TsBiDiMode);
begin
GetWorksheet.WriteBiDiMode(@self, AValue);
end;
procedure TCellHelper.SetBorder(const AValue: TsCellBorders); procedure TCellHelper.SetBorder(const AValue: TsCellBorders);
begin begin
GetWorksheet.WriteBorders(@self, AValue); GetWorksheet.WriteBorders(@self, AValue);