type Imagedata = 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: Imagedata);override; public // attributes property property Id read ReadXmlAttrId write WriteXmlAttrId; property Title read ReadXmlAttrTitle write WriteXmlAttrTitle; function ReadXmlAttrId(); function WriteXmlAttrId(_value); function ReadXmlAttrTitle(); function WriteXmlAttrTitle(_value); public // Attributes XmlAttrId: OpenXmlAttribute; XmlAttrTitle: OpenXmlAttribute; end; function Imagedata.Create();overload; begin {self.}Create(nil, "v", "imagedata"); end; function Imagedata.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function Imagedata.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 Imagedata.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "r:id": makeweakref(thisFunction(WriteXmlAttrId)), "o:title": makeweakref(thisFunction(WriteXmlAttrTitle)), ); sorted_child_ := array( ); container_ := new TSOfficeContainer(sorted_child_); end; function Imagedata.Copy(_obj: Imagedata);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.Id) then {self.}Id := _obj.Id; if not ifnil(_obj.Title) then {self.}Title := _obj.Title; tslassigning := tslassigning_backup; end; function Imagedata.ReadXmlAttrId(); begin return {self.}XmlAttrId.Value; end; function Imagedata.WriteXmlAttrId(_value); begin if ifnil({self.}XmlAttrId) then begin {self.}XmlAttrId := new OpenXmlAttribute("r", "id", nil); attributes_[length(attributes_)] := {self.}XmlAttrId; end {self.}XmlAttrId.Value := _value; end; function Imagedata.ReadXmlAttrTitle(); begin return {self.}XmlAttrTitle.Value; end; function Imagedata.WriteXmlAttrTitle(_value); begin if ifnil({self.}XmlAttrTitle) then begin {self.}XmlAttrTitle := new OpenXmlAttribute("o", "title", nil); attributes_[length(attributes_)] := {self.}XmlAttrTitle; end {self.}XmlAttrTitle.Value := _value; end;