type AlternateContent = 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: AlternateContent);override; public // attributes property property XmlnsMc read ReadXmlAttrXmlnsMc write WriteXmlAttrXmlnsMc; function ReadXmlAttrXmlnsMc(); function WriteXmlAttrXmlnsMc(_value); // normal property property Choice read ReadXmlChildChoice; property Fallback read ReadXmlChildFallback; function ReadXmlChildChoice(); function ReadXmlChildFallback(); public // Attributes XmlAttrXmlnsMc: OpenXmlAttribute; // Children XmlChildChoice: Choice; XmlChildFallback: Fallback; end; function AlternateContent.Create();overload; begin {self.}Create(nil, "mc", "AlternateContent"); end; function AlternateContent.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function AlternateContent.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 AlternateContent.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "xmlns:mc": makeweakref(thisFunction(WriteXmlAttrXmlnsMc)), ); sorted_child_ := array( pre + "Choice": array(0, makeweakref(thisFunction(ReadXmlChildChoice))), pre + "Fallback": array(1, makeweakref(thisFunction(ReadXmlChildFallback))), ); container_ := new TSOfficeContainer(sorted_child_); end; function AlternateContent.Copy(_obj: AlternateContent);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.XmlnsMc) then {self.}XmlnsMc := _obj.XmlnsMc; if not ifnil(_obj.XmlChildChoice) then {self.}Choice.Copy(_obj.XmlChildChoice); if not ifnil(_obj.XmlChildFallback) then {self.}Fallback.Copy(_obj.XmlChildFallback); tslassigning := tslassigning_backup; end; function AlternateContent.ReadXmlAttrXmlnsMc(); begin return {self.}XmlAttrXmlnsMc.Value; end; function AlternateContent.WriteXmlAttrXmlnsMc(_value); begin if ifnil({self.}XmlAttrXmlnsMc) then begin {self.}XmlAttrXmlnsMc := new OpenXmlAttribute("xmlns", "mc", nil); attributes_[length(attributes_)] := {self.}XmlAttrXmlnsMc; end {self.}XmlAttrXmlnsMc.Value := _value; end; function AlternateContent.ReadXmlChildChoice(); begin if tslassigning and ifnil({self.}XmlChildChoice) then begin {self.}XmlChildChoice := new Choice(self, {self.}Prefix, "Choice"); container_.Set({self.}XmlChildChoice); end return {self.}XmlChildChoice; end; function AlternateContent.ReadXmlChildFallback(); begin if tslassigning and ifnil({self.}XmlChildFallback) then begin {self.}XmlChildFallback := new Fallback(self, {self.}Prefix, "Fallback"); container_.Set({self.}XmlChildFallback); end return {self.}XmlChildFallback; end;