OfficeXml/autoclass/docx/LnStyleLst@DOCX.tsf

78 lines
1.9 KiB
Plaintext

type LnStyleLst = 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: LnStyleLst);override;
public
// multi property
property Lns read ReadLns;
function ReadLns(_index);
function AddLn(): Ln;
function AppendLn(): Ln;
public
// Children
end;
function LnStyleLst.Create();overload;
begin
{self.}Create(nil, "a", "lnStyleLst");
end;
function LnStyleLst.Create(_node: XmlNode);overload;
begin
class(OpenXmlElement).Create(_node: XmlNode);
end;
function LnStyleLst.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 LnStyleLst.Init();override;
begin
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
attributes_ := array();
attributes_pf_ := array(
);
sorted_child_ := array(
pre + "ln": array(0, makeweakref(thisFunction(AppendLn))),
);
container_ := new TSOfficeContainer(sorted_child_);
end;
function LnStyleLst.Copy(_obj: LnStyleLst);override;
begin
tslassigning_backup := tslassigning;
tslassigning := 1;
class(OpenXmlElement).Copy(_obj);
tslassigning := tslassigning_backup;
end;
function LnStyleLst.ReadLns(_index);
begin
ind := ifnil(_index) ? -2 : _index;
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
return container_.Get(pre + "ln", ind);
end;
function LnStyleLst.AddLn(): Ln;
begin
obj := new Ln(self, {self.}Prefix, "ln");
container_.Insert(obj);
return obj;
end;
function LnStyleLst.AppendLn(): Ln;
begin
obj := new Ln(self, {self.}Prefix, "ln");
container_.Append(obj);
return obj;
end;