type TblStylePr = 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: TblStylePr);override; public // attributes property property Type read ReadXmlAttrType write WriteXmlAttrType; function ReadXmlAttrType(); function WriteXmlAttrType(_value); // normal property property PPr read ReadXmlChildPPr; property RPr read ReadXmlChildRPr; property TblPr read ReadXmlChildTblPr; property TrPr read ReadXmlChildTrPr; property TcPr read ReadXmlChildTcPr; function ReadXmlChildPPr(); function ReadXmlChildRPr(); function ReadXmlChildTblPr(); function ReadXmlChildTrPr(); function ReadXmlChildTcPr(); public // Attributes XmlAttrType: OpenXmlAttribute; // Children XmlChildPPr: PPr; XmlChildRPr: RPr; XmlChildTblPr: TblPr; XmlChildTrPr: TrPr; XmlChildTcPr: TcPr; end; function TblStylePr.Create();overload; begin {self.}Create(nil, "w", "tblStylePr"); end; function TblStylePr.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function TblStylePr.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 TblStylePr.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( pre + "type": makeweakref(thisFunction(WriteXmlAttrType)), ); sorted_child_ := array( pre + "pPr": array(0, makeweakref(thisFunction(ReadXmlChildPPr))), pre + "rPr": array(1, makeweakref(thisFunction(ReadXmlChildRPr))), pre + "tblPr": array(2, makeweakref(thisFunction(ReadXmlChildTblPr))), pre + "trPr": array(3, makeweakref(thisFunction(ReadXmlChildTrPr))), pre + "tcPr": array(4, makeweakref(thisFunction(ReadXmlChildTcPr))), ); container_ := new TSOfficeContainer(sorted_child_); end; function TblStylePr.Copy(_obj: TblStylePr);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.Type) then {self.}Type := _obj.Type; if not ifnil(_obj.XmlChildPPr) then {self.}PPr.Copy(_obj.XmlChildPPr); if not ifnil(_obj.XmlChildRPr) then {self.}RPr.Copy(_obj.XmlChildRPr); if not ifnil(_obj.XmlChildTblPr) then {self.}TblPr.Copy(_obj.XmlChildTblPr); if not ifnil(_obj.XmlChildTrPr) then {self.}TrPr.Copy(_obj.XmlChildTrPr); if not ifnil(_obj.XmlChildTcPr) then {self.}TcPr.Copy(_obj.XmlChildTcPr); tslassigning := tslassigning_backup; end; function TblStylePr.ReadXmlAttrType(); begin return {self.}XmlAttrType.Value; end; function TblStylePr.WriteXmlAttrType(_value); begin if ifnil({self.}XmlAttrType) then begin {self.}XmlAttrType := new OpenXmlAttribute({self.}Prefix, "type", nil); attributes_[length(attributes_)] := {self.}XmlAttrType; end {self.}XmlAttrType.Value := _value; end; function TblStylePr.ReadXmlChildPPr(); begin if tslassigning and ifnil({self.}XmlChildPPr) then begin {self.}XmlChildPPr := new PPr(self, {self.}Prefix, "pPr"); container_.Set({self.}XmlChildPPr); end return {self.}XmlChildPPr; end; function TblStylePr.ReadXmlChildRPr(); begin if tslassigning and ifnil({self.}XmlChildRPr) then begin {self.}XmlChildRPr := new RPr(self, {self.}Prefix, "rPr"); container_.Set({self.}XmlChildRPr); end return {self.}XmlChildRPr; end; function TblStylePr.ReadXmlChildTblPr(); begin if tslassigning and ifnil({self.}XmlChildTblPr) then begin {self.}XmlChildTblPr := new TblPr(self, {self.}Prefix, "tblPr"); container_.Set({self.}XmlChildTblPr); end return {self.}XmlChildTblPr; end; function TblStylePr.ReadXmlChildTrPr(); begin if tslassigning and ifnil({self.}XmlChildTrPr) then begin {self.}XmlChildTrPr := new TrPr(self, {self.}Prefix, "trPr"); container_.Set({self.}XmlChildTrPr); end return {self.}XmlChildTrPr; end; function TblStylePr.ReadXmlChildTcPr(); begin if tslassigning and ifnil({self.}XmlChildTcPr) then begin {self.}XmlChildTcPr := new TcPr(self, {self.}Prefix, "tcPr"); container_.Set({self.}XmlChildTcPr); end return {self.}XmlChildTcPr; end;