OfficeXml/autoclass/docx/TblCellMar@DOCX.tsf

116 lines
3.4 KiB
Plaintext

type TblCellMar = 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: TblCellMar);override;
public
// normal property
property Top read ReadXmlChildTop;
property Left read ReadXmlChildLeft;
property Bottom read ReadXmlChildBottom;
property Right read ReadXmlChildRight;
function ReadXmlChildTop();
function ReadXmlChildLeft();
function ReadXmlChildBottom();
function ReadXmlChildRight();
public
// Children
XmlChildTop: TblInd;
XmlChildLeft: TblInd;
XmlChildBottom: TblInd;
XmlChildRight: TblInd;
end;
function TblCellMar.Create();overload;
begin
{self.}Create(nil, "w", "tblCellMar");
end;
function TblCellMar.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function TblCellMar.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 TblCellMar.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
);
sorted_child_ := array(
pre + "top": array(0, makeweakref(thisFunction(ReadXmlChildTop))),
pre + "left": array(1, makeweakref(thisFunction(ReadXmlChildLeft))),
pre + "bottom": array(2, makeweakref(thisFunction(ReadXmlChildBottom))),
pre + "right": array(3, makeweakref(thisFunction(ReadXmlChildRight))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function TblCellMar.Copy(_obj: TblCellMar);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.XmlChildTop) then
{self.}Top.Copy(_obj.XmlChildTop);
if not ifnil(_obj.XmlChildLeft) then
{self.}Left.Copy(_obj.XmlChildLeft);
if not ifnil(_obj.XmlChildBottom) then
{self.}Bottom.Copy(_obj.XmlChildBottom);
if not ifnil(_obj.XmlChildRight) then
{self.}Right.Copy(_obj.XmlChildRight);
tslassigning := tslassigning_backup;
end;
function TblCellMar.ReadXmlChildTop();
begin
if tslassigning and ifnil({self.}XmlChildTop) then
begin
{self.}XmlChildTop := new TblInd(self, {self.}Prefix, "top");
container_.Set({self.}XmlChildTop);
end
return {self.}XmlChildTop;
end;
function TblCellMar.ReadXmlChildLeft();
begin
if tslassigning and ifnil({self.}XmlChildLeft) then
begin
{self.}XmlChildLeft := new TblInd(self, {self.}Prefix, "left");
container_.Set({self.}XmlChildLeft);
end
return {self.}XmlChildLeft;
end;
function TblCellMar.ReadXmlChildBottom();
begin
if tslassigning and ifnil({self.}XmlChildBottom) then
begin
{self.}XmlChildBottom := new TblInd(self, {self.}Prefix, "bottom");
container_.Set({self.}XmlChildBottom);
end
return {self.}XmlChildBottom;
end;
function TblCellMar.ReadXmlChildRight();
begin
if tslassigning and ifnil({self.}XmlChildRight) then
begin
{self.}XmlChildRight := new TblInd(self, {self.}Prefix, "right");
container_.Set({self.}XmlChildRight);
end
return {self.}XmlChildRight;
end;