type CNvPr = 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: CNvPr);override; public // attributes property property Id read ReadXmlAttrId write WriteXmlAttrId; property Name read ReadXmlAttrName write WriteXmlAttrName; property Descr read ReadXmlAttrDescr write WriteXmlAttrDescr; function ReadXmlAttrId(); function WriteXmlAttrId(_value); function ReadXmlAttrName(); function WriteXmlAttrName(_value); function ReadXmlAttrDescr(); function WriteXmlAttrDescr(_value); public // Attributes XmlAttrId: OpenXmlAttribute; XmlAttrName: OpenXmlAttribute; XmlAttrDescr: OpenXmlAttribute; end; function CNvPr.Create();overload; begin {self.}Create(nil, "pic", "cNvPr"); end; function CNvPr.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function CNvPr.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 CNvPr.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "id": makeweakref(thisFunction(WriteXmlAttrId)), "name": makeweakref(thisFunction(WriteXmlAttrName)), "descr": makeweakref(thisFunction(WriteXmlAttrDescr)), ); sorted_child_ := array( ); container_ := new TSOfficeContainer(sorted_child_); end; function CNvPr.Copy(_obj: CNvPr);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.Name) then {self.}Name := _obj.Name; if not ifnil(_obj.Descr) then {self.}Descr := _obj.Descr; tslassigning := tslassigning_backup; end; function CNvPr.ReadXmlAttrId(); begin return {self.}XmlAttrId.Value; end; function CNvPr.WriteXmlAttrId(_value); begin if ifnil({self.}XmlAttrId) then begin {self.}XmlAttrId := new OpenXmlAttribute("", "id", nil); attributes_[length(attributes_)] := {self.}XmlAttrId; end {self.}XmlAttrId.Value := _value; end; function CNvPr.ReadXmlAttrName(); begin return {self.}XmlAttrName.Value; end; function CNvPr.WriteXmlAttrName(_value); begin if ifnil({self.}XmlAttrName) then begin {self.}XmlAttrName := new OpenXmlAttribute("", "name", nil); attributes_[length(attributes_)] := {self.}XmlAttrName; end {self.}XmlAttrName.Value := _value; end; function CNvPr.ReadXmlAttrDescr(); begin return {self.}XmlAttrDescr.Value; end; function CNvPr.WriteXmlAttrDescr(_value); begin if ifnil({self.}XmlAttrDescr) then begin {self.}XmlAttrDescr := new OpenXmlAttribute("", "descr", nil); attributes_[length(attributes_)] := {self.}XmlAttrDescr; end {self.}XmlAttrDescr.Value := _value; end;