type CNvSpPr = 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: CNvSpPr);override; public // attributes property property TxBox read ReadXmlAttrTxBox write WriteXmlAttrTxBox; function ReadXmlAttrTxBox(); function WriteXmlAttrTxBox(_value); // normal property property SpLocks read ReadXmlChildSpLocks; function ReadXmlChildSpLocks(); public // Attributes XmlAttrTxBox: OpenXmlAttribute; // Children XmlChildSpLocks: SpLocks; end; function CNvSpPr.Create();overload; begin {self.}Create(nil, "wps", "cNvSpPr"); end; function CNvSpPr.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function CNvSpPr.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 CNvSpPr.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "txBox": makeweakref(thisFunction(WriteXmlAttrTxBox)), ); sorted_child_ := array( "a:spLocks": array(0, makeweakref(thisFunction(ReadXmlChildSpLocks))), ); container_ := new TSOfficeContainer(sorted_child_); end; function CNvSpPr.Copy(_obj: CNvSpPr);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.TxBox) then {self.}TxBox := _obj.TxBox; if not ifnil(_obj.XmlChildSpLocks) then {self.}SpLocks.Copy(_obj.XmlChildSpLocks); tslassigning := tslassigning_backup; end; function CNvSpPr.ReadXmlAttrTxBox(); begin return {self.}XmlAttrTxBox.Value; end; function CNvSpPr.WriteXmlAttrTxBox(_value); begin if ifnil({self.}XmlAttrTxBox) then begin {self.}XmlAttrTxBox := new OpenXmlAttribute("", "txBox", nil); attributes_[length(attributes_)] := {self.}XmlAttrTxBox; end {self.}XmlAttrTxBox.Value := _value; end; function CNvSpPr.ReadXmlChildSpLocks(); begin if tslassigning and ifnil({self.}XmlChildSpLocks) then begin {self.}XmlChildSpLocks := new SpLocks(self, "a", "spLocks"); container_.Set({self.}XmlChildSpLocks); end return {self.}XmlChildSpLocks; end;