type Shd = 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: Shd);override; public // attributes property property Val read ReadXmlAttrVal write WriteXmlAttrVal; property Color read ReadXmlAttrColor write WriteXmlAttrColor; property Fill read ReadXmlAttrFill write WriteXmlAttrFill; property ThemeFill read ReadXmlAttrThemeFill write WriteXmlAttrThemeFill; property ThemeFillTint read ReadXmlAttrThemeFillTint write WriteXmlAttrThemeFillTint; function ReadXmlAttrVal(); function WriteXmlAttrVal(_value); function ReadXmlAttrColor(); function WriteXmlAttrColor(_value); function ReadXmlAttrFill(); function WriteXmlAttrFill(_value); function ReadXmlAttrThemeFill(); function WriteXmlAttrThemeFill(_value); function ReadXmlAttrThemeFillTint(); function WriteXmlAttrThemeFillTint(_value); public // Attributes XmlAttrVal: OpenXmlAttribute; XmlAttrColor: OpenXmlAttribute; XmlAttrFill: OpenXmlAttribute; XmlAttrThemeFill: OpenXmlAttribute; XmlAttrThemeFillTint: OpenXmlAttribute; end; function Shd.Create();overload; begin {self.}Create(nil, "w", "shd"); end; function Shd.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function Shd.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 Shd.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "w:val": makeweakref(thisFunction(WriteXmlAttrVal)), "w:color": makeweakref(thisFunction(WriteXmlAttrColor)), "w:fill": makeweakref(thisFunction(WriteXmlAttrFill)), "w:themeFill": makeweakref(thisFunction(WriteXmlAttrThemeFill)), "w:themeFillTint": makeweakref(thisFunction(WriteXmlAttrThemeFillTint)), ); sorted_child_ := array( ); container_ := new TSOfficeContainer(sorted_child_); end; function Shd.Copy(_obj: Shd);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.Val) then {self.}Val := _obj.Val; if not ifnil(_obj.Color) then {self.}Color := _obj.Color; if not ifnil(_obj.Fill) then {self.}Fill := _obj.Fill; if not ifnil(_obj.ThemeFill) then {self.}ThemeFill := _obj.ThemeFill; if not ifnil(_obj.ThemeFillTint) then {self.}ThemeFillTint := _obj.ThemeFillTint; tslassigning := tslassigning_backup; end; function Shd.ReadXmlAttrVal(); begin return {self.}XmlAttrVal.Value; end; function Shd.WriteXmlAttrVal(_value); begin if ifnil({self.}XmlAttrVal) then begin {self.}XmlAttrVal := new OpenXmlAttribute("w", "val", nil); attributes_[length(attributes_)] := {self.}XmlAttrVal; end {self.}XmlAttrVal.Value := _value; end; function Shd.ReadXmlAttrColor(); begin return {self.}XmlAttrColor.Value; end; function Shd.WriteXmlAttrColor(_value); begin if ifnil({self.}XmlAttrColor) then begin {self.}XmlAttrColor := new OpenXmlAttribute("w", "color", nil); attributes_[length(attributes_)] := {self.}XmlAttrColor; end {self.}XmlAttrColor.Value := _value; end; function Shd.ReadXmlAttrFill(); begin return {self.}XmlAttrFill.Value; end; function Shd.WriteXmlAttrFill(_value); begin if ifnil({self.}XmlAttrFill) then begin {self.}XmlAttrFill := new OpenXmlAttribute("w", "fill", nil); attributes_[length(attributes_)] := {self.}XmlAttrFill; end {self.}XmlAttrFill.Value := _value; end; function Shd.ReadXmlAttrThemeFill(); begin return {self.}XmlAttrThemeFill.Value; end; function Shd.WriteXmlAttrThemeFill(_value); begin if ifnil({self.}XmlAttrThemeFill) then begin {self.}XmlAttrThemeFill := new OpenXmlAttribute("w", "themeFill", nil); attributes_[length(attributes_)] := {self.}XmlAttrThemeFill; end {self.}XmlAttrThemeFill.Value := _value; end; function Shd.ReadXmlAttrThemeFillTint(); begin return {self.}XmlAttrThemeFillTint.Value; end; function Shd.WriteXmlAttrThemeFillTint(_value); begin if ifnil({self.}XmlAttrThemeFillTint) then begin {self.}XmlAttrThemeFillTint := new OpenXmlAttribute("w", "themeFillTint", nil); attributes_[length(attributes_)] := {self.}XmlAttrThemeFillTint; end {self.}XmlAttrThemeFillTint.Value := _value; end;