75 lines
1.9 KiB
Plaintext
75 lines
1.9 KiB
Plaintext
type TblLayout = 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: TblLayout);override;
|
|
|
|
public
|
|
|
|
// attributes property
|
|
property Type read ReadXmlAttrType write WriteXmlAttrType;
|
|
function ReadXmlAttrType();
|
|
function WriteXmlAttrType(_value);
|
|
|
|
public
|
|
// Attributes
|
|
XmlAttrType: OpenXmlAttribute;
|
|
|
|
|
|
end;
|
|
|
|
function TblLayout.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "w", "tblLayout");
|
|
end;
|
|
|
|
function TblLayout.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function TblLayout.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 TblLayout.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
pre + "type": makeweakref(thisFunction(WriteXmlAttrType)),
|
|
);
|
|
sorted_child_ := array(
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function TblLayout.Copy(_obj: TblLayout);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
if not ifnil(_obj.Type) then
|
|
{self.}Type := _obj.Type;
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function TblLayout.ReadXmlAttrType();
|
|
begin
|
|
return {self.}XmlAttrType.Value;
|
|
end;
|
|
|
|
function TblLayout.WriteXmlAttrType(_value);
|
|
begin
|
|
if ifnil({self.}XmlAttrType) then
|
|
begin
|
|
{self.}XmlAttrType := new OpenXmlAttribute({self.}Prefix, "type", nil);
|
|
attributes_[length(attributes_)] := {self.}XmlAttrType;
|
|
end
|
|
{self.}XmlAttrType.Value := _value;
|
|
end;
|