type FmtScheme = 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: FmtScheme);override; public // attributes property property Name read ReadXmlAttrName write WriteXmlAttrName; function ReadXmlAttrName(); function WriteXmlAttrName(_value); // normal property property FillStyleLst read ReadXmlChildFillStyleLst; property LnStyleLst read ReadXmlChildLnStyleLst; property EffectStyleLst read ReadXmlChildEffectStyleLst; property BgFillStyleLst read ReadXmlChildBgFillStyleLst; function ReadXmlChildFillStyleLst(); function ReadXmlChildLnStyleLst(); function ReadXmlChildEffectStyleLst(); function ReadXmlChildBgFillStyleLst(); public // Attributes XmlAttrName: OpenXmlAttribute; // Children XmlChildFillStyleLst: FillStyleLst; XmlChildLnStyleLst: LnStyleLst; XmlChildEffectStyleLst: EffectStyleLst; XmlChildBgFillStyleLst: FillStyleLst; end; function FmtScheme.Create();overload; begin {self.}Create(nil, "a", "fmtScheme"); end; function FmtScheme.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function FmtScheme.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 FmtScheme.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "name": makeweakref(thisFunction(WriteXmlAttrName)), ); sorted_child_ := array( pre + "fillStyleLst": array(0, makeweakref(thisFunction(ReadXmlChildFillStyleLst))), pre + "lnStyleLst": array(1, makeweakref(thisFunction(ReadXmlChildLnStyleLst))), pre + "effectStyleLst": array(2, makeweakref(thisFunction(ReadXmlChildEffectStyleLst))), pre + "bgFillStyleLst": array(3, makeweakref(thisFunction(ReadXmlChildBgFillStyleLst))), ); container_ := new TSOfficeContainer(sorted_child_); end; function FmtScheme.Copy(_obj: FmtScheme);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.Name) then {self.}Name := _obj.Name; if not ifnil(_obj.XmlChildFillStyleLst) then {self.}FillStyleLst.Copy(_obj.XmlChildFillStyleLst); if not ifnil(_obj.XmlChildLnStyleLst) then {self.}LnStyleLst.Copy(_obj.XmlChildLnStyleLst); if not ifnil(_obj.XmlChildEffectStyleLst) then {self.}EffectStyleLst.Copy(_obj.XmlChildEffectStyleLst); if not ifnil(_obj.XmlChildBgFillStyleLst) then {self.}BgFillStyleLst.Copy(_obj.XmlChildBgFillStyleLst); tslassigning := tslassigning_backup; end; function FmtScheme.ReadXmlAttrName(); begin return {self.}XmlAttrName.Value; end; function FmtScheme.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 FmtScheme.ReadXmlChildFillStyleLst(); begin if tslassigning and ifnil({self.}XmlChildFillStyleLst) then begin {self.}XmlChildFillStyleLst := new FillStyleLst(self, {self.}Prefix, "fillStyleLst"); container_.Set({self.}XmlChildFillStyleLst); end return {self.}XmlChildFillStyleLst; end; function FmtScheme.ReadXmlChildLnStyleLst(); begin if tslassigning and ifnil({self.}XmlChildLnStyleLst) then begin {self.}XmlChildLnStyleLst := new LnStyleLst(self, {self.}Prefix, "lnStyleLst"); container_.Set({self.}XmlChildLnStyleLst); end return {self.}XmlChildLnStyleLst; end; function FmtScheme.ReadXmlChildEffectStyleLst(); begin if tslassigning and ifnil({self.}XmlChildEffectStyleLst) then begin {self.}XmlChildEffectStyleLst := new EffectStyleLst(self, {self.}Prefix, "effectStyleLst"); container_.Set({self.}XmlChildEffectStyleLst); end return {self.}XmlChildEffectStyleLst; end; function FmtScheme.ReadXmlChildBgFillStyleLst(); begin if tslassigning and ifnil({self.}XmlChildBgFillStyleLst) then begin {self.}XmlChildBgFillStyleLst := new FillStyleLst(self, {self.}Prefix, "bgFillStyleLst"); container_.Set({self.}XmlChildBgFillStyleLst); end return {self.}XmlChildBgFillStyleLst; end;