type Rsids = 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: Rsids);override; public // normal property property RsidRoot read ReadXmlChildRsidRoot; function ReadXmlChildRsidRoot(); // multi property property Rsids read ReadRsids; function ReadRsids(_index); function AddRsid(): PureWVal; function AppendRsid(): PureWVal; public // Children XmlChildRsidRoot: PureWVal; end; function Rsids.Create();overload; begin {self.}Create(nil, "w", "rsids"); end; function Rsids.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function Rsids.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 Rsids.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( ); sorted_child_ := array( pre + "rsidRoot": array(0, makeweakref(thisFunction(ReadXmlChildRsidRoot))), pre + "rsid": array(1, makeweakref(thisFunction(AppendRsid))), ); container_ := new TSOfficeContainer(sorted_child_); end; function Rsids.Copy(_obj: Rsids);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.XmlChildRsidRoot) then {self.}RsidRoot.Copy(_obj.XmlChildRsidRoot); tslassigning := tslassigning_backup; end; function Rsids.ReadXmlChildRsidRoot(); begin if tslassigning and ifnil({self.}XmlChildRsidRoot) then begin {self.}XmlChildRsidRoot := new PureWVal(self, {self.}Prefix, "rsidRoot"); container_.Set({self.}XmlChildRsidRoot); end return {self.}XmlChildRsidRoot; end; function Rsids.ReadRsids(_index); begin ind := ifnil(_index) ? -2 : _index; pre := {self.}Prefix ? {self.}Prefix + ":" : ""; return container_.Get(pre + "rsid", ind); end; function Rsids.AddRsid(): PureWVal; begin obj := new PureWVal(self, {self.}Prefix, "rsid"); container_.Insert(obj); return obj; end; function Rsids.AppendRsid(): PureWVal; begin obj := new PureWVal(self, {self.}Prefix, "rsid"); container_.Append(obj); return obj; end;