185 lines
5.4 KiB
Plaintext
185 lines
5.4 KiB
Plaintext
type TblBorder = class(OpenXmlElement)
|
|
public
|
|
function Create();overload;
|
|
function Create(_node: XmlNode);overload;
|
|
function Create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
function Init();override;
|
|
function Copy(_obj: TblBorder);override;
|
|
|
|
public
|
|
|
|
// attributes property
|
|
property Val read ReadXmlAttrVal write WriteXmlAttrVal;
|
|
property Color read ReadXmlAttrColor write WriteXmlAttrColor;
|
|
property Space read ReadXmlAttrSpace write WriteXmlAttrSpace;
|
|
property ThemeColor read ReadXmlAttrThemeColor write WriteXmlAttrThemeColor;
|
|
property ThemeTint read ReadXmlAttrThemeTint write WriteXmlAttrThemeTint;
|
|
property Sz read ReadXmlAttrSz write WriteXmlAttrSz;
|
|
function ReadXmlAttrVal();
|
|
function WriteXmlAttrVal(_value);
|
|
function ReadXmlAttrColor();
|
|
function WriteXmlAttrColor(_value);
|
|
function ReadXmlAttrSpace();
|
|
function WriteXmlAttrSpace(_value);
|
|
function ReadXmlAttrThemeColor();
|
|
function WriteXmlAttrThemeColor(_value);
|
|
function ReadXmlAttrThemeTint();
|
|
function WriteXmlAttrThemeTint(_value);
|
|
function ReadXmlAttrSz();
|
|
function WriteXmlAttrSz(_value);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrVal: OpenXmlAttribute;
|
|
XmlAttrColor: OpenXmlAttribute;
|
|
XmlAttrSpace: OpenXmlAttribute;
|
|
XmlAttrThemeColor: OpenXmlAttribute;
|
|
XmlAttrThemeTint: OpenXmlAttribute;
|
|
XmlAttrSz: OpenXmlAttribute;
|
|
|
|
|
|
end;
|
|
|
|
function TblBorder.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "w", "");
|
|
end;
|
|
|
|
function TblBorder.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function TblBorder.Create(_parent: tslobj; _prefix: string; _local_name: string);overload;
|
|
begin
|
|
setsysparam(pn_calcctrlword(), getsysparam(pn_calcctrlword()) .| 0x200);
|
|
class(OpenXmlElement).Create(_parent, _prefix, _local_name);
|
|
end;
|
|
|
|
function TblBorder.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
pre + "val": makeweakref(thisFunction(WriteXmlAttrVal)),
|
|
pre + "color": makeweakref(thisFunction(WriteXmlAttrColor)),
|
|
pre + "space": makeweakref(thisFunction(WriteXmlAttrSpace)),
|
|
pre + "themeColor": makeweakref(thisFunction(WriteXmlAttrThemeColor)),
|
|
pre + "themeTint": makeweakref(thisFunction(WriteXmlAttrThemeTint)),
|
|
pre + "sz": makeweakref(thisFunction(WriteXmlAttrSz)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function TblBorder.Copy(_obj: TblBorder);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.Val) then
|
|
{self.}Val := _obj.Val;
|
|
if not ifnil(_obj.Color) then
|
|
{self.}Color := _obj.Color;
|
|
if not ifnil(_obj.Space) then
|
|
{self.}Space := _obj.Space;
|
|
if not ifnil(_obj.ThemeColor) then
|
|
{self.}ThemeColor := _obj.ThemeColor;
|
|
if not ifnil(_obj.ThemeTint) then
|
|
{self.}ThemeTint := _obj.ThemeTint;
|
|
if not ifnil(_obj.Sz) then
|
|
{self.}Sz := _obj.Sz;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function TblBorder.ReadXmlAttrVal();
|
|
begin
|
|
return {self.}XmlAttrVal.Value;
|
|
end;
|
|
|
|
function TblBorder.WriteXmlAttrVal(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrVal) then
|
|
begin
|
|
{self.}XmlAttrVal := new OpenXmlAttribute({self.}Prefix, "val", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrVal;
|
|
end
|
|
{self.}XmlAttrVal.Value := _value;
|
|
end;
|
|
|
|
function TblBorder.ReadXmlAttrColor();
|
|
begin
|
|
return {self.}XmlAttrColor.Value;
|
|
end;
|
|
|
|
function TblBorder.WriteXmlAttrColor(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrColor) then
|
|
begin
|
|
{self.}XmlAttrColor := new OpenXmlAttribute({self.}Prefix, "color", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrColor;
|
|
end
|
|
{self.}XmlAttrColor.Value := _value;
|
|
end;
|
|
|
|
function TblBorder.ReadXmlAttrSpace();
|
|
begin
|
|
return {self.}XmlAttrSpace.Value;
|
|
end;
|
|
|
|
function TblBorder.WriteXmlAttrSpace(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrSpace) then
|
|
begin
|
|
{self.}XmlAttrSpace := new OpenXmlAttribute({self.}Prefix, "space", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrSpace;
|
|
end
|
|
{self.}XmlAttrSpace.Value := _value;
|
|
end;
|
|
|
|
function TblBorder.ReadXmlAttrThemeColor();
|
|
begin
|
|
return {self.}XmlAttrThemeColor.Value;
|
|
end;
|
|
|
|
function TblBorder.WriteXmlAttrThemeColor(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrThemeColor) then
|
|
begin
|
|
{self.}XmlAttrThemeColor := new OpenXmlAttribute({self.}Prefix, "themeColor", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrThemeColor;
|
|
end
|
|
{self.}XmlAttrThemeColor.Value := _value;
|
|
end;
|
|
|
|
function TblBorder.ReadXmlAttrThemeTint();
|
|
begin
|
|
return {self.}XmlAttrThemeTint.Value;
|
|
end;
|
|
|
|
function TblBorder.WriteXmlAttrThemeTint(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrThemeTint) then
|
|
begin
|
|
{self.}XmlAttrThemeTint := new OpenXmlAttribute({self.}Prefix, "themeTint", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrThemeTint;
|
|
end
|
|
{self.}XmlAttrThemeTint.Value := _value;
|
|
end;
|
|
|
|
function TblBorder.ReadXmlAttrSz();
|
|
begin
|
|
return {self.}XmlAttrSz.Value;
|
|
end;
|
|
|
|
function TblBorder.WriteXmlAttrSz(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrSz) then
|
|
begin
|
|
{self.}XmlAttrSz := new OpenXmlAttribute({self.}Prefix, "sz", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrSz;
|
|
end
|
|
{self.}XmlAttrSz.Value := _value;
|
|
end;
|