diff --git a/autoclass/decorator/docx/RFontsUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/RFontsUnitDecorator@DOCX.tsf index 6269742..850b009 100644 --- a/autoclass/decorator/docx/RFontsUnitDecorator@DOCX.tsf +++ b/autoclass/decorator/docx/RFontsUnitDecorator@DOCX.tsf @@ -38,6 +38,8 @@ begin {self.}HAnsiTheme := object_.XmlAttrHAnsiTheme.Value; if not ifnil(object_.XmlAttrHint) then {self.}Hint := object_.XmlAttrHint.Value; + if not ifnil(object_.XmlAttrCs) then + {self.}Cs := object_.XmlAttrCs.Value; if not ifnil(object_.XmlAttrCsTheme) then {self.}CsTheme := object_.XmlAttrCsTheme.Value; tslassigning := tslassigning_backup; diff --git a/autoclass/decorator/docx/TblStylePrUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/TblStylePrUnitDecorator@DOCX.tsf index 951f0fb..30d57b3 100644 --- a/autoclass/decorator/docx/TblStylePrUnitDecorator@DOCX.tsf +++ b/autoclass/decorator/docx/TblStylePrUnitDecorator@DOCX.tsf @@ -28,6 +28,8 @@ begin {self.}Type := object_.XmlAttrType.Value; if not ifnil(object_.XmlChildPPr) then {self.}XmlChildPPr := new PPrUnitDecorator(object_.XmlChildPPr); + if not ifnil(object_.XmlChildRPr) then + {self.}XmlChildRPr := new RPrUnitDecorator(object_.XmlChildRPr); if not ifnil(object_.XmlChildTblPr) then {self.}XmlChildTblPr := new TblPrUnitDecorator(object_.XmlChildTblPr); if not ifnil(object_.XmlChildTrPr) then diff --git a/autoclass/decorator/docx/TcPrUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/TcPrUnitDecorator@DOCX.tsf index 4edff5b..46658c4 100644 --- a/autoclass/decorator/docx/TcPrUnitDecorator@DOCX.tsf +++ b/autoclass/decorator/docx/TcPrUnitDecorator@DOCX.tsf @@ -32,6 +32,8 @@ begin {self.}VMerge.Copy(object_.XmlChildVMerge); if not ifnil(object_.XmlChildVAlign) then {self.}XmlChildVAlign := new PureWValUnitDecorator(object_.XmlChildVAlign); + if not ifnil(object_.XmlChildHideMark) then + {self.}HideMark.Copy(object_.XmlChildHideMark); if not ifnil(object_.XmlChildShd) then {self.}XmlChildShd := new ShdUnitDecorator(object_.XmlChildShd); tslassigning := tslassigning_backup; diff --git a/autoclass/docx/RFonts@DOCX.tsf b/autoclass/docx/RFonts@DOCX.tsf index 84affbe..ee0b616 100644 --- a/autoclass/docx/RFonts@DOCX.tsf +++ b/autoclass/docx/RFonts@DOCX.tsf @@ -16,6 +16,7 @@ public property HAnsi read ReadXmlAttrHAnsi write WriteXmlAttrHAnsi; property HAnsiTheme read ReadXmlAttrHAnsiTheme write WriteXmlAttrHAnsiTheme; property Hint read ReadXmlAttrHint write WriteXmlAttrHint; + property Cs read ReadXmlAttrCs write WriteXmlAttrCs; property CsTheme read ReadXmlAttrCsTheme write WriteXmlAttrCsTheme; function ReadXmlAttrAscii(); function WriteXmlAttrAscii(_value); @@ -31,6 +32,8 @@ public function WriteXmlAttrHAnsiTheme(_value); function ReadXmlAttrHint(); function WriteXmlAttrHint(_value); + function ReadXmlAttrCs(); + function WriteXmlAttrCs(_value); function ReadXmlAttrCsTheme(); function WriteXmlAttrCsTheme(_value); @@ -43,6 +46,7 @@ public XmlAttrHAnsi: OpenXmlAttribute; XmlAttrHAnsiTheme: OpenXmlAttribute; XmlAttrHint: OpenXmlAttribute; + XmlAttrCs: OpenXmlAttribute; XmlAttrCsTheme: OpenXmlAttribute; @@ -76,6 +80,7 @@ begin pre + "hAnsi": makeweakref(thisFunction(WriteXmlAttrHAnsi)), pre + "hAnsiTheme": makeweakref(thisFunction(WriteXmlAttrHAnsiTheme)), pre + "hint": makeweakref(thisFunction(WriteXmlAttrHint)), + pre + "cs": makeweakref(thisFunction(WriteXmlAttrCs)), pre + "cstheme": makeweakref(thisFunction(WriteXmlAttrCsTheme)), ); sorted_child_ := array( @@ -102,6 +107,8 @@ begin {self.}HAnsiTheme := _obj.HAnsiTheme; if not ifnil(_obj.Hint) then {self.}Hint := _obj.Hint; + if not ifnil(_obj.Cs) then + {self.}Cs := _obj.Cs; if not ifnil(_obj.CsTheme) then {self.}CsTheme := _obj.CsTheme; tslassigning := tslassigning_backup; @@ -212,6 +219,21 @@ begin {self.}XmlAttrHint.Value := _value; end; +function RFonts.ReadXmlAttrCs(); +begin + return {self.}XmlAttrCs.Value; +end; + +function RFonts.WriteXmlAttrCs(_value); +begin + if ifnil({self.}XmlAttrCs) then + begin + {self.}XmlAttrCs := new OpenXmlAttribute({self.}Prefix, "cs", nil); + attributes_[length(attributes_)] := {self.}XmlAttrCs; + end + {self.}XmlAttrCs.Value := _value; +end; + function RFonts.ReadXmlAttrCsTheme(); begin return {self.}XmlAttrCsTheme.Value; diff --git a/autoclass/docx/TblStylePr@DOCX.tsf b/autoclass/docx/TblStylePr@DOCX.tsf index 77b8a1d..ae548e2 100644 --- a/autoclass/docx/TblStylePr@DOCX.tsf +++ b/autoclass/docx/TblStylePr@DOCX.tsf @@ -15,10 +15,12 @@ public // normal property property PPr read ReadXmlChildPPr; + property RPr read ReadXmlChildRPr; property TblPr read ReadXmlChildTblPr; property TrPr read ReadXmlChildTrPr; property TcPr read ReadXmlChildTcPr; function ReadXmlChildPPr(); + function ReadXmlChildRPr(); function ReadXmlChildTblPr(); function ReadXmlChildTrPr(); function ReadXmlChildTcPr(); @@ -29,6 +31,7 @@ public // Children XmlChildPPr: PPr; + XmlChildRPr: RPr; XmlChildTblPr: TblPr; XmlChildTrPr: TrPr; XmlChildTcPr: TcPr; @@ -60,9 +63,10 @@ begin ); sorted_child_ := array( pre + "pPr": array(0, makeweakref(thisFunction(ReadXmlChildPPr))), - pre + "tblPr": array(1, makeweakref(thisFunction(ReadXmlChildTblPr))), - pre + "trPr": array(2, makeweakref(thisFunction(ReadXmlChildTrPr))), - pre + "tcPr": array(3, makeweakref(thisFunction(ReadXmlChildTcPr))), + pre + "rPr": array(1, makeweakref(thisFunction(ReadXmlChildRPr))), + pre + "tblPr": array(2, makeweakref(thisFunction(ReadXmlChildTblPr))), + pre + "trPr": array(3, makeweakref(thisFunction(ReadXmlChildTrPr))), + pre + "tcPr": array(4, makeweakref(thisFunction(ReadXmlChildTcPr))), ); container_ := new TSOfficeContainer(sorted_child_); end; @@ -76,6 +80,8 @@ begin {self.}Type := _obj.Type; if not ifnil(_obj.XmlChildPPr) then {self.}PPr.Copy(_obj.XmlChildPPr); + if not ifnil(_obj.XmlChildRPr) then + {self.}RPr.Copy(_obj.XmlChildRPr); if not ifnil(_obj.XmlChildTblPr) then {self.}TblPr.Copy(_obj.XmlChildTblPr); if not ifnil(_obj.XmlChildTrPr) then @@ -110,6 +116,16 @@ begin return {self.}XmlChildPPr; end; +function TblStylePr.ReadXmlChildRPr(); +begin + if tslassigning and ifnil({self.}XmlChildRPr) then + begin + {self.}XmlChildRPr := new RPr(self, {self.}Prefix, "rPr"); + container_.Set({self.}XmlChildRPr); + end + return {self.}XmlChildRPr; +end; + function TblStylePr.ReadXmlChildTblPr(); begin if tslassigning and ifnil({self.}XmlChildTblPr) then diff --git a/autoclass/docx/TcPr@DOCX.tsf b/autoclass/docx/TcPr@DOCX.tsf index f17195a..2584c37 100644 --- a/autoclass/docx/TcPr@DOCX.tsf +++ b/autoclass/docx/TcPr@DOCX.tsf @@ -10,8 +10,11 @@ public // empty property property VMerge read ReadXmlChildVMerge write WriteXmlChildVMerge; + property HideMark read ReadXmlChildHideMark write WriteXmlChildHideMark; function ReadXmlChildVMerge(); function WriteXmlChildVMerge(_value); + function ReadXmlChildHideMark(); + function WriteXmlChildHideMark(_value); // normal property property TcW read ReadXmlChildTcW; @@ -29,6 +32,7 @@ public XmlChildGridSpan: GridSpan; XmlChildVMerge: OpenXmlEmpty; XmlChildVAlign: PureWVal; + XmlChildHideMark: OpenXmlEmpty; XmlChildShd: Shd; end; @@ -60,7 +64,8 @@ begin pre + "gridSpan": array(1, makeweakref(thisFunction(ReadXmlChildGridSpan))), pre + "vMerge": array(2, makeweakref(thisFunction(ReadXmlChildVMerge))), pre + "vAlign": array(3, makeweakref(thisFunction(ReadXmlChildVAlign))), - pre + "shd": array(4, makeweakref(thisFunction(ReadXmlChildShd))), + pre + "hideMark": array(4, makeweakref(thisFunction(ReadXmlChildHideMark))), + pre + "shd": array(5, makeweakref(thisFunction(ReadXmlChildShd))), ); container_ := new TSOfficeContainer(sorted_child_); end; @@ -78,6 +83,8 @@ begin ifnil({self.}XmlChildVMerge) ? {self.}VMerge.Copy(_obj.XmlChildVMerge) : {self.}XmlChildVMerge.Copy(_obj.XmlChildVMerge); if not ifnil(_obj.XmlChildVAlign) then {self.}VAlign.Copy(_obj.XmlChildVAlign); + if not ifnil(_obj.XmlChildHideMark) then + ifnil({self.}XmlChildHideMark) ? {self.}HideMark.Copy(_obj.XmlChildHideMark) : {self.}XmlChildHideMark.Copy(_obj.XmlChildHideMark); if not ifnil(_obj.XmlChildShd) then {self.}Shd.Copy(_obj.XmlChildShd); tslassigning := tslassigning_backup; @@ -104,6 +111,27 @@ begin {self.}XmlChildVMerge.Value := _value; end; +function TcPr.ReadXmlChildHideMark(); +begin + if tslassigning and ifnil({self.}XmlChildHideMark) then + begin + {self.}XmlChildHideMark := new OpenXmlEmpty(self, {self.}Prefix, "hideMark"); + container_.Set({self.}XmlChildHideMark); + return {self.}XmlChildHideMark; + end + return ifnil({self.}XmlChildHideMark) ? false : {self.}XmlChildHideMark.BoolValue(); +end; + +function TcPr.WriteXmlChildHideMark(_value); +begin + if ifnil({self.}XmlChildHideMark) then + begin + {self.}XmlChildHideMark := new OpenXmlEmpty(self, {self.}Prefix, "hideMark"); + container_.Set({self.}XmlChildHideMark); + end + {self.}XmlChildHideMark.Value := _value; +end; + function TcPr.ReadXmlChildTcW(); begin if tslassigning and ifnil({self.}XmlChildTcW) then diff --git a/openxml/OpenXmlEmpty.tsf b/openxml/OpenXmlEmpty.tsf index 5e2abcf..e82685e 100644 --- a/openxml/OpenXmlEmpty.tsf +++ b/openxml/OpenXmlEmpty.tsf @@ -108,7 +108,7 @@ end; function OpenXmlEmpty.ReadXmlAttrVal(); begin - return {self.}XmlAttrVal.Value; + return {self.}XmlAttrVal.Value = "0" ? false : {self.}XmlAttrVal.Value = "1" ? true : {self.}XmlAttrVal.Value; end; function OpenXmlEmpty.WriteXmlAttrVal(_value: any); diff --git a/utils/TSComponentsBase.tsf b/utils/TSComponentsBase.tsf index d6be40f..259348a 100644 --- a/utils/TSComponentsBase.tsf +++ b/utils/TSComponentsBase.tsf @@ -2,6 +2,7 @@ type TSComponentsBase = class public function Create(); function Init();virtual; + function InitZip(zip: ZipFile); function OpenFile(alias: string; file: string; password: string): tableArray; function Zip(): ZipFile; @@ -20,6 +21,12 @@ function TSComponentsBase.Create(); begin end; +function TSComponentsBase.InitZip(zip: ZipFile); +begin + {self.}Init(); + zipfile_ := zip; +end; + function TSComponentsBase.OpenFile(alias: string; file: string; password: string): tableArray; begin {self.}Init();