OfficeXml/autoclass/docx/NumPr@DOCX.tsf

84 lines
2.3 KiB
Plaintext

type NumPr = 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: NumPr);override;
public
// normal property
property Ilvl read ReadXmlChildIlvl;
property NumId read ReadXmlChildNumId;
function ReadXmlChildIlvl();
function ReadXmlChildNumId();
public
// Children
XmlChildIlvl: PureWVal;
XmlChildNumId: PureWVal;
end;
function NumPr.Create();overload;
begin
{self.}Create(nil, "w", "numPr");
end;
function NumPr.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function NumPr.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 NumPr.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
);
sorted_child_ := array(
pre + "ilvl": array(0, makeweakref(thisFunction(ReadXmlChildIlvl))),
pre + "numId": array(1, makeweakref(thisFunction(ReadXmlChildNumId))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function NumPr.Copy(_obj: NumPr);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.XmlChildIlvl) then
{self.}Ilvl.Copy(_obj.XmlChildIlvl);
if not ifnil(_obj.XmlChildNumId) then
{self.}NumId.Copy(_obj.XmlChildNumId);
tslassigning := tslassigning_backup;
end;
function NumPr.ReadXmlChildIlvl();
begin
if tslassigning and ifnil({self.}XmlChildIlvl) then
begin
{self.}XmlChildIlvl := new PureWVal(self, {self.}Prefix, "ilvl");
container_.Set({self.}XmlChildIlvl);
end
return {self.}XmlChildIlvl;
end;
function NumPr.ReadXmlChildNumId();
begin
if tslassigning and ifnil({self.}XmlChildNumId) then
begin
{self.}XmlChildNumId := new PureWVal(self, {self.}Prefix, "numId");
container_.Set({self.}XmlChildNumId);
end
return {self.}XmlChildNumId;
end;