type GraphicData = 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: GraphicData);override; public // attributes property property Uri read ReadXmlAttrUri write WriteXmlAttrUri; function ReadXmlAttrUri(); function WriteXmlAttrUri(_value); // normal property property Pic read ReadXmlChildPic; property Chart read ReadXmlChildChart; property Wsp read ReadXmlChildWsp; function ReadXmlChildPic(); function ReadXmlChildChart(); function ReadXmlChildWsp(); public // Attributes XmlAttrUri: OpenXmlAttribute; // Children XmlChildPic: Pic; XmlChildChart: Chart; XmlChildWsp: Wsp; end; function GraphicData.Create();overload; begin {self.}Create(nil, "a", "graphicData"); end; function GraphicData.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function GraphicData.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 GraphicData.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "uri": makeweakref(thisFunction(WriteXmlAttrUri)), ); sorted_child_ := array( "pic:pic": array(0, makeweakref(thisFunction(ReadXmlChildPic))), "c:chart": array(1, makeweakref(thisFunction(ReadXmlChildChart))), "wps:wsp": array(2, makeweakref(thisFunction(ReadXmlChildWsp))), ); container_ := new TSOfficeContainer(sorted_child_); end; function GraphicData.Copy(_obj: GraphicData);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.XmlChildPic) then {self.}Pic.Copy(_obj.XmlChildPic); if not ifnil(_obj.XmlChildChart) then {self.}Chart.Copy(_obj.XmlChildChart); if not ifnil(_obj.XmlChildWsp) then {self.}Wsp.Copy(_obj.XmlChildWsp); tslassigning := tslassigning_backup; end; function GraphicData.ReadXmlAttrUri(); begin return {self.}XmlAttrUri.Value; end; function GraphicData.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 GraphicData.ReadXmlChildPic(); begin if tslassigning and ifnil({self.}XmlChildPic) then begin {self.}XmlChildPic := new Pic(self, "pic", "pic"); container_.Set({self.}XmlChildPic); end return {self.}XmlChildPic; end; function GraphicData.ReadXmlChildChart(); begin if tslassigning and ifnil({self.}XmlChildChart) then begin {self.}XmlChildChart := new Chart(self, "c", "chart"); container_.Set({self.}XmlChildChart); end return {self.}XmlChildChart; end; function GraphicData.ReadXmlChildWsp(); begin if tslassigning and ifnil({self.}XmlChildWsp) then begin {self.}XmlChildWsp := new Wsp(self, "wps", "wsp"); container_.Set({self.}XmlChildWsp); end return {self.}XmlChildWsp; end;