type Compat = 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: Compat);override; public // empty property property SpaceForUL read ReadXmlChildSpaceForUL write WriteXmlChildSpaceForUL; property BalanceSingleByteDoubleByteWidth read ReadXmlChildBalanceSingleByteDoubleByteWidth write WriteXmlChildBalanceSingleByteDoubleByteWidth; property DoNotLeaveBackslashAlone read ReadXmlChildDoNotLeaveBackslashAlone write WriteXmlChildDoNotLeaveBackslashAlone; property UlTrailSpace read ReadXmlChildUlTrailSpace write WriteXmlChildUlTrailSpace; property DoNotExpandShiftReturn read ReadXmlChildDoNotExpandShiftReturn write WriteXmlChildDoNotExpandShiftReturn; property AdjustLineHeightInTable read ReadXmlChildAdjustLineHeightInTable write WriteXmlChildAdjustLineHeightInTable; property UseFELayout read ReadXmlChildUseFELayout write WriteXmlChildUseFELayout; property CompatSetting read ReadXmlChildCompatSetting write WriteXmlChildCompatSetting; function ReadXmlChildSpaceForUL(); function WriteXmlChildSpaceForUL(_value); function ReadXmlChildBalanceSingleByteDoubleByteWidth(); function WriteXmlChildBalanceSingleByteDoubleByteWidth(_value); function ReadXmlChildDoNotLeaveBackslashAlone(); function WriteXmlChildDoNotLeaveBackslashAlone(_value); function ReadXmlChildUlTrailSpace(); function WriteXmlChildUlTrailSpace(_value); function ReadXmlChildDoNotExpandShiftReturn(); function WriteXmlChildDoNotExpandShiftReturn(_value); function ReadXmlChildAdjustLineHeightInTable(); function WriteXmlChildAdjustLineHeightInTable(_value); function ReadXmlChildUseFELayout(); function WriteXmlChildUseFELayout(_value); function ReadXmlChildCompatSetting(); function WriteXmlChildCompatSetting(_value); // multi property property CompatSettings read ReadCompatSettings; function ReadCompatSettings(_index); function AddCompatSetting(): CompatSetting; function AppendCompatSetting(): CompatSetting; public // Children XmlChildSpaceForUL: OpenXmlEmpty; XmlChildBalanceSingleByteDoubleByteWidth: OpenXmlEmpty; XmlChildDoNotLeaveBackslashAlone: OpenXmlEmpty; XmlChildUlTrailSpace: OpenXmlEmpty; XmlChildDoNotExpandShiftReturn: OpenXmlEmpty; XmlChildAdjustLineHeightInTable: OpenXmlEmpty; XmlChildUseFELayout: OpenXmlEmpty; end; function Compat.Create();overload; begin {self.}Create(nil, "w", "compat"); end; function Compat.Create(_node: XmlNode);overload; begin class(OpenXmlElement).Create(_node: XmlNode); end; function Compat.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 Compat.Init();override; begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( ); sorted_child_ := array( pre + "spaceForUL": array(0, makeweakref(thisFunction(ReadXmlChildSpaceForUL))), pre + "balanceSingleByteDoubleByteWidth": array(1, makeweakref(thisFunction(ReadXmlChildBalanceSingleByteDoubleByteWidth))), pre + "doNotLeaveBackslashAlone": array(2, makeweakref(thisFunction(ReadXmlChildDoNotLeaveBackslashAlone))), pre + "ulTrailSpace": array(3, makeweakref(thisFunction(ReadXmlChildUlTrailSpace))), pre + "doNotExpandShiftReturn": array(4, makeweakref(thisFunction(ReadXmlChildDoNotExpandShiftReturn))), pre + "adjustLineHeightInTable": array(5, makeweakref(thisFunction(ReadXmlChildAdjustLineHeightInTable))), pre + "useFELayout": array(6, makeweakref(thisFunction(ReadXmlChildUseFELayout))), pre + "compatSetting": array(7, makeweakref(thisFunction(AppendCompatSetting))), ); container_ := new TSOfficeContainer(sorted_child_); end; function Compat.Copy(_obj: Compat);override; begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.XmlChildSpaceForUL) then ifnil({self.}XmlChildSpaceForUL) ? {self.}SpaceForUL.Copy(_obj.XmlChildSpaceForUL) : {self.}XmlChildSpaceForUL.Copy(_obj.XmlChildSpaceForUL); if not ifnil(_obj.XmlChildBalanceSingleByteDoubleByteWidth) then ifnil({self.}XmlChildBalanceSingleByteDoubleByteWidth) ? {self.}BalanceSingleByteDoubleByteWidth.Copy(_obj.XmlChildBalanceSingleByteDoubleByteWidth) : {self.}XmlChildBalanceSingleByteDoubleByteWidth.Copy(_obj.XmlChildBalanceSingleByteDoubleByteWidth); if not ifnil(_obj.XmlChildDoNotLeaveBackslashAlone) then ifnil({self.}XmlChildDoNotLeaveBackslashAlone) ? {self.}DoNotLeaveBackslashAlone.Copy(_obj.XmlChildDoNotLeaveBackslashAlone) : {self.}XmlChildDoNotLeaveBackslashAlone.Copy(_obj.XmlChildDoNotLeaveBackslashAlone); if not ifnil(_obj.XmlChildUlTrailSpace) then ifnil({self.}XmlChildUlTrailSpace) ? {self.}UlTrailSpace.Copy(_obj.XmlChildUlTrailSpace) : {self.}XmlChildUlTrailSpace.Copy(_obj.XmlChildUlTrailSpace); if not ifnil(_obj.XmlChildDoNotExpandShiftReturn) then ifnil({self.}XmlChildDoNotExpandShiftReturn) ? {self.}DoNotExpandShiftReturn.Copy(_obj.XmlChildDoNotExpandShiftReturn) : {self.}XmlChildDoNotExpandShiftReturn.Copy(_obj.XmlChildDoNotExpandShiftReturn); if not ifnil(_obj.XmlChildAdjustLineHeightInTable) then ifnil({self.}XmlChildAdjustLineHeightInTable) ? {self.}AdjustLineHeightInTable.Copy(_obj.XmlChildAdjustLineHeightInTable) : {self.}XmlChildAdjustLineHeightInTable.Copy(_obj.XmlChildAdjustLineHeightInTable); if not ifnil(_obj.XmlChildUseFELayout) then ifnil({self.}XmlChildUseFELayout) ? {self.}UseFELayout.Copy(_obj.XmlChildUseFELayout) : {self.}XmlChildUseFELayout.Copy(_obj.XmlChildUseFELayout); tslassigning := tslassigning_backup; end; function Compat.ReadXmlChildSpaceForUL(); begin if tslassigning and ifnil({self.}XmlChildSpaceForUL) then begin {self.}XmlChildSpaceForUL := new OpenXmlEmpty(self, {self.}Prefix, "spaceForUL"); container_.Set({self.}XmlChildSpaceForUL); return {self.}XmlChildSpaceForUL; end return ifnil({self.}XmlChildSpaceForUL) ? false : {self.}XmlChildSpaceForUL.BoolValue(); end; function Compat.WriteXmlChildSpaceForUL(_value); begin if ifnil({self.}XmlChildSpaceForUL) then begin {self.}XmlChildSpaceForUL := new OpenXmlEmpty(self, {self.}Prefix, "spaceForUL"); container_.Set({self.}XmlChildSpaceForUL); end {self.}XmlChildSpaceForUL.Value := _value; end; function Compat.ReadXmlChildBalanceSingleByteDoubleByteWidth(); begin if tslassigning and ifnil({self.}XmlChildBalanceSingleByteDoubleByteWidth) then begin {self.}XmlChildBalanceSingleByteDoubleByteWidth := new OpenXmlEmpty(self, {self.}Prefix, "balanceSingleByteDoubleByteWidth"); container_.Set({self.}XmlChildBalanceSingleByteDoubleByteWidth); return {self.}XmlChildBalanceSingleByteDoubleByteWidth; end return ifnil({self.}XmlChildBalanceSingleByteDoubleByteWidth) ? false : {self.}XmlChildBalanceSingleByteDoubleByteWidth.BoolValue(); end; function Compat.WriteXmlChildBalanceSingleByteDoubleByteWidth(_value); begin if ifnil({self.}XmlChildBalanceSingleByteDoubleByteWidth) then begin {self.}XmlChildBalanceSingleByteDoubleByteWidth := new OpenXmlEmpty(self, {self.}Prefix, "balanceSingleByteDoubleByteWidth"); container_.Set({self.}XmlChildBalanceSingleByteDoubleByteWidth); end {self.}XmlChildBalanceSingleByteDoubleByteWidth.Value := _value; end; function Compat.ReadXmlChildDoNotLeaveBackslashAlone(); begin if tslassigning and ifnil({self.}XmlChildDoNotLeaveBackslashAlone) then begin {self.}XmlChildDoNotLeaveBackslashAlone := new OpenXmlEmpty(self, {self.}Prefix, "doNotLeaveBackslashAlone"); container_.Set({self.}XmlChildDoNotLeaveBackslashAlone); return {self.}XmlChildDoNotLeaveBackslashAlone; end return ifnil({self.}XmlChildDoNotLeaveBackslashAlone) ? false : {self.}XmlChildDoNotLeaveBackslashAlone.BoolValue(); end; function Compat.WriteXmlChildDoNotLeaveBackslashAlone(_value); begin if ifnil({self.}XmlChildDoNotLeaveBackslashAlone) then begin {self.}XmlChildDoNotLeaveBackslashAlone := new OpenXmlEmpty(self, {self.}Prefix, "doNotLeaveBackslashAlone"); container_.Set({self.}XmlChildDoNotLeaveBackslashAlone); end {self.}XmlChildDoNotLeaveBackslashAlone.Value := _value; end; function Compat.ReadXmlChildUlTrailSpace(); begin if tslassigning and ifnil({self.}XmlChildUlTrailSpace) then begin {self.}XmlChildUlTrailSpace := new OpenXmlEmpty(self, {self.}Prefix, "ulTrailSpace"); container_.Set({self.}XmlChildUlTrailSpace); return {self.}XmlChildUlTrailSpace; end return ifnil({self.}XmlChildUlTrailSpace) ? false : {self.}XmlChildUlTrailSpace.BoolValue(); end; function Compat.WriteXmlChildUlTrailSpace(_value); begin if ifnil({self.}XmlChildUlTrailSpace) then begin {self.}XmlChildUlTrailSpace := new OpenXmlEmpty(self, {self.}Prefix, "ulTrailSpace"); container_.Set({self.}XmlChildUlTrailSpace); end {self.}XmlChildUlTrailSpace.Value := _value; end; function Compat.ReadXmlChildDoNotExpandShiftReturn(); begin if tslassigning and ifnil({self.}XmlChildDoNotExpandShiftReturn) then begin {self.}XmlChildDoNotExpandShiftReturn := new OpenXmlEmpty(self, {self.}Prefix, "doNotExpandShiftReturn"); container_.Set({self.}XmlChildDoNotExpandShiftReturn); return {self.}XmlChildDoNotExpandShiftReturn; end return ifnil({self.}XmlChildDoNotExpandShiftReturn) ? false : {self.}XmlChildDoNotExpandShiftReturn.BoolValue(); end; function Compat.WriteXmlChildDoNotExpandShiftReturn(_value); begin if ifnil({self.}XmlChildDoNotExpandShiftReturn) then begin {self.}XmlChildDoNotExpandShiftReturn := new OpenXmlEmpty(self, {self.}Prefix, "doNotExpandShiftReturn"); container_.Set({self.}XmlChildDoNotExpandShiftReturn); end {self.}XmlChildDoNotExpandShiftReturn.Value := _value; end; function Compat.ReadXmlChildAdjustLineHeightInTable(); begin if tslassigning and ifnil({self.}XmlChildAdjustLineHeightInTable) then begin {self.}XmlChildAdjustLineHeightInTable := new OpenXmlEmpty(self, {self.}Prefix, "adjustLineHeightInTable"); container_.Set({self.}XmlChildAdjustLineHeightInTable); return {self.}XmlChildAdjustLineHeightInTable; end return ifnil({self.}XmlChildAdjustLineHeightInTable) ? false : {self.}XmlChildAdjustLineHeightInTable.BoolValue(); end; function Compat.WriteXmlChildAdjustLineHeightInTable(_value); begin if ifnil({self.}XmlChildAdjustLineHeightInTable) then begin {self.}XmlChildAdjustLineHeightInTable := new OpenXmlEmpty(self, {self.}Prefix, "adjustLineHeightInTable"); container_.Set({self.}XmlChildAdjustLineHeightInTable); end {self.}XmlChildAdjustLineHeightInTable.Value := _value; end; function Compat.ReadXmlChildUseFELayout(); begin if tslassigning and ifnil({self.}XmlChildUseFELayout) then begin {self.}XmlChildUseFELayout := new OpenXmlEmpty(self, {self.}Prefix, "useFELayout"); container_.Set({self.}XmlChildUseFELayout); return {self.}XmlChildUseFELayout; end return ifnil({self.}XmlChildUseFELayout) ? false : {self.}XmlChildUseFELayout.BoolValue(); end; function Compat.WriteXmlChildUseFELayout(_value); begin if ifnil({self.}XmlChildUseFELayout) then begin {self.}XmlChildUseFELayout := new OpenXmlEmpty(self, {self.}Prefix, "useFELayout"); container_.Set({self.}XmlChildUseFELayout); end {self.}XmlChildUseFELayout.Value := _value; end; function Compat.ReadXmlChildCompatSetting(); begin if tslassigning and ifnil({self.}XmlChildCompatSetting) then begin {self.}XmlChildCompatSetting := new OpenXmlEmpty(self, {self.}Prefix, "compatSetting"); container_.Set({self.}XmlChildCompatSetting); return {self.}XmlChildCompatSetting; end return ifnil({self.}XmlChildCompatSetting) ? false : {self.}XmlChildCompatSetting.BoolValue(); end; function Compat.WriteXmlChildCompatSetting(_value); begin if ifnil({self.}XmlChildCompatSetting) then begin {self.}XmlChildCompatSetting := new OpenXmlEmpty(self, {self.}Prefix, "compatSetting"); container_.Set({self.}XmlChildCompatSetting); end {self.}XmlChildCompatSetting.Value := _value; end; function Compat.ReadCompatSettings(_index); begin ind := ifnil(_index) ? -2 : _index; pre := {self.}Prefix ? {self.}Prefix + ":" : ""; return container_.Get(pre + "compatSetting", ind); end; function Compat.AddCompatSetting(): CompatSetting; begin obj := new CompatSetting(self, {self.}Prefix, "compatSetting"); container_.Insert(obj); return obj; end; function Compat.AppendCompatSetting(): CompatSetting; begin obj := new CompatSetting(self, {self.}Prefix, "compatSetting"); container_.Append(obj); return obj; end;