type SdtContent = 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: SdtContent);override; public // multi property property Ps read ReadPs; function ReadPs(_index); function AddP(): P; function AppendP(): P; public // Children end; function SdtContent.Create();overload; begin {self.}Create(nil, "w", "sdtContent"); end; function SdtContent.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function SdtContent.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 SdtContent.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( ); sorted_child_ := array( pre + "p": array(0, makeweakref(thisFunction(AppendP))), ); container_ := new TSOfficeContainer(sorted_child_); end; function SdtContent.Copy(_obj: SdtContent);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); tslassigning := tslassigning_backup; end; function SdtContent.ReadPs(_index); begin ind := ifnil(_index) ? -2 : _index; pre := {self.}Prefix ? {self.}Prefix + ":" : ""; return container_.Get(pre + "p", ind); end; function SdtContent.AddP(): P; begin obj := new P(self, {self.}Prefix, "p"); container_.Insert(obj); return obj; end; function SdtContent.AppendP(): P; begin obj := new P(self, {self.}Prefix, "p"); container_.Append(obj); return obj; end;