78 lines
1.8 KiB
Plaintext
78 lines
1.8 KiB
Plaintext
type GsLst = 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: GsLst);override;
|
|
|
|
public
|
|
|
|
// multi property
|
|
property Gses read ReadGses;
|
|
function ReadGses(_index);
|
|
function AddGs(): Gs;
|
|
function AppendGs(): Gs;
|
|
|
|
public
|
|
// Children
|
|
|
|
end;
|
|
|
|
function GsLst.Create();overload;
|
|
begin
|
|
{self.}Create(nil, "a", "gsLst");
|
|
end;
|
|
|
|
function GsLst.Create(_node: XmlNode);overload;
|
|
begin
|
|
class(OpenXmlElement).Create(_node: XmlNode);
|
|
end;
|
|
|
|
function GsLst.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 GsLst.Init();override;
|
|
begin
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
attributes_ := array();
|
|
attributes_pf_ := array(
|
|
);
|
|
sorted_child_ := array(
|
|
pre + "gs": array(0, makeweakref(thisFunction(AppendGs))),
|
|
);
|
|
container_ := new TSOfficeContainer(sorted_child_);
|
|
end;
|
|
|
|
function GsLst.Copy(_obj: GsLst);override;
|
|
begin
|
|
tslassigning_backup := tslassigning;
|
|
tslassigning := 1;
|
|
class(OpenXmlElement).Copy(_obj);
|
|
tslassigning := tslassigning_backup;
|
|
end;
|
|
|
|
function GsLst.ReadGses(_index);
|
|
begin
|
|
ind := ifnil(_index) ? -2 : _index;
|
|
pre := {self.}Prefix ? {self.}Prefix + ":" : "";
|
|
return container_.Get(pre + "gs", ind);
|
|
end;
|
|
|
|
function GsLst.AddGs(): Gs;
|
|
begin
|
|
obj := new Gs(self, {self.}Prefix, "gs");
|
|
container_.Insert(obj);
|
|
return obj;
|
|
end;
|
|
|
|
function GsLst.AppendGs(): Gs;
|
|
begin
|
|
obj := new Gs(self, {self.}Prefix, "gs");
|
|
container_.Append(obj);
|
|
return obj;
|
|
end;
|