type Ln = 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: Ln);override; public // attributes property property W read ReadXmlAttrW write WriteXmlAttrW; property Cap read ReadXmlAttrCap write WriteXmlAttrCap; property Cmpd read ReadXmlAttrCmpd write WriteXmlAttrCmpd; property Algn read ReadXmlAttrAlgn write WriteXmlAttrAlgn; function ReadXmlAttrW(); function WriteXmlAttrW(_value); function ReadXmlAttrCap(); function WriteXmlAttrCap(_value); function ReadXmlAttrCmpd(); function WriteXmlAttrCmpd(_value); function ReadXmlAttrAlgn(); function WriteXmlAttrAlgn(_value); // normal property property SolidFill read ReadXmlChildSolidFill; property PrstDash read ReadXmlChildPrstDash; property Miter read ReadXmlChildMiter; function ReadXmlChildSolidFill(); function ReadXmlChildPrstDash(); function ReadXmlChildMiter(); public // Attributes XmlAttrW: OpenXmlAttribute; XmlAttrCap: OpenXmlAttribute; XmlAttrCmpd: OpenXmlAttribute; XmlAttrAlgn: OpenXmlAttribute; // Children XmlChildSolidFill: SolidFill; XmlChildPrstDash: PureVal; XmlChildMiter: Miter; end; function Ln.Create();overload; begin {self.}Create(nil, "a", "ln"); end; function Ln.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function Ln.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 Ln.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( "w": makeweakref(thisFunction(WriteXmlAttrW)), "cap": makeweakref(thisFunction(WriteXmlAttrCap)), "cmpd": makeweakref(thisFunction(WriteXmlAttrCmpd)), "algn": makeweakref(thisFunction(WriteXmlAttrAlgn)), ); sorted_child_ := array( pre + "solidFill": array(0, makeweakref(thisFunction(ReadXmlChildSolidFill))), pre + "prstDash": array(1, makeweakref(thisFunction(ReadXmlChildPrstDash))), pre + "miter": array(2, makeweakref(thisFunction(ReadXmlChildMiter))), ); container_ := new TSOfficeContainer(sorted_child_); end; function Ln.Copy(_obj: Ln);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.W) then {self.}W := _obj.W; if not ifnil(_obj.Cap) then {self.}Cap := _obj.Cap; if not ifnil(_obj.Cmpd) then {self.}Cmpd := _obj.Cmpd; if not ifnil(_obj.Algn) then {self.}Algn := _obj.Algn; if not ifnil(_obj.XmlChildSolidFill) then {self.}SolidFill.Copy(_obj.XmlChildSolidFill); if not ifnil(_obj.XmlChildPrstDash) then {self.}PrstDash.Copy(_obj.XmlChildPrstDash); if not ifnil(_obj.XmlChildMiter) then {self.}Miter.Copy(_obj.XmlChildMiter); tslassigning := tslassigning_backup; end; function Ln.ReadXmlAttrW(); begin return {self.}XmlAttrW.Value; end; function Ln.WriteXmlAttrW(_value); begin if ifnil({self.}XmlAttrW) then begin {self.}XmlAttrW := new OpenXmlAttribute("", "w", nil); attributes_[length(attributes_)] := {self.}XmlAttrW; end {self.}XmlAttrW.Value := _value; end; function Ln.ReadXmlAttrCap(); begin return {self.}XmlAttrCap.Value; end; function Ln.WriteXmlAttrCap(_value); begin if ifnil({self.}XmlAttrCap) then begin {self.}XmlAttrCap := new OpenXmlAttribute("", "cap", nil); attributes_[length(attributes_)] := {self.}XmlAttrCap; end {self.}XmlAttrCap.Value := _value; end; function Ln.ReadXmlAttrCmpd(); begin return {self.}XmlAttrCmpd.Value; end; function Ln.WriteXmlAttrCmpd(_value); begin if ifnil({self.}XmlAttrCmpd) then begin {self.}XmlAttrCmpd := new OpenXmlAttribute("", "cmpd", nil); attributes_[length(attributes_)] := {self.}XmlAttrCmpd; end {self.}XmlAttrCmpd.Value := _value; end; function Ln.ReadXmlAttrAlgn(); begin return {self.}XmlAttrAlgn.Value; end; function Ln.WriteXmlAttrAlgn(_value); begin if ifnil({self.}XmlAttrAlgn) then begin {self.}XmlAttrAlgn := new OpenXmlAttribute("", "algn", nil); attributes_[length(attributes_)] := {self.}XmlAttrAlgn; end {self.}XmlAttrAlgn.Value := _value; end; function Ln.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 Ln.ReadXmlChildPrstDash(); begin if tslassigning and ifnil({self.}XmlChildPrstDash) then begin {self.}XmlChildPrstDash := new PureVal(self, {self.}Prefix, "prstDash"); container_.Set({self.}XmlChildPrstDash); end return {self.}XmlChildPrstDash; end; function Ln.ReadXmlChildMiter(); begin if tslassigning and ifnil({self.}XmlChildMiter) then begin {self.}XmlChildMiter := new Miter(self, {self.}Prefix, "miter"); container_.Set({self.}XmlChildMiter); end return {self.}XmlChildMiter; end;