type Tabs = 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: Tabs);override; public // multi property property Tabs read ReadTabs; function ReadTabs(_index); function AddTab(): Tab; function AppendTab(): Tab; public // Children end; function Tabs.Create();overload; begin {self.}Create(nil, "w", "tabs"); end; function Tabs.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function Tabs.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 Tabs.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( ); sorted_child_ := array( pre + "tab": array(0, makeweakref(thisFunction(AppendTab))), ); container_ := new TSOfficeContainer(sorted_child_); end; function Tabs.Copy(_obj: Tabs);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); tslassigning := tslassigning_backup; end; function Tabs.ReadTabs(_index); begin ind := ifnil(_index) ? -2 : _index; pre := {self.}Prefix ? {self.}Prefix + ":" : ""; return container_.Get(pre + "tab", ind); end; function Tabs.AddTab(): Tab; begin obj := new Tab(self, {self.}Prefix, "tab"); container_.Insert(obj); return obj; end; function Tabs.AppendTab(): Tab; begin obj := new Tab(self, {self.}Prefix, "tab"); container_.Append(obj); return obj; end;