78 lines
1.9 KiB
Plaintext
78 lines
1.9 KiB
Plaintext
type EndnotePr = 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: EndnotePr);override;
|
|
|
|
public
|
|
|
|
// multi property
|
|
property Endnotes read ReadEndnotes;
|
|
function ReadEndnotes(_index);
|
|
function AddEndnote(): Endnote;
|
|
function AppendEndnote(): Endnote;
|
|
|
|
public
|
|
// Children
|
|
|
|
end;
|
|
|
|
function EndnotePr.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "w", "endnotePr");
|
|
end;
|
|
|
|
function EndnotePr.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function EndnotePr.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 EndnotePr.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "endnote": array(0, makeweakref(thisFunction(AppendEndnote))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function EndnotePr.Copy(_obj: EndnotePr);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function EndnotePr.ReadEndnotes(_index);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "endnote", ind);
|
|
end;
|
|
|
|
function EndnotePr.AddEndnote(): Endnote;
|
|
begin
|
|
obj := new Endnote(self, {self.}Prefix, "endnote");
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function EndnotePr.AppendEndnote(): Endnote;
|
|
begin
|
|
obj := new Endnote(self, {self.}Prefix, "endnote");
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|