type ARPr = 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: ARPr);override; public // attributes property property Lang read ReadXmlAttrLang write WriteXmlAttrLang; property AltLang read ReadXmlAttrAltLang write WriteXmlAttrAltLang; property B read ReadXmlAttrB write WriteXmlAttrB; property Baseline read ReadXmlAttrBaseline write WriteXmlAttrBaseline; property I read ReadXmlAttrI write WriteXmlAttrI; property Kern read ReadXmlAttrKern write WriteXmlAttrKern; property Spc read ReadXmlAttrSpc write WriteXmlAttrSpc; property Strike read ReadXmlAttrStrike write WriteXmlAttrStrike; property Sz read ReadXmlAttrSz write WriteXmlAttrSz; property U read ReadXmlAttrU write WriteXmlAttrU; function ReadXmlAttrLang(); function WriteXmlAttrLang(_value); function ReadXmlAttrAltLang(); function WriteXmlAttrAltLang(_value); function ReadXmlAttrB(); function WriteXmlAttrB(_value); function ReadXmlAttrBaseline(); function WriteXmlAttrBaseline(_value); function ReadXmlAttrI(); function WriteXmlAttrI(_value); function ReadXmlAttrKern(); function WriteXmlAttrKern(_value); function ReadXmlAttrSpc(); function WriteXmlAttrSpc(_value); function ReadXmlAttrStrike(); function WriteXmlAttrStrike(_value); function ReadXmlAttrSz(); function WriteXmlAttrSz(_value); function ReadXmlAttrU(); function WriteXmlAttrU(_value); // normal property property SolidFill read ReadXmlChildSolidFill; property Latin read ReadXmlChildLatin; property Ea read ReadXmlChildEa; property Cs read ReadXmlChildCs; function ReadXmlChildSolidFill(); function ReadXmlChildLatin(); function ReadXmlChildEa(); function ReadXmlChildCs(); public // Attributes XmlAttrLang: OpenXmlAttribute; XmlAttrAltLang: OpenXmlAttribute; XmlAttrB: OpenXmlAttribute; XmlAttrBaseline: OpenXmlAttribute; XmlAttrI: OpenXmlAttribute; XmlAttrKern: OpenXmlAttribute; XmlAttrSpc: OpenXmlAttribute; XmlAttrStrike: OpenXmlAttribute; XmlAttrSz: OpenXmlAttribute; XmlAttrU: OpenXmlAttribute; // Children XmlChildSolidFill: SolidFill; XmlChildLatin: Latin; XmlChildEa: Latin; XmlChildCs: Latin; end; function ARPr.Create();overload; begin {self.}Create(nil, "a", "rPr"); end; function ARPr.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function ARPr.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 ARPr.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "lang": makeweakref(thisFunction(WriteXmlAttrLang)), "altLang": makeweakref(thisFunction(WriteXmlAttrAltLang)), "b": makeweakref(thisFunction(WriteXmlAttrB)), "baseline": makeweakref(thisFunction(WriteXmlAttrBaseline)), "i": makeweakref(thisFunction(WriteXmlAttrI)), "kern": makeweakref(thisFunction(WriteXmlAttrKern)), "spc": makeweakref(thisFunction(WriteXmlAttrSpc)), "strike": makeweakref(thisFunction(WriteXmlAttrStrike)), "sz": makeweakref(thisFunction(WriteXmlAttrSz)), "u": makeweakref(thisFunction(WriteXmlAttrU)), ); sorted_child_ := array( pre + "solidFill": array(0, makeweakref(thisFunction(ReadXmlChildSolidFill))), pre + "latin": array(1, makeweakref(thisFunction(ReadXmlChildLatin))), pre + "ea": array(2, makeweakref(thisFunction(ReadXmlChildEa))), pre + "cs": array(3, makeweakref(thisFunction(ReadXmlChildCs))), ); container_ := new TSOfficeContainer(sorted_child_); end; function ARPr.Copy(_obj: ARPr);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.Lang) then {self.}Lang := _obj.Lang; if not ifnil(_obj.AltLang) then {self.}AltLang := _obj.AltLang; if not ifnil(_obj.B) then {self.}B := _obj.B; if not ifnil(_obj.Baseline) then {self.}Baseline := _obj.Baseline; if not ifnil(_obj.I) then {self.}I := _obj.I; if not ifnil(_obj.Kern) then {self.}Kern := _obj.Kern; if not ifnil(_obj.Spc) then {self.}Spc := _obj.Spc; if not ifnil(_obj.Strike) then {self.}Strike := _obj.Strike; if not ifnil(_obj.Sz) then {self.}Sz := _obj.Sz; if not ifnil(_obj.U) then {self.}U := _obj.U; if not ifnil(_obj.XmlChildSolidFill) then {self.}SolidFill.Copy(_obj.XmlChildSolidFill); if not ifnil(_obj.XmlChildLatin) then {self.}Latin.Copy(_obj.XmlChildLatin); if not ifnil(_obj.XmlChildEa) then {self.}Ea.Copy(_obj.XmlChildEa); if not ifnil(_obj.XmlChildCs) then {self.}Cs.Copy(_obj.XmlChildCs); tslassigning := tslassigning_backup; end; function ARPr.ReadXmlAttrLang(); begin return {self.}XmlAttrLang.Value; end; function ARPr.WriteXmlAttrLang(_value); begin if ifnil({self.}XmlAttrLang) then begin {self.}XmlAttrLang := new OpenXmlAttribute("", "lang", nil); attributes_[length(attributes_)] := {self.}XmlAttrLang; end {self.}XmlAttrLang.Value := _value; end; function ARPr.ReadXmlAttrAltLang(); begin return {self.}XmlAttrAltLang.Value; end; function ARPr.WriteXmlAttrAltLang(_value); begin if ifnil({self.}XmlAttrAltLang) then begin {self.}XmlAttrAltLang := new OpenXmlAttribute("", "altLang", nil); attributes_[length(attributes_)] := {self.}XmlAttrAltLang; end {self.}XmlAttrAltLang.Value := _value; end; function ARPr.ReadXmlAttrB(); begin return {self.}XmlAttrB.Value; end; function ARPr.WriteXmlAttrB(_value); begin if ifnil({self.}XmlAttrB) then begin {self.}XmlAttrB := new OpenXmlAttribute("", "b", nil); attributes_[length(attributes_)] := {self.}XmlAttrB; end {self.}XmlAttrB.Value := _value; end; function ARPr.ReadXmlAttrBaseline(); begin return {self.}XmlAttrBaseline.Value; end; function ARPr.WriteXmlAttrBaseline(_value); begin if ifnil({self.}XmlAttrBaseline) then begin {self.}XmlAttrBaseline := new OpenXmlAttribute("", "baseline", nil); attributes_[length(attributes_)] := {self.}XmlAttrBaseline; end {self.}XmlAttrBaseline.Value := _value; end; function ARPr.ReadXmlAttrI(); begin return {self.}XmlAttrI.Value; end; function ARPr.WriteXmlAttrI(_value); begin if ifnil({self.}XmlAttrI) then begin {self.}XmlAttrI := new OpenXmlAttribute("", "i", nil); attributes_[length(attributes_)] := {self.}XmlAttrI; end {self.}XmlAttrI.Value := _value; end; function ARPr.ReadXmlAttrKern(); begin return {self.}XmlAttrKern.Value; end; function ARPr.WriteXmlAttrKern(_value); begin if ifnil({self.}XmlAttrKern) then begin {self.}XmlAttrKern := new OpenXmlAttribute("", "kern", nil); attributes_[length(attributes_)] := {self.}XmlAttrKern; end {self.}XmlAttrKern.Value := _value; end; function ARPr.ReadXmlAttrSpc(); begin return {self.}XmlAttrSpc.Value; end; function ARPr.WriteXmlAttrSpc(_value); begin if ifnil({self.}XmlAttrSpc) then begin {self.}XmlAttrSpc := new OpenXmlAttribute("", "spc", nil); attributes_[length(attributes_)] := {self.}XmlAttrSpc; end {self.}XmlAttrSpc.Value := _value; end; function ARPr.ReadXmlAttrStrike(); begin return {self.}XmlAttrStrike.Value; end; function ARPr.WriteXmlAttrStrike(_value); begin if ifnil({self.}XmlAttrStrike) then begin {self.}XmlAttrStrike := new OpenXmlAttribute("", "strike", nil); attributes_[length(attributes_)] := {self.}XmlAttrStrike; end {self.}XmlAttrStrike.Value := _value; end; function ARPr.ReadXmlAttrSz(); begin return {self.}XmlAttrSz.Value; end; function ARPr.WriteXmlAttrSz(_value); begin if ifnil({self.}XmlAttrSz) then begin {self.}XmlAttrSz := new OpenXmlAttribute("", "sz", nil); attributes_[length(attributes_)] := {self.}XmlAttrSz; end {self.}XmlAttrSz.Value := _value; end; function ARPr.ReadXmlAttrU(); begin return {self.}XmlAttrU.Value; end; function ARPr.WriteXmlAttrU(_value); begin if ifnil({self.}XmlAttrU) then begin {self.}XmlAttrU := new OpenXmlAttribute("", "u", nil); attributes_[length(attributes_)] := {self.}XmlAttrU; end {self.}XmlAttrU.Value := _value; end; function ARPr.ReadXmlChildSolidFill(); begin if tslassigning and ifnil({self.}XmlChildSolidFill) then begin {self.}XmlChildSolidFill := new SolidFill(self, {self.}Prefix, "solidFill"); container_.Set({self.}XmlChildSolidFill); end return {self.}XmlChildSolidFill; end; function ARPr.ReadXmlChildLatin(); begin if tslassigning and ifnil({self.}XmlChildLatin) then begin {self.}XmlChildLatin := new Latin(self, {self.}Prefix, "latin"); container_.Set({self.}XmlChildLatin); end return {self.}XmlChildLatin; end; function ARPr.ReadXmlChildEa(); begin if tslassigning and ifnil({self.}XmlChildEa) then begin {self.}XmlChildEa := new Latin(self, {self.}Prefix, "ea"); container_.Set({self.}XmlChildEa); end return {self.}XmlChildEa; end; function ARPr.ReadXmlChildCs(); begin if tslassigning and ifnil({self.}XmlChildCs) then begin {self.}XmlChildCs := new Latin(self, {self.}Prefix, "cs"); container_.Set({self.}XmlChildCs); end return {self.}XmlChildCs; end;