type Gs = 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: Gs);override; public // attributes property property Pos read ReadXmlAttrPos write WriteXmlAttrPos; function ReadXmlAttrPos(); function WriteXmlAttrPos(_value); // normal property property SchemeClr read ReadXmlChildSchemeClr; function ReadXmlChildSchemeClr(); public // Attributes XmlAttrPos: OpenXmlAttribute; // Children XmlChildSchemeClr: SchemeClr; end; function Gs.Create();overload; begin {self.}Create(nil, "a", "gs"); end; function Gs.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function Gs.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 Gs.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "pos": makeweakref(thisFunction(WriteXmlAttrPos)), ); sorted_child_ := array( pre + "schemeClr": array(0, makeweakref(thisFunction(ReadXmlChildSchemeClr))), ); container_ := new TSOfficeContainer(sorted_child_); end; function Gs.Copy(_obj: Gs);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.Pos) then {self.}Pos := _obj.Pos; if not ifnil(_obj.XmlChildSchemeClr) then {self.}SchemeClr.Copy(_obj.XmlChildSchemeClr); tslassigning := tslassigning_backup; end; function Gs.ReadXmlAttrPos(); begin return {self.}XmlAttrPos.Value; end; function Gs.WriteXmlAttrPos(_value); begin if ifnil({self.}XmlAttrPos) then begin {self.}XmlAttrPos := new OpenXmlAttribute("", "pos", nil); attributes_[length(attributes_)] := {self.}XmlAttrPos; end {self.}XmlAttrPos.Value := _value; end; function Gs.ReadXmlChildSchemeClr(); begin if tslassigning and ifnil({self.}XmlChildSchemeClr) then begin {self.}XmlChildSchemeClr := new SchemeClr(self, {self.}Prefix, "schemeClr"); container_.Set({self.}XmlChildSchemeClr); end return {self.}XmlChildSchemeClr; end;