type Ext = 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: Ext);override; public // attributes property property Uri read ReadXmlAttrUri write WriteXmlAttrUri; property XmlnsC16 read ReadXmlAttrXmlnsC16 write WriteXmlAttrXmlnsC16; function ReadXmlAttrUri(); function WriteXmlAttrUri(_value); function ReadXmlAttrXmlnsC16(); function WriteXmlAttrXmlnsC16(_value); // normal property property Thm15ThemeFamily read ReadXmlChildThm15ThemeFamily; property UniqueId read ReadXmlChildUniqueId; function ReadXmlChildThm15ThemeFamily(); function ReadXmlChildUniqueId(); public // Attributes XmlAttrUri: OpenXmlAttribute; XmlAttrXmlnsC16: OpenXmlAttribute; // Children XmlChildThm15ThemeFamily: ThemeFamily; XmlChildUniqueId: PureVal; end; function Ext.Create();overload; begin {self.}Create(nil, "a", "ext"); end; function Ext.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function Ext.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 Ext.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "uri": makeweakref(thisFunction(WriteXmlAttrUri)), "xmlns:c16": makeweakref(thisFunction(WriteXmlAttrXmlnsC16)), ); sorted_child_ := array( "thm15:themeFamily": array(0, makeweakref(thisFunction(ReadXmlChildThm15ThemeFamily))), "c16:uniquedId": array(1, makeweakref(thisFunction(ReadXmlChildUniqueId))), ); container_ := new TSOfficeContainer(sorted_child_); end; function Ext.Copy(_obj: Ext);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.Uri) then {self.}Uri := _obj.Uri; if not ifnil(_obj.XmlnsC16) then {self.}XmlnsC16 := _obj.XmlnsC16; if not ifnil(_obj.XmlChildThm15ThemeFamily) then {self.}Thm15ThemeFamily.Copy(_obj.XmlChildThm15ThemeFamily); if not ifnil(_obj.XmlChildUniqueId) then {self.}UniqueId.Copy(_obj.XmlChildUniqueId); tslassigning := tslassigning_backup; end; function Ext.ReadXmlAttrUri(); begin return {self.}XmlAttrUri.Value; end; function Ext.WriteXmlAttrUri(_value); begin if ifnil({self.}XmlAttrUri) then begin {self.}XmlAttrUri := new OpenXmlAttribute("", "uri", nil); attributes_[length(attributes_)] := {self.}XmlAttrUri; end {self.}XmlAttrUri.Value := _value; end; function Ext.ReadXmlAttrXmlnsC16(); begin return {self.}XmlAttrXmlnsC16.Value; end; function Ext.WriteXmlAttrXmlnsC16(_value); begin if ifnil({self.}XmlAttrXmlnsC16) then begin {self.}XmlAttrXmlnsC16 := new OpenXmlAttribute("xmlns", "c16", nil); attributes_[length(attributes_)] := {self.}XmlAttrXmlnsC16; end {self.}XmlAttrXmlnsC16.Value := _value; end; function Ext.ReadXmlChildThm15ThemeFamily(); begin if tslassigning and ifnil({self.}XmlChildThm15ThemeFamily) then begin {self.}XmlChildThm15ThemeFamily := new ThemeFamily(self, "thm15", "themeFamily"); container_.Set({self.}XmlChildThm15ThemeFamily); end return {self.}XmlChildThm15ThemeFamily; end; function Ext.ReadXmlChildUniqueId(); begin if tslassigning and ifnil({self.}XmlChildUniqueId) then begin {self.}XmlChildUniqueId := new PureVal(self, "c16", "uniquedId"); container_.Set({self.}XmlChildUniqueId); end return {self.}XmlChildUniqueId; end;