type TcBorders = 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: TcBorders);override; public // normal property property Top read ReadXmlChildTop; property Left read ReadXmlChildLeft; property Bottom read ReadXmlChildBottom; property Right read ReadXmlChildRight; property Tl2Br read ReadXmlChildTl2Br; property Tr2Bl read ReadXmlChildTr2Bl; property InsideH read ReadXmlChildInsideH; property InsideV read ReadXmlChildInsideV; function ReadXmlChildTop(); function ReadXmlChildLeft(); function ReadXmlChildBottom(); function ReadXmlChildRight(); function ReadXmlChildTl2Br(); function ReadXmlChildTr2Bl(); function ReadXmlChildInsideH(); function ReadXmlChildInsideV(); public // Children XmlChildTop: TcBorder; XmlChildLeft: TcBorder; XmlChildBottom: TcBorder; XmlChildRight: TcBorder; XmlChildTl2Br: TcBorder; XmlChildTr2Bl: TcBorder; XmlChildInsideH: TcBorder; XmlChildInsideV: TcBorder; end; function TcBorders.Create();overload; begin {self.}Create(nil, "w", "tcBorders"); end; function TcBorders.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function TcBorders.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 TcBorders.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( ); sorted_child_ := array( pre + "top": array(0, makeweakref(thisFunction(ReadXmlChildTop))), pre + "left": array(1, makeweakref(thisFunction(ReadXmlChildLeft))), pre + "bottom": array(2, makeweakref(thisFunction(ReadXmlChildBottom))), pre + "right": array(3, makeweakref(thisFunction(ReadXmlChildRight))), pre + "tl2br": array(4, makeweakref(thisFunction(ReadXmlChildTl2Br))), pre + "tr2bl": array(5, makeweakref(thisFunction(ReadXmlChildTr2Bl))), pre + "insideH": array(6, makeweakref(thisFunction(ReadXmlChildInsideH))), pre + "insideV": array(7, makeweakref(thisFunction(ReadXmlChildInsideV))), ); container_ := new TSOfficeContainer(sorted_child_); end; function TcBorders.Copy(_obj: TcBorders);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.XmlChildTop) then {self.}Top.Copy(_obj.XmlChildTop); if not ifnil(_obj.XmlChildLeft) then {self.}Left.Copy(_obj.XmlChildLeft); if not ifnil(_obj.XmlChildBottom) then {self.}Bottom.Copy(_obj.XmlChildBottom); if not ifnil(_obj.XmlChildRight) then {self.}Right.Copy(_obj.XmlChildRight); if not ifnil(_obj.XmlChildTl2Br) then {self.}Tl2Br.Copy(_obj.XmlChildTl2Br); if not ifnil(_obj.XmlChildTr2Bl) then {self.}Tr2Bl.Copy(_obj.XmlChildTr2Bl); if not ifnil(_obj.XmlChildInsideH) then {self.}InsideH.Copy(_obj.XmlChildInsideH); if not ifnil(_obj.XmlChildInsideV) then {self.}InsideV.Copy(_obj.XmlChildInsideV); tslassigning := tslassigning_backup; end; function TcBorders.ReadXmlChildTop(); begin if tslassigning and ifnil({self.}XmlChildTop) then begin {self.}XmlChildTop := new TcBorder(self, {self.}Prefix, "top"); container_.Set({self.}XmlChildTop); end return {self.}XmlChildTop; end; function TcBorders.ReadXmlChildLeft(); begin if tslassigning and ifnil({self.}XmlChildLeft) then begin {self.}XmlChildLeft := new TcBorder(self, {self.}Prefix, "left"); container_.Set({self.}XmlChildLeft); end return {self.}XmlChildLeft; end; function TcBorders.ReadXmlChildBottom(); begin if tslassigning and ifnil({self.}XmlChildBottom) then begin {self.}XmlChildBottom := new TcBorder(self, {self.}Prefix, "bottom"); container_.Set({self.}XmlChildBottom); end return {self.}XmlChildBottom; end; function TcBorders.ReadXmlChildRight(); begin if tslassigning and ifnil({self.}XmlChildRight) then begin {self.}XmlChildRight := new TcBorder(self, {self.}Prefix, "right"); container_.Set({self.}XmlChildRight); end return {self.}XmlChildRight; end; function TcBorders.ReadXmlChildTl2Br(); begin if tslassigning and ifnil({self.}XmlChildTl2Br) then begin {self.}XmlChildTl2Br := new TcBorder(self, {self.}Prefix, "tl2br"); container_.Set({self.}XmlChildTl2Br); end return {self.}XmlChildTl2Br; end; function TcBorders.ReadXmlChildTr2Bl(); begin if tslassigning and ifnil({self.}XmlChildTr2Bl) then begin {self.}XmlChildTr2Bl := new TcBorder(self, {self.}Prefix, "tr2bl"); container_.Set({self.}XmlChildTr2Bl); end return {self.}XmlChildTr2Bl; end; function TcBorders.ReadXmlChildInsideH(); begin if tslassigning and ifnil({self.}XmlChildInsideH) then begin {self.}XmlChildInsideH := new TcBorder(self, {self.}Prefix, "insideH"); container_.Set({self.}XmlChildInsideH); end return {self.}XmlChildInsideH; end; function TcBorders.ReadXmlChildInsideV(); begin if tslassigning and ifnil({self.}XmlChildInsideV) then begin {self.}XmlChildInsideV := new TcBorder(self, {self.}Prefix, "insideV"); container_.Set({self.}XmlChildInsideV); end return {self.}XmlChildInsideV; end;