type MFontFont = 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: MFontFont);override; public // attributes property property Script read ReadXmlAttrScript write WriteXmlAttrScript; property Typeface read ReadXmlAttrTypeface write WriteXmlAttrTypeface; function ReadXmlAttrScript(); function WriteXmlAttrScript(_value); function ReadXmlAttrTypeface(); function WriteXmlAttrTypeface(_value); public // Attributes XmlAttrScript: OpenXmlAttribute; XmlAttrTypeface: OpenXmlAttribute; end; function MFontFont.Create();overload; begin {self.}Create(nil, "a", "defRPr"); end; function MFontFont.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function MFontFont.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 MFontFont.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "script": makeweakref(thisFunction(WriteXmlAttrScript)), "typeface": makeweakref(thisFunction(WriteXmlAttrTypeface)), ); sorted_child_ := array( ); container_ := new TSOfficeContainer(sorted_child_); end; function MFontFont.Copy(_obj: MFontFont);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.Script) then {self.}Script := _obj.Script; if not ifnil(_obj.Typeface) then {self.}Typeface := _obj.Typeface; tslassigning := tslassigning_backup; end; function MFontFont.ReadXmlAttrScript(); begin return {self.}XmlAttrScript.Value; end; function MFontFont.WriteXmlAttrScript(_value); begin if ifnil({self.}XmlAttrScript) then begin {self.}XmlAttrScript := new OpenXmlAttribute("", "script", nil); attributes_[length(attributes_)] := {self.}XmlAttrScript; end {self.}XmlAttrScript.Value := _value; end; function MFontFont.ReadXmlAttrTypeface(); begin return {self.}XmlAttrTypeface.Value; end; function MFontFont.WriteXmlAttrTypeface(_value); begin if ifnil({self.}XmlAttrTypeface) then begin {self.}XmlAttrTypeface := new OpenXmlAttribute("", "typeface", nil); attributes_[length(attributes_)] := {self.}XmlAttrTypeface; end {self.}XmlAttrTypeface.Value := _value; end;