OfficeXml/autoclass/docx/TblBorders@DOCX.tsf

148 lines
4.5 KiB
Plaintext

type TblBorders = 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: TblBorders);override;
public
// normal property
property Top read ReadXmlChildTop;
property Left read ReadXmlChildLeft;
property Bottom read ReadXmlChildBottom;
property Right read ReadXmlChildRight;
property InsideH read ReadXmlChildInsideH;
property InsideV read ReadXmlChildInsideV;
function ReadXmlChildTop();
function ReadXmlChildLeft();
function ReadXmlChildBottom();
function ReadXmlChildRight();
function ReadXmlChildInsideH();
function ReadXmlChildInsideV();
public
// Children
XmlChildTop: tblBorder;
XmlChildLeft: tblBorder;
XmlChildBottom: tblBorder;
XmlChildRight: tblBorder;
XmlChildInsideH: PureWVal;
XmlChildInsideV: PureWVal;
end;
function TblBorders.Create();overload;
begin
{self.}Create(nil, "w", "tblBorders");
end;
function TblBorders.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function TblBorders.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 TblBorders.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))),
pre + "insideH": array(4, makeweakref(thisFunction(ReadXmlChildInsideH))),
pre + "insideV": array(5, makeweakref(thisFunction(ReadXmlChildInsideV))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function TblBorders.Copy(_obj: TblBorders);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);
if not ifnil(_obj.XmlChildInsideH) then
{self.}InsideH.Copy(_obj.XmlChildInsideH);
if not ifnil(_obj.XmlChildInsideV) then
{self.}InsideV.Copy(_obj.XmlChildInsideV);
tslassigning := tslassigning_backup;
end;
function TblBorders.ReadXmlChildTop();
begin
if tslassigning and ifnil({self.}XmlChildTop) then
begin
{self.}XmlChildTop := new tblBorder(self, {self.}Prefix, "top");
container_.Set({self.}XmlChildTop);
end
return {self.}XmlChildTop;
end;
function TblBorders.ReadXmlChildLeft();
begin
if tslassigning and ifnil({self.}XmlChildLeft) then
begin
{self.}XmlChildLeft := new tblBorder(self, {self.}Prefix, "left");
container_.Set({self.}XmlChildLeft);
end
return {self.}XmlChildLeft;
end;
function TblBorders.ReadXmlChildBottom();
begin
if tslassigning and ifnil({self.}XmlChildBottom) then
begin
{self.}XmlChildBottom := new tblBorder(self, {self.}Prefix, "bottom");
container_.Set({self.}XmlChildBottom);
end
return {self.}XmlChildBottom;
end;
function TblBorders.ReadXmlChildRight();
begin
if tslassigning and ifnil({self.}XmlChildRight) then
begin
{self.}XmlChildRight := new tblBorder(self, {self.}Prefix, "right");
container_.Set({self.}XmlChildRight);
end
return {self.}XmlChildRight;
end;
function TblBorders.ReadXmlChildInsideH();
begin
if tslassigning and ifnil({self.}XmlChildInsideH) then
begin
{self.}XmlChildInsideH := new PureWVal(self, {self.}Prefix, "insideH");
container_.Set({self.}XmlChildInsideH);
end
return {self.}XmlChildInsideH;
end;
function TblBorders.ReadXmlChildInsideV();
begin
if tslassigning and ifnil({self.}XmlChildInsideV) then
begin
{self.}XmlChildInsideV := new PureWVal(self, {self.}Prefix, "insideV");
container_.Set({self.}XmlChildInsideV);
end
return {self.}XmlChildInsideV;
end;