OfficeXml/autoclass/docx/Cat@DOCX.tsf

68 lines
1.7 KiB
Plaintext

type Cat = 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: Cat);override;
public
// normal property
property StrRef read ReadXmlChildStrRef;
function ReadXmlChildStrRef();
public
// Children
XmlChildStrRef: StrRef;
end;
function Cat.Create();overload;
begin
{self.}Create(nil, "c", "cat");
end;
function Cat.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function Cat.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 Cat.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
);
sorted_child_ := array(
pre + "strRef": array(0, makeweakref(thisFunction(ReadXmlChildStrRef))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function Cat.Copy(_obj: Cat);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
if not ifnil(_obj.XmlChildStrRef) then
{self.}StrRef.Copy(_obj.XmlChildStrRef);
tslassigning := tslassigning_backup;
end;
function Cat.ReadXmlChildStrRef();
begin
if tslassigning and ifnil({self.}XmlChildStrRef) then
begin
{self.}XmlChildStrRef := new StrRef(self, {self.}Prefix, "strRef");
container_.Set({self.}XmlChildStrRef);
end
return {self.}XmlChildStrRef;
end;