From 533a2028470135981c95e35cd08e0314aa0c16b0 Mon Sep 17 00:00:00 2001 From: csh Date: Fri, 20 Sep 2024 14:42:26 +0800 Subject: [PATCH] update autoclass --- .../decorator/docx/FUnitDecorator@DOCX.tsf | 30 +++ .../FootnoteReferenceUnitDecorator@DOCX.tsf | 30 +++ .../docx/FormulasUnitDecorator@DOCX.tsf | 28 +++ .../docx/ImagedataUnitDecorator@DOCX.tsf | 32 +++ .../decorator/docx/LockUnitDecorator@DOCX.tsf | 32 +++ .../docx/OLEObjectUnitDecorator@DOCX.tsf | 40 ++++ .../docx/ObjectUnitDecorator@DOCX.tsf | 40 ++++ .../decorator/docx/PathUnitDecorator@DOCX.tsf | 2 + .../decorator/docx/RUnitDecorator@DOCX.tsf | 2 + .../docx/ShapeUnitDecorator@DOCX.tsf | 6 + .../docx/ShapetypeUnitDecorator@DOCX.tsf | 10 + autoclass/docx/Anchor@DOCX.tsf | 2 +- autoclass/docx/BodyPr@DOCX.tsf | 2 +- autoclass/docx/ChartSpace@DOCX.tsf | 2 +- autoclass/docx/Compat@DOCX.tsf | 16 +- autoclass/docx/F@DOCX.tsf | 74 +++++++ autoclass/docx/FootnoteReference@DOCX.tsf | 74 +++++++ autoclass/docx/Formulas@DOCX.tsf | 77 ++++++++ autoclass/docx/Imagedata@DOCX.tsf | 96 +++++++++ autoclass/docx/Legend@DOCX.tsf | 2 +- autoclass/docx/Lock@DOCX.tsf | 96 +++++++++ autoclass/docx/MathPr@DOCX.tsf | 2 +- autoclass/docx/OLEObject@DOCX.tsf | 184 ++++++++++++++++++ autoclass/docx/Object@DOCX.tsf | 169 ++++++++++++++++ autoclass/docx/PPr@DOCX.tsf | 8 +- autoclass/docx/Path@DOCX.tsf | 22 +++ autoclass/docx/PlotArea@DOCX.tsf | 2 +- autoclass/docx/PrstTxWrap@DOCX.tsf | 2 +- autoclass/docx/R@DOCX.tsf | 22 ++- autoclass/docx/RPr@DOCX.tsf | 12 +- autoclass/docx/Rich@DOCX.tsf | 2 +- autoclass/docx/Scaling@DOCX.tsf | 2 +- autoclass/docx/SectPr@DOCX.tsf | 2 +- autoclass/docx/Settings@DOCX.tsf | 10 +- autoclass/docx/Shape@DOCX.tsf | 60 ++++++ autoclass/docx/Shapetype@DOCX.tsf | 100 +++++++++- autoclass/docx/SpPr@DOCX.tsf | 2 +- autoclass/docx/Style@DOCX.tsf | 8 +- autoclass/docx/TcPr@DOCX.tsf | 2 +- autoclass/docx/Theme@DOCX.tsf | 4 +- autoclass/docx/Title@DOCX.tsf | 2 +- autoclass/docx/TrPr@DOCX.tsf | 2 +- autoclass/docx/TxPr@DOCX.tsf | 2 +- autoclass/docx/WebSettings@DOCX.tsf | 4 +- openxml/OpenXmlEmpty.tsf | 2 +- 45 files changed, 1269 insertions(+), 51 deletions(-) create mode 100644 autoclass/decorator/docx/FUnitDecorator@DOCX.tsf create mode 100644 autoclass/decorator/docx/FootnoteReferenceUnitDecorator@DOCX.tsf create mode 100644 autoclass/decorator/docx/FormulasUnitDecorator@DOCX.tsf create mode 100644 autoclass/decorator/docx/ImagedataUnitDecorator@DOCX.tsf create mode 100644 autoclass/decorator/docx/LockUnitDecorator@DOCX.tsf create mode 100644 autoclass/decorator/docx/OLEObjectUnitDecorator@DOCX.tsf create mode 100644 autoclass/decorator/docx/ObjectUnitDecorator@DOCX.tsf create mode 100644 autoclass/docx/F@DOCX.tsf create mode 100644 autoclass/docx/FootnoteReference@DOCX.tsf create mode 100644 autoclass/docx/Formulas@DOCX.tsf create mode 100644 autoclass/docx/Imagedata@DOCX.tsf create mode 100644 autoclass/docx/Lock@DOCX.tsf create mode 100644 autoclass/docx/OLEObject@DOCX.tsf create mode 100644 autoclass/docx/Object@DOCX.tsf diff --git a/autoclass/decorator/docx/FUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/FUnitDecorator@DOCX.tsf new file mode 100644 index 0000000..63e2f48 --- /dev/null +++ b/autoclass/decorator/docx/FUnitDecorator@DOCX.tsf @@ -0,0 +1,30 @@ +type FUnitDecorator = class(F) +uses TSSafeUnitConverter; +public + function Create(_obj: F); + function GetObject(); + function Convert(); +private + object_: F; +end; + +function FUnitDecorator.Create(_obj: F); +begin + class(F).Create(); + object_ := _obj; + {self.}Convert(); +end; + +function FUnitDecorator.GetObject(); +begin + return object_; +end; + +function FUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + if not ifnil(object_.XmlAttrEqn) then + {self.}Eqn := object_.XmlAttrEqn.Value; + tslassigning := tslassigning_backup; +end; \ No newline at end of file diff --git a/autoclass/decorator/docx/FootnoteReferenceUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/FootnoteReferenceUnitDecorator@DOCX.tsf new file mode 100644 index 0000000..a4461bc --- /dev/null +++ b/autoclass/decorator/docx/FootnoteReferenceUnitDecorator@DOCX.tsf @@ -0,0 +1,30 @@ +type FootnoteReferenceUnitDecorator = class(FootnoteReference) +uses TSSafeUnitConverter; +public + function Create(_obj: FootnoteReference); + function GetObject(); + function Convert(); +private + object_: FootnoteReference; +end; + +function FootnoteReferenceUnitDecorator.Create(_obj: FootnoteReference); +begin + class(FootnoteReference).Create(); + object_ := _obj; + {self.}Convert(); +end; + +function FootnoteReferenceUnitDecorator.GetObject(); +begin + return object_; +end; + +function FootnoteReferenceUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + if not ifnil(object_.XmlAttrId) then + {self.}Id := object_.XmlAttrId.Value; + tslassigning := tslassigning_backup; +end; \ No newline at end of file diff --git a/autoclass/decorator/docx/FormulasUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/FormulasUnitDecorator@DOCX.tsf new file mode 100644 index 0000000..0ef6961 --- /dev/null +++ b/autoclass/decorator/docx/FormulasUnitDecorator@DOCX.tsf @@ -0,0 +1,28 @@ +type FormulasUnitDecorator = class(Formulas) +uses TSSafeUnitConverter; +public + function Create(_obj: Formulas); + function GetObject(); + function Convert(); +private + object_: Formulas; +end; + +function FormulasUnitDecorator.Create(_obj: Formulas); +begin + class(Formulas).Create(); + object_ := _obj; + {self.}Convert(); +end; + +function FormulasUnitDecorator.GetObject(); +begin + return object_; +end; + +function FormulasUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + tslassigning := tslassigning_backup; +end; \ No newline at end of file diff --git a/autoclass/decorator/docx/ImagedataUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/ImagedataUnitDecorator@DOCX.tsf new file mode 100644 index 0000000..7b8bbb7 --- /dev/null +++ b/autoclass/decorator/docx/ImagedataUnitDecorator@DOCX.tsf @@ -0,0 +1,32 @@ +type ImagedataUnitDecorator = class(Imagedata) +uses TSSafeUnitConverter; +public + function Create(_obj: Imagedata); + function GetObject(); + function Convert(); +private + object_: Imagedata; +end; + +function ImagedataUnitDecorator.Create(_obj: Imagedata); +begin + class(Imagedata).Create(); + object_ := _obj; + {self.}Convert(); +end; + +function ImagedataUnitDecorator.GetObject(); +begin + return object_; +end; + +function ImagedataUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + if not ifnil(object_.XmlAttrId) then + {self.}Id := object_.XmlAttrId.Value; + if not ifnil(object_.XmlAttrTitle) then + {self.}Title := object_.XmlAttrTitle.Value; + tslassigning := tslassigning_backup; +end; \ No newline at end of file diff --git a/autoclass/decorator/docx/LockUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/LockUnitDecorator@DOCX.tsf new file mode 100644 index 0000000..6234227 --- /dev/null +++ b/autoclass/decorator/docx/LockUnitDecorator@DOCX.tsf @@ -0,0 +1,32 @@ +type LockUnitDecorator = class(Lock) +uses TSSafeUnitConverter; +public + function Create(_obj: Lock); + function GetObject(); + function Convert(); +private + object_: Lock; +end; + +function LockUnitDecorator.Create(_obj: Lock); +begin + class(Lock).Create(); + object_ := _obj; + {self.}Convert(); +end; + +function LockUnitDecorator.GetObject(); +begin + return object_; +end; + +function LockUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + if not ifnil(object_.XmlAttrExt) then + {self.}Ext := object_.XmlAttrExt.Value; + if not ifnil(object_.XmlAttrAspectration) then + {self.}Aspectration := object_.XmlAttrAspectration.Value; + tslassigning := tslassigning_backup; +end; \ No newline at end of file diff --git a/autoclass/decorator/docx/OLEObjectUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/OLEObjectUnitDecorator@DOCX.tsf new file mode 100644 index 0000000..1e85576 --- /dev/null +++ b/autoclass/decorator/docx/OLEObjectUnitDecorator@DOCX.tsf @@ -0,0 +1,40 @@ +type OLEObjectUnitDecorator = class(OLEObject) +uses TSSafeUnitConverter; +public + function Create(_obj: OLEObject); + function GetObject(); + function Convert(); +private + object_: OLEObject; +end; + +function OLEObjectUnitDecorator.Create(_obj: OLEObject); +begin + class(OLEObject).Create(); + object_ := _obj; + {self.}Convert(); +end; + +function OLEObjectUnitDecorator.GetObject(); +begin + return object_; +end; + +function OLEObjectUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + if not ifnil(object_.XmlAttrType) then + {self.}Type := object_.XmlAttrType.Value; + if not ifnil(object_.XmlAttrProgID) then + {self.}ProgID := object_.XmlAttrProgID.Value; + if not ifnil(object_.XmlAttrShapeID) then + {self.}ShapeID := object_.XmlAttrShapeID.Value; + if not ifnil(object_.XmlAttrDrawAspect) then + {self.}DrawAspect := object_.XmlAttrDrawAspect.Value; + if not ifnil(object_.XmlAttrObjectID) then + {self.}ObjectID := object_.XmlAttrObjectID.Value; + if not ifnil(object_.XmlAttrId) then + {self.}Id := object_.XmlAttrId.Value; + tslassigning := tslassigning_backup; +end; \ No newline at end of file diff --git a/autoclass/decorator/docx/ObjectUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/ObjectUnitDecorator@DOCX.tsf new file mode 100644 index 0000000..d4ebc21 --- /dev/null +++ b/autoclass/decorator/docx/ObjectUnitDecorator@DOCX.tsf @@ -0,0 +1,40 @@ +type ObjectUnitDecorator = class(Object) +uses TSSafeUnitConverter; +public + function Create(_obj: Object); + function GetObject(); + function Convert(); +private + object_: Object; +end; + +function ObjectUnitDecorator.Create(_obj: Object); +begin + class(Object).Create(); + object_ := _obj; + {self.}Convert(); +end; + +function ObjectUnitDecorator.GetObject(); +begin + return object_; +end; + +function ObjectUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + if not ifnil(object_.XmlAttrDxaOrig) then + {self.}DxaOrig := TSSafeUnitConverter.TwipsToPoints(object_.XmlAttrDxaOrig.Value); + if not ifnil(object_.XmlAttrDyaOrig) then + {self.}DyaOrig := TSSafeUnitConverter.TwipsToPoints(object_.XmlAttrDyaOrig.Value); + if not ifnil(object_.XmlAttrAnchorId) then + {self.}AnchorId := object_.XmlAttrAnchorId.Value; + if not ifnil(object_.XmlChildShapetype) then + {self.}XmlChildShapetype := new ShapetypeUnitDecorator(object_.XmlChildShapetype); + if not ifnil(object_.XmlChildShape) then + {self.}XmlChildShape := new ShapeUnitDecorator(object_.XmlChildShape); + if not ifnil(object_.XmlChildOLEObject) then + {self.}XmlChildOLEObject := new OLEObjectUnitDecorator(object_.XmlChildOLEObject); + tslassigning := tslassigning_backup; +end; \ No newline at end of file diff --git a/autoclass/decorator/docx/PathUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/PathUnitDecorator@DOCX.tsf index 3ed15d1..d01098a 100644 --- a/autoclass/decorator/docx/PathUnitDecorator@DOCX.tsf +++ b/autoclass/decorator/docx/PathUnitDecorator@DOCX.tsf @@ -24,6 +24,8 @@ function PathUnitDecorator.Convert(); begin tslassigning_backup := tslassigning; tslassigning := 1; + if not ifnil(object_.XmlAttrExtrusionok) then + {self.}Extrusionok := object_.XmlAttrExtrusionok.Value; if not ifnil(object_.XmlAttrGradientshapeok) then {self.}Gradientshapeok := object_.XmlAttrGradientshapeok.Value; if not ifnil(object_.XmlAttrConnecttype) then diff --git a/autoclass/decorator/docx/RUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/RUnitDecorator@DOCX.tsf index 0f1dc84..8ed4573 100644 --- a/autoclass/decorator/docx/RUnitDecorator@DOCX.tsf +++ b/autoclass/decorator/docx/RUnitDecorator@DOCX.tsf @@ -52,5 +52,7 @@ begin {self.}XmlChildT := new TUnitDecorator(object_.XmlChildT); if not ifnil(object_.XmlChildFootnoteReference) then {self.}XmlChildFootnoteReference := new FootnoteReferenceUnitDecorator(object_.XmlChildFootnoteReference); + if not ifnil(object_.XmlChildObject) then + {self.}XmlChildObject := new ObjectUnitDecorator(object_.XmlChildObject); tslassigning := tslassigning_backup; end; \ No newline at end of file diff --git a/autoclass/decorator/docx/ShapeUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/ShapeUnitDecorator@DOCX.tsf index a471547..d7acb0b 100644 --- a/autoclass/decorator/docx/ShapeUnitDecorator@DOCX.tsf +++ b/autoclass/decorator/docx/ShapeUnitDecorator@DOCX.tsf @@ -26,6 +26,8 @@ begin tslassigning := 1; if not ifnil(object_.XmlAttrId) then {self.}Id := object_.XmlAttrId.Value; + if not ifnil(object_.XmlAttrStyle) then + {self.}Style := object_.XmlAttrStyle.Value; if not ifnil(object_.XmlAttrSpid) then {self.}Spid := object_.XmlAttrSpid.Value; if not ifnil(object_.XmlAttrType) then @@ -36,7 +38,11 @@ begin {self.}Filled := object_.XmlAttrFilled.Value; if not ifnil(object_.XmlAttrStroked) then {self.}Stroked := object_.XmlAttrStroked.Value; + if not ifnil(object_.XmlAttrOle) then + {self.}Ole := object_.XmlAttrOle.Value; if not ifnil(object_.XmlChildTextbox) then {self.}XmlChildTextbox := new TextboxUnitDecorator(object_.XmlChildTextbox); + if not ifnil(object_.XmlChildImagedata) then + {self.}XmlChildImagedata := new ImagedataUnitDecorator(object_.XmlChildImagedata); tslassigning := tslassigning_backup; end; \ No newline at end of file diff --git a/autoclass/decorator/docx/ShapetypeUnitDecorator@DOCX.tsf b/autoclass/decorator/docx/ShapetypeUnitDecorator@DOCX.tsf index 2ed2099..8753bf0 100644 --- a/autoclass/decorator/docx/ShapetypeUnitDecorator@DOCX.tsf +++ b/autoclass/decorator/docx/ShapetypeUnitDecorator@DOCX.tsf @@ -32,11 +32,21 @@ begin {self.}Coordsize := object_.XmlAttrCoordsize.Value; if not ifnil(object_.XmlAttrSpt) then {self.}Spt := object_.XmlAttrSpt.Value; + if not ifnil(object_.XmlAttrPreferrelative) then + {self.}Preferrelative := object_.XmlAttrPreferrelative.Value; if not ifnil(object_.XmlAttrPath) then {self.}Path := object_.XmlAttrPath.Value; + if not ifnil(object_.XmlAttrFilled) then + {self.}Filled := object_.XmlAttrFilled.Value; + if not ifnil(object_.XmlAttrStroked) then + {self.}Stroked := object_.XmlAttrStroked.Value; if not ifnil(object_.XmlChildStroke) then {self.}XmlChildStroke := new StrokeUnitDecorator(object_.XmlChildStroke); + if not ifnil(object_.XmlChildFormulas) then + {self.}XmlChildFormulas := new formulasUnitDecorator(object_.XmlChildFormulas); if not ifnil(object_.XmlChildPath) then {self.}XmlChildPath := new PathUnitDecorator(object_.XmlChildPath); + if not ifnil(object_.XmlChildLock) then + {self.}XmlChildLock := new LockUnitDecorator(object_.XmlChildLock); tslassigning := tslassigning_backup; end; \ No newline at end of file diff --git a/autoclass/docx/Anchor@DOCX.tsf b/autoclass/docx/Anchor@DOCX.tsf index 8df4b75..4f2adc9 100644 --- a/autoclass/docx/Anchor@DOCX.tsf +++ b/autoclass/docx/Anchor@DOCX.tsf @@ -395,7 +395,7 @@ begin container_.Set({self.}XmlChildWrapNone); return {self.}XmlChildWrapNone; end - return {self.}XmlChildWrapNone.BoolValue(); + return ifnil({self.}XmlChildWrapNone) ? false : {self.}XmlChildWrapNone.BoolValue(); end; function Anchor.WriteXmlChildWrapNone(_value); diff --git a/autoclass/docx/BodyPr@DOCX.tsf b/autoclass/docx/BodyPr@DOCX.tsf index 460f6ae..3aecfab 100644 --- a/autoclass/docx/BodyPr@DOCX.tsf +++ b/autoclass/docx/BodyPr@DOCX.tsf @@ -473,7 +473,7 @@ begin container_.Set({self.}XmlChildNoAutofit); return {self.}XmlChildNoAutofit; end - return {self.}XmlChildNoAutofit.BoolValue(); + return ifnil({self.}XmlChildNoAutofit) ? false : {self.}XmlChildNoAutofit.BoolValue(); end; function BodyPr.WriteXmlChildNoAutofit(_value); diff --git a/autoclass/docx/ChartSpace@DOCX.tsf b/autoclass/docx/ChartSpace@DOCX.tsf index 210e393..71763e9 100644 --- a/autoclass/docx/ChartSpace@DOCX.tsf +++ b/autoclass/docx/ChartSpace@DOCX.tsf @@ -167,7 +167,7 @@ begin container_.Set({self.}XmlChildLang); return {self.}XmlChildLang; end - return {self.}XmlChildLang.BoolValue(); + return ifnil({self.}XmlChildLang) ? false : {self.}XmlChildLang.BoolValue(); end; function ChartSpace.WriteXmlChildLang(_value); diff --git a/autoclass/docx/Compat@DOCX.tsf b/autoclass/docx/Compat@DOCX.tsf index 8b63e30..341f6d3 100644 --- a/autoclass/docx/Compat@DOCX.tsf +++ b/autoclass/docx/Compat@DOCX.tsf @@ -117,7 +117,7 @@ begin container_.Set({self.}XmlChildSpaceForUL); return {self.}XmlChildSpaceForUL; end - return {self.}XmlChildSpaceForUL.BoolValue(); + return ifnil({self.}XmlChildSpaceForUL) ? false : {self.}XmlChildSpaceForUL.BoolValue(); end; function Compat.WriteXmlChildSpaceForUL(_value); @@ -138,7 +138,7 @@ begin container_.Set({self.}XmlChildBalanceSingleByteDoubleByteWidth); return {self.}XmlChildBalanceSingleByteDoubleByteWidth; end - return {self.}XmlChildBalanceSingleByteDoubleByteWidth.BoolValue(); + return ifnil({self.}XmlChildBalanceSingleByteDoubleByteWidth) ? false : {self.}XmlChildBalanceSingleByteDoubleByteWidth.BoolValue(); end; function Compat.WriteXmlChildBalanceSingleByteDoubleByteWidth(_value); @@ -159,7 +159,7 @@ begin container_.Set({self.}XmlChildDoNotLeaveBackslashAlone); return {self.}XmlChildDoNotLeaveBackslashAlone; end - return {self.}XmlChildDoNotLeaveBackslashAlone.BoolValue(); + return ifnil({self.}XmlChildDoNotLeaveBackslashAlone) ? false : {self.}XmlChildDoNotLeaveBackslashAlone.BoolValue(); end; function Compat.WriteXmlChildDoNotLeaveBackslashAlone(_value); @@ -180,7 +180,7 @@ begin container_.Set({self.}XmlChildUlTrailSpace); return {self.}XmlChildUlTrailSpace; end - return {self.}XmlChildUlTrailSpace.BoolValue(); + return ifnil({self.}XmlChildUlTrailSpace) ? false : {self.}XmlChildUlTrailSpace.BoolValue(); end; function Compat.WriteXmlChildUlTrailSpace(_value); @@ -201,7 +201,7 @@ begin container_.Set({self.}XmlChildDoNotExpandShiftReturn); return {self.}XmlChildDoNotExpandShiftReturn; end - return {self.}XmlChildDoNotExpandShiftReturn.BoolValue(); + return ifnil({self.}XmlChildDoNotExpandShiftReturn) ? false : {self.}XmlChildDoNotExpandShiftReturn.BoolValue(); end; function Compat.WriteXmlChildDoNotExpandShiftReturn(_value); @@ -222,7 +222,7 @@ begin container_.Set({self.}XmlChildAdjustLineHeightInTable); return {self.}XmlChildAdjustLineHeightInTable; end - return {self.}XmlChildAdjustLineHeightInTable.BoolValue(); + return ifnil({self.}XmlChildAdjustLineHeightInTable) ? false : {self.}XmlChildAdjustLineHeightInTable.BoolValue(); end; function Compat.WriteXmlChildAdjustLineHeightInTable(_value); @@ -243,7 +243,7 @@ begin container_.Set({self.}XmlChildUseFELayout); return {self.}XmlChildUseFELayout; end - return {self.}XmlChildUseFELayout.BoolValue(); + return ifnil({self.}XmlChildUseFELayout) ? false : {self.}XmlChildUseFELayout.BoolValue(); end; function Compat.WriteXmlChildUseFELayout(_value); @@ -264,7 +264,7 @@ begin container_.Set({self.}XmlChildCompatSetting); return {self.}XmlChildCompatSetting; end - return {self.}XmlChildCompatSetting.BoolValue(); + return ifnil({self.}XmlChildCompatSetting) ? false : {self.}XmlChildCompatSetting.BoolValue(); end; function Compat.WriteXmlChildCompatSetting(_value); diff --git a/autoclass/docx/F@DOCX.tsf b/autoclass/docx/F@DOCX.tsf new file mode 100644 index 0000000..da38036 --- /dev/null +++ b/autoclass/docx/F@DOCX.tsf @@ -0,0 +1,74 @@ +type F = 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: F);override; + +public + + // attributes property + property Eqn read ReadXmlAttrEqn write WriteXmlAttrEqn; + function ReadXmlAttrEqn(); + function WriteXmlAttrEqn(_value); + +public + // Attributes + XmlAttrEqn: OpenXmlAttribute; + + +end; + +function F.Create();overload; +begin + {self.}Create(nil, "v", "f"); +end; + +function F.Create(_node: XmlNode);overload; +begin + class(OpenXmlElement).Create(_node: XmlNode); +end; + +function F.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 F.Init();override; +begin + pre := {self.}Prefix ? {self.}Prefix + ":" : ""; + attributes_ := array(); + attributes_pf_ := array( + "eqn": makeweakref(thisFunction(WriteXmlAttrEqn)), + ); + sorted_child_ := array( + ); + container_ := new TSOfficeContainer(sorted_child_); +end; + +function F.Copy(_obj: F);override; +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + class(OpenXmlElement).Copy(_obj); + if not ifnil(_obj.Eqn) then + {self.}Eqn := _obj.Eqn; + tslassigning := tslassigning_backup; +end; + +function F.ReadXmlAttrEqn(); +begin + return {self.}XmlAttrEqn.Value; +end; + +function F.WriteXmlAttrEqn(_value); +begin + if ifnil({self.}XmlAttrEqn) then + begin + {self.}XmlAttrEqn := new OpenXmlAttribute("", "eqn", nil); + attributes_[length(attributes_)] := {self.}XmlAttrEqn; + end + {self.}XmlAttrEqn.Value := _value; +end; diff --git a/autoclass/docx/FootnoteReference@DOCX.tsf b/autoclass/docx/FootnoteReference@DOCX.tsf new file mode 100644 index 0000000..e10fb32 --- /dev/null +++ b/autoclass/docx/FootnoteReference@DOCX.tsf @@ -0,0 +1,74 @@ +type FootnoteReference = 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: FootnoteReference);override; + +public + + // attributes property + property Id read ReadXmlAttrId write WriteXmlAttrId; + function ReadXmlAttrId(); + function WriteXmlAttrId(_value); + +public + // Attributes + XmlAttrId: OpenXmlAttribute; + + +end; + +function FootnoteReference.Create();overload; +begin + {self.}Create(nil, "w", "footnoteReference"); +end; + +function FootnoteReference.Create(_node: XmlNode);overload; +begin + class(OpenXmlElement).Create(_node: XmlNode); +end; + +function FootnoteReference.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 FootnoteReference.Init();override; +begin + pre := {self.}Prefix ? {self.}Prefix + ":" : ""; + attributes_ := array(); + attributes_pf_ := array( + pre + "id": makeweakref(thisFunction(WriteXmlAttrId)), + ); + sorted_child_ := array( + ); + container_ := new TSOfficeContainer(sorted_child_); +end; + +function FootnoteReference.Copy(_obj: FootnoteReference);override; +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + class(OpenXmlElement).Copy(_obj); + if not ifnil(_obj.Id) then + {self.}Id := _obj.Id; + tslassigning := tslassigning_backup; +end; + +function FootnoteReference.ReadXmlAttrId(); +begin + return {self.}XmlAttrId.Value; +end; + +function FootnoteReference.WriteXmlAttrId(_value); +begin + if ifnil({self.}XmlAttrId) then + begin + {self.}XmlAttrId := new OpenXmlAttribute({self.}Prefix, "id", nil); + attributes_[length(attributes_)] := {self.}XmlAttrId; + end + {self.}XmlAttrId.Value := _value; +end; diff --git a/autoclass/docx/Formulas@DOCX.tsf b/autoclass/docx/Formulas@DOCX.tsf new file mode 100644 index 0000000..2e7cacb --- /dev/null +++ b/autoclass/docx/Formulas@DOCX.tsf @@ -0,0 +1,77 @@ +type Formulas = 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: Formulas);override; + +public + + // multi property + property Fs read ReadFs; + function ReadFs(_index); + function AddF(): Shapetype; + function AppendF(): Shapetype; + +public + // Children + +end; + +function Formulas.Create();overload; +begin + {self.}Create(nil, "w", "formulas"); +end; + +function Formulas.Create(_node: XmlNode);overload; +begin + class(OpenXmlElement).Create(_node: XmlNode); +end; + +function Formulas.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 Formulas.Init();override; +begin + pre := {self.}Prefix ? {self.}Prefix + ":" : ""; + attributes_ := array(); + attributes_pf_ := array( + ); + sorted_child_ := array( + "v:f": array(0, makeweakref(thisFunction(AppendF))), + ); + container_ := new TSOfficeContainer(sorted_child_); +end; + +function Formulas.Copy(_obj: Formulas);override; +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + class(OpenXmlElement).Copy(_obj); + tslassigning := tslassigning_backup; +end; + +function Formulas.ReadFs(_index); +begin + ind := ifnil(_index) ? -2 : _index; + pre := {self.}Prefix ? {self.}Prefix + ":" : ""; + return container_.Get("v:f", ind); +end; + +function Formulas.AddF(): Shapetype; +begin + obj := new Shapetype(self, "v", "f"); + container_.Insert(obj); + return obj; +end; + +function Formulas.AppendF(): Shapetype; +begin + obj := new Shapetype(self, "v", "f"); + container_.Append(obj); + return obj; +end; diff --git a/autoclass/docx/Imagedata@DOCX.tsf b/autoclass/docx/Imagedata@DOCX.tsf new file mode 100644 index 0000000..eaccc88 --- /dev/null +++ b/autoclass/docx/Imagedata@DOCX.tsf @@ -0,0 +1,96 @@ +type Imagedata = 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: Imagedata);override; + +public + + // attributes property + property Id read ReadXmlAttrId write WriteXmlAttrId; + property Title read ReadXmlAttrTitle write WriteXmlAttrTitle; + function ReadXmlAttrId(); + function WriteXmlAttrId(_value); + function ReadXmlAttrTitle(); + function WriteXmlAttrTitle(_value); + +public + // Attributes + XmlAttrId: OpenXmlAttribute; + XmlAttrTitle: OpenXmlAttribute; + + +end; + +function Imagedata.Create();overload; +begin + {self.}Create(nil, "v", "imagedata"); +end; + +function Imagedata.Create(_node: XmlNode);overload; +begin + class(OpenXmlElement).Create(_node: XmlNode); +end; + +function Imagedata.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 Imagedata.Init();override; +begin + pre := {self.}Prefix ? {self.}Prefix + ":" : ""; + attributes_ := array(); + attributes_pf_ := array( + "r:id": makeweakref(thisFunction(WriteXmlAttrId)), + "o:title": makeweakref(thisFunction(WriteXmlAttrTitle)), + ); + sorted_child_ := array( + ); + container_ := new TSOfficeContainer(sorted_child_); +end; + +function Imagedata.Copy(_obj: Imagedata);override; +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + class(OpenXmlElement).Copy(_obj); + if not ifnil(_obj.Id) then + {self.}Id := _obj.Id; + if not ifnil(_obj.Title) then + {self.}Title := _obj.Title; + tslassigning := tslassigning_backup; +end; + +function Imagedata.ReadXmlAttrId(); +begin + return {self.}XmlAttrId.Value; +end; + +function Imagedata.WriteXmlAttrId(_value); +begin + if ifnil({self.}XmlAttrId) then + begin + {self.}XmlAttrId := new OpenXmlAttribute("r", "id", nil); + attributes_[length(attributes_)] := {self.}XmlAttrId; + end + {self.}XmlAttrId.Value := _value; +end; + +function Imagedata.ReadXmlAttrTitle(); +begin + return {self.}XmlAttrTitle.Value; +end; + +function Imagedata.WriteXmlAttrTitle(_value); +begin + if ifnil({self.}XmlAttrTitle) then + begin + {self.}XmlAttrTitle := new OpenXmlAttribute("o", "title", nil); + attributes_[length(attributes_)] := {self.}XmlAttrTitle; + end + {self.}XmlAttrTitle.Value := _value; +end; diff --git a/autoclass/docx/Legend@DOCX.tsf b/autoclass/docx/Legend@DOCX.tsf index b588f39..7847340 100644 --- a/autoclass/docx/Legend@DOCX.tsf +++ b/autoclass/docx/Legend@DOCX.tsf @@ -85,7 +85,7 @@ begin container_.Set({self.}XmlChildLayout); return {self.}XmlChildLayout; end - return {self.}XmlChildLayout.BoolValue(); + return ifnil({self.}XmlChildLayout) ? false : {self.}XmlChildLayout.BoolValue(); end; function Legend.WriteXmlChildLayout(_value); diff --git a/autoclass/docx/Lock@DOCX.tsf b/autoclass/docx/Lock@DOCX.tsf new file mode 100644 index 0000000..332a03d --- /dev/null +++ b/autoclass/docx/Lock@DOCX.tsf @@ -0,0 +1,96 @@ +type Lock = 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: Lock);override; + +public + + // attributes property + property Ext read ReadXmlAttrExt write WriteXmlAttrExt; + property Aspectration read ReadXmlAttrAspectration write WriteXmlAttrAspectration; + function ReadXmlAttrExt(); + function WriteXmlAttrExt(_value); + function ReadXmlAttrAspectration(); + function WriteXmlAttrAspectration(_value); + +public + // Attributes + XmlAttrExt: OpenXmlAttribute; + XmlAttrAspectration: OpenXmlAttribute; + + +end; + +function Lock.Create();overload; +begin + {self.}Create(nil, "o", "lock"); +end; + +function Lock.Create(_node: XmlNode);overload; +begin + class(OpenXmlElement).Create(_node: XmlNode); +end; + +function Lock.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 Lock.Init();override; +begin + pre := {self.}Prefix ? {self.}Prefix + ":" : ""; + attributes_ := array(); + attributes_pf_ := array( + "v:ext": makeweakref(thisFunction(WriteXmlAttrExt)), + "aspectration": makeweakref(thisFunction(WriteXmlAttrAspectration)), + ); + sorted_child_ := array( + ); + container_ := new TSOfficeContainer(sorted_child_); +end; + +function Lock.Copy(_obj: Lock);override; +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + class(OpenXmlElement).Copy(_obj); + if not ifnil(_obj.Ext) then + {self.}Ext := _obj.Ext; + if not ifnil(_obj.Aspectration) then + {self.}Aspectration := _obj.Aspectration; + tslassigning := tslassigning_backup; +end; + +function Lock.ReadXmlAttrExt(); +begin + return {self.}XmlAttrExt.Value; +end; + +function Lock.WriteXmlAttrExt(_value); +begin + if ifnil({self.}XmlAttrExt) then + begin + {self.}XmlAttrExt := new OpenXmlAttribute("v", "ext", nil); + attributes_[length(attributes_)] := {self.}XmlAttrExt; + end + {self.}XmlAttrExt.Value := _value; +end; + +function Lock.ReadXmlAttrAspectration(); +begin + return {self.}XmlAttrAspectration.Value; +end; + +function Lock.WriteXmlAttrAspectration(_value); +begin + if ifnil({self.}XmlAttrAspectration) then + begin + {self.}XmlAttrAspectration := new OpenXmlAttribute("", "aspectration", nil); + attributes_[length(attributes_)] := {self.}XmlAttrAspectration; + end + {self.}XmlAttrAspectration.Value := _value; +end; diff --git a/autoclass/docx/MathPr@DOCX.tsf b/autoclass/docx/MathPr@DOCX.tsf index 4c4c5f3..852798d 100644 --- a/autoclass/docx/MathPr@DOCX.tsf +++ b/autoclass/docx/MathPr@DOCX.tsf @@ -127,7 +127,7 @@ begin container_.Set({self.}XmlChildDispDef); return {self.}XmlChildDispDef; end - return {self.}XmlChildDispDef.BoolValue(); + return ifnil({self.}XmlChildDispDef) ? false : {self.}XmlChildDispDef.BoolValue(); end; function MathPr.WriteXmlChildDispDef(_value); diff --git a/autoclass/docx/OLEObject@DOCX.tsf b/autoclass/docx/OLEObject@DOCX.tsf new file mode 100644 index 0000000..c6806f5 --- /dev/null +++ b/autoclass/docx/OLEObject@DOCX.tsf @@ -0,0 +1,184 @@ +type OLEObject = 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: OLEObject);override; + +public + + // attributes property + property Type read ReadXmlAttrType write WriteXmlAttrType; + property ProgID read ReadXmlAttrProgID write WriteXmlAttrProgID; + property ShapeID read ReadXmlAttrShapeID write WriteXmlAttrShapeID; + property DrawAspect read ReadXmlAttrDrawAspect write WriteXmlAttrDrawAspect; + property ObjectID read ReadXmlAttrObjectID write WriteXmlAttrObjectID; + property Id read ReadXmlAttrId write WriteXmlAttrId; + function ReadXmlAttrType(); + function WriteXmlAttrType(_value); + function ReadXmlAttrProgID(); + function WriteXmlAttrProgID(_value); + function ReadXmlAttrShapeID(); + function WriteXmlAttrShapeID(_value); + function ReadXmlAttrDrawAspect(); + function WriteXmlAttrDrawAspect(_value); + function ReadXmlAttrObjectID(); + function WriteXmlAttrObjectID(_value); + function ReadXmlAttrId(); + function WriteXmlAttrId(_value); + +public + // Attributes + XmlAttrType: OpenXmlAttribute; + XmlAttrProgID: OpenXmlAttribute; + XmlAttrShapeID: OpenXmlAttribute; + XmlAttrDrawAspect: OpenXmlAttribute; + XmlAttrObjectID: OpenXmlAttribute; + XmlAttrId: OpenXmlAttribute; + + +end; + +function OLEObject.Create();overload; +begin + {self.}Create(nil, "o", "OLEObject"); +end; + +function OLEObject.Create(_node: XmlNode);overload; +begin + class(OpenXmlElement).Create(_node: XmlNode); +end; + +function OLEObject.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 OLEObject.Init();override; +begin + pre := {self.}Prefix ? {self.}Prefix + ":" : ""; + attributes_ := array(); + attributes_pf_ := array( + pre + "Type": makeweakref(thisFunction(WriteXmlAttrType)), + pre + "ProgID": makeweakref(thisFunction(WriteXmlAttrProgID)), + pre + "ShapeID": makeweakref(thisFunction(WriteXmlAttrShapeID)), + pre + "DrawAspect": makeweakref(thisFunction(WriteXmlAttrDrawAspect)), + pre + "DrawAspect": makeweakref(thisFunction(WriteXmlAttrObjectID)), + "r:id": makeweakref(thisFunction(WriteXmlAttrId)), + ); + sorted_child_ := array( + ); + container_ := new TSOfficeContainer(sorted_child_); +end; + +function OLEObject.Copy(_obj: OLEObject);override; +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + class(OpenXmlElement).Copy(_obj); + if not ifnil(_obj.Type) then + {self.}Type := _obj.Type; + if not ifnil(_obj.ProgID) then + {self.}ProgID := _obj.ProgID; + if not ifnil(_obj.ShapeID) then + {self.}ShapeID := _obj.ShapeID; + if not ifnil(_obj.DrawAspect) then + {self.}DrawAspect := _obj.DrawAspect; + if not ifnil(_obj.ObjectID) then + {self.}ObjectID := _obj.ObjectID; + if not ifnil(_obj.Id) then + {self.}Id := _obj.Id; + tslassigning := tslassigning_backup; +end; + +function OLEObject.ReadXmlAttrType(); +begin + return {self.}XmlAttrType.Value; +end; + +function OLEObject.WriteXmlAttrType(_value); +begin + if ifnil({self.}XmlAttrType) then + begin + {self.}XmlAttrType := new OpenXmlAttribute({self.}Prefix, "Type", nil); + attributes_[length(attributes_)] := {self.}XmlAttrType; + end + {self.}XmlAttrType.Value := _value; +end; + +function OLEObject.ReadXmlAttrProgID(); +begin + return {self.}XmlAttrProgID.Value; +end; + +function OLEObject.WriteXmlAttrProgID(_value); +begin + if ifnil({self.}XmlAttrProgID) then + begin + {self.}XmlAttrProgID := new OpenXmlAttribute({self.}Prefix, "ProgID", nil); + attributes_[length(attributes_)] := {self.}XmlAttrProgID; + end + {self.}XmlAttrProgID.Value := _value; +end; + +function OLEObject.ReadXmlAttrShapeID(); +begin + return {self.}XmlAttrShapeID.Value; +end; + +function OLEObject.WriteXmlAttrShapeID(_value); +begin + if ifnil({self.}XmlAttrShapeID) then + begin + {self.}XmlAttrShapeID := new OpenXmlAttribute({self.}Prefix, "ShapeID", nil); + attributes_[length(attributes_)] := {self.}XmlAttrShapeID; + end + {self.}XmlAttrShapeID.Value := _value; +end; + +function OLEObject.ReadXmlAttrDrawAspect(); +begin + return {self.}XmlAttrDrawAspect.Value; +end; + +function OLEObject.WriteXmlAttrDrawAspect(_value); +begin + if ifnil({self.}XmlAttrDrawAspect) then + begin + {self.}XmlAttrDrawAspect := new OpenXmlAttribute({self.}Prefix, "DrawAspect", nil); + attributes_[length(attributes_)] := {self.}XmlAttrDrawAspect; + end + {self.}XmlAttrDrawAspect.Value := _value; +end; + +function OLEObject.ReadXmlAttrObjectID(); +begin + return {self.}XmlAttrObjectID.Value; +end; + +function OLEObject.WriteXmlAttrObjectID(_value); +begin + if ifnil({self.}XmlAttrObjectID) then + begin + {self.}XmlAttrObjectID := new OpenXmlAttribute({self.}Prefix, "DrawAspect", nil); + attributes_[length(attributes_)] := {self.}XmlAttrObjectID; + end + {self.}XmlAttrObjectID.Value := _value; +end; + +function OLEObject.ReadXmlAttrId(); +begin + return {self.}XmlAttrId.Value; +end; + +function OLEObject.WriteXmlAttrId(_value); +begin + if ifnil({self.}XmlAttrId) then + begin + {self.}XmlAttrId := new OpenXmlAttribute("r", "id", nil); + attributes_[length(attributes_)] := {self.}XmlAttrId; + end + {self.}XmlAttrId.Value := _value; +end; diff --git a/autoclass/docx/Object@DOCX.tsf b/autoclass/docx/Object@DOCX.tsf new file mode 100644 index 0000000..ccccd95 --- /dev/null +++ b/autoclass/docx/Object@DOCX.tsf @@ -0,0 +1,169 @@ +type Object = 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: Object);override; + +public + + // attributes property + property DxaOrig read ReadXmlAttrDxaOrig write WriteXmlAttrDxaOrig; + property DyaOrig read ReadXmlAttrDyaOrig write WriteXmlAttrDyaOrig; + property AnchorId read ReadXmlAttrAnchorId write WriteXmlAttrAnchorId; + function ReadXmlAttrDxaOrig(); + function WriteXmlAttrDxaOrig(_value); + function ReadXmlAttrDyaOrig(); + function WriteXmlAttrDyaOrig(_value); + function ReadXmlAttrAnchorId(); + function WriteXmlAttrAnchorId(_value); + + // normal property + property Shapetype read ReadXmlChildShapetype; + property Shape read ReadXmlChildShape; + property OLEObject read ReadXmlChildOLEObject; + function ReadXmlChildShapetype(); + function ReadXmlChildShape(); + function ReadXmlChildOLEObject(); + +public + // Attributes + XmlAttrDxaOrig: OpenXmlAttribute; + XmlAttrDyaOrig: OpenXmlAttribute; + XmlAttrAnchorId: OpenXmlAttribute; + + // Children + XmlChildShapetype: Shapetype; + XmlChildShape: Shape; + XmlChildOLEObject: OLEObject; + +end; + +function Object.Create();overload; +begin + {self.}Create(nil, "w", "object"); +end; + +function Object.Create(_node: XmlNode);overload; +begin + class(OpenXmlElement).Create(_node: XmlNode); +end; + +function Object.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 Object.Init();override; +begin + pre := {self.}Prefix ? {self.}Prefix + ":" : ""; + attributes_ := array(); + attributes_pf_ := array( + pre + "dxaOrig": makeweakref(thisFunction(WriteXmlAttrDxaOrig)), + pre + "dyaOrig": makeweakref(thisFunction(WriteXmlAttrDyaOrig)), + "w14:anchorId": makeweakref(thisFunction(WriteXmlAttrAnchorId)), + ); + sorted_child_ := array( + "v:shapetype": array(0, makeweakref(thisFunction(ReadXmlChildShapetype))), + "v:shape": array(1, makeweakref(thisFunction(ReadXmlChildShape))), + "o:OLEObject": array(2, makeweakref(thisFunction(ReadXmlChildOLEObject))), + ); + container_ := new TSOfficeContainer(sorted_child_); +end; + +function Object.Copy(_obj: Object);override; +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + class(OpenXmlElement).Copy(_obj); + if not ifnil(_obj.DxaOrig) then + {self.}DxaOrig := _obj.DxaOrig; + if not ifnil(_obj.DyaOrig) then + {self.}DyaOrig := _obj.DyaOrig; + if not ifnil(_obj.AnchorId) then + {self.}AnchorId := _obj.AnchorId; + if not ifnil(_obj.XmlChildShapetype) then + {self.}Shapetype.Copy(_obj.XmlChildShapetype); + if not ifnil(_obj.XmlChildShape) then + {self.}Shape.Copy(_obj.XmlChildShape); + if not ifnil(_obj.XmlChildOLEObject) then + {self.}OLEObject.Copy(_obj.XmlChildOLEObject); + tslassigning := tslassigning_backup; +end; + +function Object.ReadXmlAttrDxaOrig(); +begin + return {self.}XmlAttrDxaOrig.Value; +end; + +function Object.WriteXmlAttrDxaOrig(_value); +begin + if ifnil({self.}XmlAttrDxaOrig) then + begin + {self.}XmlAttrDxaOrig := new OpenXmlAttribute({self.}Prefix, "dxaOrig", nil); + attributes_[length(attributes_)] := {self.}XmlAttrDxaOrig; + end + {self.}XmlAttrDxaOrig.Value := _value; +end; + +function Object.ReadXmlAttrDyaOrig(); +begin + return {self.}XmlAttrDyaOrig.Value; +end; + +function Object.WriteXmlAttrDyaOrig(_value); +begin + if ifnil({self.}XmlAttrDyaOrig) then + begin + {self.}XmlAttrDyaOrig := new OpenXmlAttribute({self.}Prefix, "dyaOrig", nil); + attributes_[length(attributes_)] := {self.}XmlAttrDyaOrig; + end + {self.}XmlAttrDyaOrig.Value := _value; +end; + +function Object.ReadXmlAttrAnchorId(); +begin + return {self.}XmlAttrAnchorId.Value; +end; + +function Object.WriteXmlAttrAnchorId(_value); +begin + if ifnil({self.}XmlAttrAnchorId) then + begin + {self.}XmlAttrAnchorId := new OpenXmlAttribute("w14", "anchorId", nil); + attributes_[length(attributes_)] := {self.}XmlAttrAnchorId; + end + {self.}XmlAttrAnchorId.Value := _value; +end; + +function Object.ReadXmlChildShapetype(); +begin + if tslassigning and ifnil({self.}XmlChildShapetype) then + begin + {self.}XmlChildShapetype := new Shapetype(self, "v", "shapetype"); + container_.Set({self.}XmlChildShapetype); + end + return {self.}XmlChildShapetype; +end; + +function Object.ReadXmlChildShape(); +begin + if tslassigning and ifnil({self.}XmlChildShape) then + begin + {self.}XmlChildShape := new Shape(self, "v", "shape"); + container_.Set({self.}XmlChildShape); + end + return {self.}XmlChildShape; +end; + +function Object.ReadXmlChildOLEObject(); +begin + if tslassigning and ifnil({self.}XmlChildOLEObject) then + begin + {self.}XmlChildOLEObject := new OLEObject(self, "o", "OLEObject"); + container_.Set({self.}XmlChildOLEObject); + end + return {self.}XmlChildOLEObject; +end; diff --git a/autoclass/docx/PPr@DOCX.tsf b/autoclass/docx/PPr@DOCX.tsf index 590b66f..5c1c1f9 100644 --- a/autoclass/docx/PPr@DOCX.tsf +++ b/autoclass/docx/PPr@DOCX.tsf @@ -172,7 +172,7 @@ begin container_.Set({self.}XmlChildWidowControl); return {self.}XmlChildWidowControl; end - return {self.}XmlChildWidowControl.BoolValue(); + return ifnil({self.}XmlChildWidowControl) ? false : {self.}XmlChildWidowControl.BoolValue(); end; function PPr.WriteXmlChildWidowControl(_value); @@ -193,7 +193,7 @@ begin container_.Set({self.}XmlChildKeepNext); return {self.}XmlChildKeepNext; end - return {self.}XmlChildKeepNext.BoolValue(); + return ifnil({self.}XmlChildKeepNext) ? false : {self.}XmlChildKeepNext.BoolValue(); end; function PPr.WriteXmlChildKeepNext(_value); @@ -214,7 +214,7 @@ begin container_.Set({self.}XmlChildKeepLines); return {self.}XmlChildKeepLines; end - return {self.}XmlChildKeepLines.BoolValue(); + return ifnil({self.}XmlChildKeepLines) ? false : {self.}XmlChildKeepLines.BoolValue(); end; function PPr.WriteXmlChildKeepLines(_value); @@ -235,7 +235,7 @@ begin container_.Set({self.}XmlChildContextualSpacing); return {self.}XmlChildContextualSpacing; end - return {self.}XmlChildContextualSpacing.BoolValue(); + return ifnil({self.}XmlChildContextualSpacing) ? false : {self.}XmlChildContextualSpacing.BoolValue(); end; function PPr.WriteXmlChildContextualSpacing(_value); diff --git a/autoclass/docx/Path@DOCX.tsf b/autoclass/docx/Path@DOCX.tsf index bf12fe0..3e19ddd 100644 --- a/autoclass/docx/Path@DOCX.tsf +++ b/autoclass/docx/Path@DOCX.tsf @@ -9,8 +9,11 @@ public public // attributes property + property Extrusionok read ReadXmlAttrExtrusionok write WriteXmlAttrExtrusionok; property Gradientshapeok read ReadXmlAttrGradientshapeok write WriteXmlAttrGradientshapeok; property Connecttype read ReadXmlAttrConnecttype write WriteXmlAttrConnecttype; + function ReadXmlAttrExtrusionok(); + function WriteXmlAttrExtrusionok(_value); function ReadXmlAttrGradientshapeok(); function WriteXmlAttrGradientshapeok(_value); function ReadXmlAttrConnecttype(); @@ -18,6 +21,7 @@ public public // Attributes + XmlAttrExtrusionok: OpenXmlAttribute; XmlAttrGradientshapeok: OpenXmlAttribute; XmlAttrConnecttype: OpenXmlAttribute; @@ -45,6 +49,7 @@ begin pre := {self.}Prefix ? {self.}Prefix + ":" : ""; attributes_ := array(); attributes_pf_ := array( + "o:extrusionok": makeweakref(thisFunction(WriteXmlAttrExtrusionok)), "gradientshapeok": makeweakref(thisFunction(WriteXmlAttrGradientshapeok)), "o:connecttype": makeweakref(thisFunction(WriteXmlAttrConnecttype)), ); @@ -58,6 +63,8 @@ begin tslassigning_backup := tslassigning; tslassigning := 1; class(OpenXmlElement).Copy(_obj); + if not ifnil(_obj.Extrusionok) then + {self.}Extrusionok := _obj.Extrusionok; if not ifnil(_obj.Gradientshapeok) then {self.}Gradientshapeok := _obj.Gradientshapeok; if not ifnil(_obj.Connecttype) then @@ -65,6 +72,21 @@ begin tslassigning := tslassigning_backup; end; +function Path.ReadXmlAttrExtrusionok(); +begin + return {self.}XmlAttrExtrusionok.Value; +end; + +function Path.WriteXmlAttrExtrusionok(_value); +begin + if ifnil({self.}XmlAttrExtrusionok) then + begin + {self.}XmlAttrExtrusionok := new OpenXmlAttribute("o", "extrusionok", nil); + attributes_[length(attributes_)] := {self.}XmlAttrExtrusionok; + end + {self.}XmlAttrExtrusionok.Value := _value; +end; + function Path.ReadXmlAttrGradientshapeok(); begin return {self.}XmlAttrGradientshapeok.Value; diff --git a/autoclass/docx/PlotArea@DOCX.tsf b/autoclass/docx/PlotArea@DOCX.tsf index 3ec0fad..ffe7629 100644 --- a/autoclass/docx/PlotArea@DOCX.tsf +++ b/autoclass/docx/PlotArea@DOCX.tsf @@ -97,7 +97,7 @@ begin container_.Set({self.}XmlChildLayout); return {self.}XmlChildLayout; end - return {self.}XmlChildLayout.BoolValue(); + return ifnil({self.}XmlChildLayout) ? false : {self.}XmlChildLayout.BoolValue(); end; function PlotArea.WriteXmlChildLayout(_value); diff --git a/autoclass/docx/PrstTxWrap@DOCX.tsf b/autoclass/docx/PrstTxWrap@DOCX.tsf index df74f4a..d5445c6 100644 --- a/autoclass/docx/PrstTxWrap@DOCX.tsf +++ b/autoclass/docx/PrstTxWrap@DOCX.tsf @@ -91,7 +91,7 @@ begin container_.Set({self.}XmlChildAvLst); return {self.}XmlChildAvLst; end - return {self.}XmlChildAvLst.BoolValue(); + return ifnil({self.}XmlChildAvLst) ? false : {self.}XmlChildAvLst.BoolValue(); end; function PrstTxWrap.WriteXmlChildAvLst(_value); diff --git a/autoclass/docx/R@DOCX.tsf b/autoclass/docx/R@DOCX.tsf index 3967e93..6589321 100644 --- a/autoclass/docx/R@DOCX.tsf +++ b/autoclass/docx/R@DOCX.tsf @@ -39,6 +39,7 @@ public property Drawing read ReadXmlChildDrawing; property T read ReadXmlChildT; property FootnoteReference read ReadXmlChildFootnoteReference; + property Object read ReadXmlChildObject; function ReadXmlChildRPr(); function ReadXmlChildBr(); function ReadXmlChildFldChar(); @@ -47,6 +48,7 @@ public function ReadXmlChildDrawing(); function ReadXmlChildT(); function ReadXmlChildFootnoteReference(); + function ReadXmlChildObject(); public // Attributes @@ -66,6 +68,7 @@ public XmlChildDrawing: Drawing; XmlChildT: T; XmlChildFootnoteReference: FootnoteReference; + XmlChildObject: Object; end; @@ -106,6 +109,7 @@ begin pre + "drawing": array(8, makeweakref(thisFunction(ReadXmlChildDrawing))), pre + "t": array(9, makeweakref(thisFunction(ReadXmlChildT))), pre + "footnoteReference": array(10, makeweakref(thisFunction(ReadXmlChildFootnoteReference))), + pre + "object": array(11, makeweakref(thisFunction(ReadXmlChildObject))), ); container_ := new TSOfficeContainer(sorted_child_); end; @@ -143,6 +147,8 @@ begin {self.}T.Copy(_obj.XmlChildT); if not ifnil(_obj.XmlChildFootnoteReference) then {self.}FootnoteReference.Copy(_obj.XmlChildFootnoteReference); + if not ifnil(_obj.XmlChildObject) then + {self.}Object.Copy(_obj.XmlChildObject); tslassigning := tslassigning_backup; end; @@ -199,7 +205,7 @@ begin container_.Set({self.}XmlChildSeparator); return {self.}XmlChildSeparator; end - return {self.}XmlChildSeparator.BoolValue(); + return ifnil({self.}XmlChildSeparator) ? false : {self.}XmlChildSeparator.BoolValue(); end; function R.WriteXmlChildSeparator(_value); @@ -220,7 +226,7 @@ begin container_.Set({self.}XmlChildContinuationSeparator); return {self.}XmlChildContinuationSeparator; end - return {self.}XmlChildContinuationSeparator.BoolValue(); + return ifnil({self.}XmlChildContinuationSeparator) ? false : {self.}XmlChildContinuationSeparator.BoolValue(); end; function R.WriteXmlChildContinuationSeparator(_value); @@ -241,7 +247,7 @@ begin container_.Set({self.}XmlChildLastRenderedPageBreak); return {self.}XmlChildLastRenderedPageBreak; end - return {self.}XmlChildLastRenderedPageBreak.BoolValue(); + return ifnil({self.}XmlChildLastRenderedPageBreak) ? false : {self.}XmlChildLastRenderedPageBreak.BoolValue(); end; function R.WriteXmlChildLastRenderedPageBreak(_value); @@ -333,3 +339,13 @@ begin end return {self.}XmlChildFootnoteReference; end; + +function R.ReadXmlChildObject(); +begin + if tslassigning and ifnil({self.}XmlChildObject) then + begin + {self.}XmlChildObject := new Object(self, {self.}Prefix, "object"); + container_.Set({self.}XmlChildObject); + end + return {self.}XmlChildObject; +end; diff --git a/autoclass/docx/RPr@DOCX.tsf b/autoclass/docx/RPr@DOCX.tsf index 86af7a2..33cdb3c 100644 --- a/autoclass/docx/RPr@DOCX.tsf +++ b/autoclass/docx/RPr@DOCX.tsf @@ -162,7 +162,7 @@ begin container_.Set({self.}XmlChildI); return {self.}XmlChildI; end - return {self.}XmlChildI.BoolValue(); + return ifnil({self.}XmlChildI) ? false : {self.}XmlChildI.BoolValue(); end; function RPr.WriteXmlChildI(_value); @@ -183,7 +183,7 @@ begin container_.Set({self.}XmlChildICs); return {self.}XmlChildICs; end - return {self.}XmlChildICs.BoolValue(); + return ifnil({self.}XmlChildICs) ? false : {self.}XmlChildICs.BoolValue(); end; function RPr.WriteXmlChildICs(_value); @@ -204,7 +204,7 @@ begin container_.Set({self.}XmlChildB); return {self.}XmlChildB; end - return {self.}XmlChildB.BoolValue(); + return ifnil({self.}XmlChildB) ? false : {self.}XmlChildB.BoolValue(); end; function RPr.WriteXmlChildB(_value); @@ -225,7 +225,7 @@ begin container_.Set({self.}XmlChildBCs); return {self.}XmlChildBCs; end - return {self.}XmlChildBCs.BoolValue(); + return ifnil({self.}XmlChildBCs) ? false : {self.}XmlChildBCs.BoolValue(); end; function RPr.WriteXmlChildBCs(_value); @@ -246,7 +246,7 @@ begin container_.Set({self.}XmlChildStrike); return {self.}XmlChildStrike; end - return {self.}XmlChildStrike.BoolValue(); + return ifnil({self.}XmlChildStrike) ? false : {self.}XmlChildStrike.BoolValue(); end; function RPr.WriteXmlChildStrike(_value); @@ -267,7 +267,7 @@ begin container_.Set({self.}XmlChildU); return {self.}XmlChildU; end - return {self.}XmlChildU.BoolValue(); + return ifnil({self.}XmlChildU) ? false : {self.}XmlChildU.BoolValue(); end; function RPr.WriteXmlChildU(_value); diff --git a/autoclass/docx/Rich@DOCX.tsf b/autoclass/docx/Rich@DOCX.tsf index 86c1fca..68e602e 100644 --- a/autoclass/docx/Rich@DOCX.tsf +++ b/autoclass/docx/Rich@DOCX.tsf @@ -80,7 +80,7 @@ begin container_.Set({self.}XmlChildLstStyle); return {self.}XmlChildLstStyle; end - return {self.}XmlChildLstStyle.BoolValue(); + return ifnil({self.}XmlChildLstStyle) ? false : {self.}XmlChildLstStyle.BoolValue(); end; function Rich.WriteXmlChildLstStyle(_value); diff --git a/autoclass/docx/Scaling@DOCX.tsf b/autoclass/docx/Scaling@DOCX.tsf index b790bf4..38eb4a9 100644 --- a/autoclass/docx/Scaling@DOCX.tsf +++ b/autoclass/docx/Scaling@DOCX.tsf @@ -65,7 +65,7 @@ begin container_.Set({self.}XmlChildOrientation); return {self.}XmlChildOrientation; end - return {self.}XmlChildOrientation.BoolValue(); + return ifnil({self.}XmlChildOrientation) ? false : {self.}XmlChildOrientation.BoolValue(); end; function Scaling.WriteXmlChildOrientation(_value); diff --git a/autoclass/docx/SectPr@DOCX.tsf b/autoclass/docx/SectPr@DOCX.tsf index 3a0a770..91e40b7 100644 --- a/autoclass/docx/SectPr@DOCX.tsf +++ b/autoclass/docx/SectPr@DOCX.tsf @@ -169,7 +169,7 @@ begin container_.Set({self.}XmlChildTitlePg); return {self.}XmlChildTitlePg; end - return {self.}XmlChildTitlePg.BoolValue(); + return ifnil({self.}XmlChildTitlePg) ? false : {self.}XmlChildTitlePg.BoolValue(); end; function SectPr.WriteXmlChildTitlePg(_value); diff --git a/autoclass/docx/Settings@DOCX.tsf b/autoclass/docx/Settings@DOCX.tsf index 82c5d97..7ad4b9b 100644 --- a/autoclass/docx/Settings@DOCX.tsf +++ b/autoclass/docx/Settings@DOCX.tsf @@ -521,7 +521,7 @@ begin container_.Set({self.}XmlChildBordersDoNotSurroundHeader); return {self.}XmlChildBordersDoNotSurroundHeader; end - return {self.}XmlChildBordersDoNotSurroundHeader.BoolValue(); + return ifnil({self.}XmlChildBordersDoNotSurroundHeader) ? false : {self.}XmlChildBordersDoNotSurroundHeader.BoolValue(); end; function Settings.WriteXmlChildBordersDoNotSurroundHeader(_value); @@ -542,7 +542,7 @@ begin container_.Set({self.}XmlChildBordersDoNotSurroundFooter); return {self.}XmlChildBordersDoNotSurroundFooter; end - return {self.}XmlChildBordersDoNotSurroundFooter.BoolValue(); + return ifnil({self.}XmlChildBordersDoNotSurroundFooter) ? false : {self.}XmlChildBordersDoNotSurroundFooter.BoolValue(); end; function Settings.WriteXmlChildBordersDoNotSurroundFooter(_value); @@ -563,7 +563,7 @@ begin container_.Set({self.}XmlChildEvenAndOddHeaders); return {self.}XmlChildEvenAndOddHeaders; end - return {self.}XmlChildEvenAndOddHeaders.BoolValue(); + return ifnil({self.}XmlChildEvenAndOddHeaders) ? false : {self.}XmlChildEvenAndOddHeaders.BoolValue(); end; function Settings.WriteXmlChildEvenAndOddHeaders(_value); @@ -584,7 +584,7 @@ begin container_.Set({self.}XmlChildDoNotIncludeSubdocsInStats); return {self.}XmlChildDoNotIncludeSubdocsInStats; end - return {self.}XmlChildDoNotIncludeSubdocsInStats.BoolValue(); + return ifnil({self.}XmlChildDoNotIncludeSubdocsInStats) ? false : {self.}XmlChildDoNotIncludeSubdocsInStats.BoolValue(); end; function Settings.WriteXmlChildDoNotIncludeSubdocsInStats(_value); @@ -605,7 +605,7 @@ begin container_.Set({self.}XmlChildW15ChartTrackingRefBased); return {self.}XmlChildW15ChartTrackingRefBased; end - return {self.}XmlChildW15ChartTrackingRefBased.BoolValue(); + return ifnil({self.}XmlChildW15ChartTrackingRefBased) ? false : {self.}XmlChildW15ChartTrackingRefBased.BoolValue(); end; function Settings.WriteXmlChildW15ChartTrackingRefBased(_value); diff --git a/autoclass/docx/Shape@DOCX.tsf b/autoclass/docx/Shape@DOCX.tsf index 5d4b75a..1ab6784 100644 --- a/autoclass/docx/Shape@DOCX.tsf +++ b/autoclass/docx/Shape@DOCX.tsf @@ -10,13 +10,17 @@ public // attributes property property Id read ReadXmlAttrId write WriteXmlAttrId; + property Style read ReadXmlAttrStyle write WriteXmlAttrStyle; property Spid read ReadXmlAttrSpid write WriteXmlAttrSpid; property Type read ReadXmlAttrType write WriteXmlAttrType; property Gfxdata read ReadXmlAttrGfxdata write WriteXmlAttrGfxdata; property Filled read ReadXmlAttrFilled write WriteXmlAttrFilled; property Stroked read ReadXmlAttrStroked write WriteXmlAttrStroked; + property Ole read ReadXmlAttrOle write WriteXmlAttrOle; function ReadXmlAttrId(); function WriteXmlAttrId(_value); + function ReadXmlAttrStyle(); + function WriteXmlAttrStyle(_value); function ReadXmlAttrSpid(); function WriteXmlAttrSpid(_value); function ReadXmlAttrType(); @@ -27,22 +31,29 @@ public function WriteXmlAttrFilled(_value); function ReadXmlAttrStroked(); function WriteXmlAttrStroked(_value); + function ReadXmlAttrOle(); + function WriteXmlAttrOle(_value); // normal property property Textbox read ReadXmlChildTextbox; + property Imagedata read ReadXmlChildImagedata; function ReadXmlChildTextbox(); + function ReadXmlChildImagedata(); public // Attributes XmlAttrId: OpenXmlAttribute; + XmlAttrStyle: OpenXmlAttribute; XmlAttrSpid: OpenXmlAttribute; XmlAttrType: OpenXmlAttribute; XmlAttrGfxdata: OpenXmlAttribute; XmlAttrFilled: OpenXmlAttribute; XmlAttrStroked: OpenXmlAttribute; + XmlAttrOle: OpenXmlAttribute; // Children XmlChildTextbox: Textbox; + XmlChildImagedata: Imagedata; end; @@ -68,14 +79,17 @@ begin attributes_ := array(); attributes_pf_ := array( "id": makeweakref(thisFunction(WriteXmlAttrId)), + "style": makeweakref(thisFunction(WriteXmlAttrStyle)), "o:spid": makeweakref(thisFunction(WriteXmlAttrSpid)), "type": makeweakref(thisFunction(WriteXmlAttrType)), "o:gfxdata": makeweakref(thisFunction(WriteXmlAttrGfxdata)), "filled": makeweakref(thisFunction(WriteXmlAttrFilled)), "stroked": makeweakref(thisFunction(WriteXmlAttrStroked)), + "o:ole": makeweakref(thisFunction(WriteXmlAttrOle)), ); sorted_child_ := array( pre + "textbox": array(0, makeweakref(thisFunction(ReadXmlChildTextbox))), + pre + "imagedata": array(1, makeweakref(thisFunction(ReadXmlChildImagedata))), ); container_ := new TSOfficeContainer(sorted_child_); end; @@ -87,6 +101,8 @@ begin class(OpenXmlElement).Copy(_obj); if not ifnil(_obj.Id) then {self.}Id := _obj.Id; + if not ifnil(_obj.Style) then + {self.}Style := _obj.Style; if not ifnil(_obj.Spid) then {self.}Spid := _obj.Spid; if not ifnil(_obj.Type) then @@ -97,8 +113,12 @@ begin {self.}Filled := _obj.Filled; if not ifnil(_obj.Stroked) then {self.}Stroked := _obj.Stroked; + if not ifnil(_obj.Ole) then + {self.}Ole := _obj.Ole; if not ifnil(_obj.XmlChildTextbox) then {self.}Textbox.Copy(_obj.XmlChildTextbox); + if not ifnil(_obj.XmlChildImagedata) then + {self.}Imagedata.Copy(_obj.XmlChildImagedata); tslassigning := tslassigning_backup; end; @@ -117,6 +137,21 @@ begin {self.}XmlAttrId.Value := _value; end; +function Shape.ReadXmlAttrStyle(); +begin + return {self.}XmlAttrStyle.Value; +end; + +function Shape.WriteXmlAttrStyle(_value); +begin + if ifnil({self.}XmlAttrStyle) then + begin + {self.}XmlAttrStyle := new OpenXmlAttribute("", "style", nil); + attributes_[length(attributes_)] := {self.}XmlAttrStyle; + end + {self.}XmlAttrStyle.Value := _value; +end; + function Shape.ReadXmlAttrSpid(); begin return {self.}XmlAttrSpid.Value; @@ -192,6 +227,21 @@ begin {self.}XmlAttrStroked.Value := _value; end; +function Shape.ReadXmlAttrOle(); +begin + return {self.}XmlAttrOle.Value; +end; + +function Shape.WriteXmlAttrOle(_value); +begin + if ifnil({self.}XmlAttrOle) then + begin + {self.}XmlAttrOle := new OpenXmlAttribute("o", "ole", nil); + attributes_[length(attributes_)] := {self.}XmlAttrOle; + end + {self.}XmlAttrOle.Value := _value; +end; + function Shape.ReadXmlChildTextbox(); begin if tslassigning and ifnil({self.}XmlChildTextbox) then @@ -201,3 +251,13 @@ begin end return {self.}XmlChildTextbox; end; + +function Shape.ReadXmlChildImagedata(); +begin + if tslassigning and ifnil({self.}XmlChildImagedata) then + begin + {self.}XmlChildImagedata := new Imagedata(self, {self.}Prefix, "imagedata"); + container_.Set({self.}XmlChildImagedata); + end + return {self.}XmlChildImagedata; +end; diff --git a/autoclass/docx/Shapetype@DOCX.tsf b/autoclass/docx/Shapetype@DOCX.tsf index fe5acd0..3fc7059 100644 --- a/autoclass/docx/Shapetype@DOCX.tsf +++ b/autoclass/docx/Shapetype@DOCX.tsf @@ -13,7 +13,10 @@ public property Id read ReadXmlAttrId write WriteXmlAttrId; property Coordsize read ReadXmlAttrCoordsize write WriteXmlAttrCoordsize; property Spt read ReadXmlAttrSpt write WriteXmlAttrSpt; + property Preferrelative read ReadXmlAttrPreferrelative write WriteXmlAttrPreferrelative; property Path read ReadXmlAttrPath write WriteXmlAttrPath; + property Filled read ReadXmlAttrFilled write WriteXmlAttrFilled; + property Stroked read ReadXmlAttrStroked write WriteXmlAttrStroked; function ReadXmlAttrAnchorId(); function WriteXmlAttrAnchorId(_value); function ReadXmlAttrId(); @@ -22,14 +25,24 @@ public function WriteXmlAttrCoordsize(_value); function ReadXmlAttrSpt(); function WriteXmlAttrSpt(_value); + function ReadXmlAttrPreferrelative(); + function WriteXmlAttrPreferrelative(_value); function ReadXmlAttrPath(); function WriteXmlAttrPath(_value); + function ReadXmlAttrFilled(); + function WriteXmlAttrFilled(_value); + function ReadXmlAttrStroked(); + function WriteXmlAttrStroked(_value); // normal property property Stroke read ReadXmlChildStroke; + property Formulas read ReadXmlChildFormulas; property Path read ReadXmlChildPath; + property Lock read ReadXmlChildLock; function ReadXmlChildStroke(); + function ReadXmlChildFormulas(); function ReadXmlChildPath(); + function ReadXmlChildLock(); public // Attributes @@ -37,11 +50,16 @@ public XmlAttrId: OpenXmlAttribute; XmlAttrCoordsize: OpenXmlAttribute; XmlAttrSpt: OpenXmlAttribute; + XmlAttrPreferrelative: OpenXmlAttribute; XmlAttrPath: OpenXmlAttribute; + XmlAttrFilled: OpenXmlAttribute; + XmlAttrStroked: OpenXmlAttribute; // Children XmlChildStroke: Stroke; + XmlChildFormulas: formulas; XmlChildPath: Path; + XmlChildLock: Lock; end; @@ -70,11 +88,16 @@ begin "id": makeweakref(thisFunction(WriteXmlAttrId)), "coordsize": makeweakref(thisFunction(WriteXmlAttrCoordsize)), "o:spt": makeweakref(thisFunction(WriteXmlAttrSpt)), + "preferrelative": makeweakref(thisFunction(WriteXmlAttrPreferrelative)), "path": makeweakref(thisFunction(WriteXmlAttrPath)), + "filled": makeweakref(thisFunction(WriteXmlAttrFilled)), + "stroked": makeweakref(thisFunction(WriteXmlAttrStroked)), ); sorted_child_ := array( pre + "stroke": array(0, makeweakref(thisFunction(ReadXmlChildStroke))), - pre + "path": array(1, makeweakref(thisFunction(ReadXmlChildPath))), + pre + "formulas": array(1, makeweakref(thisFunction(ReadXmlChildFormulas))), + pre + "path": array(2, makeweakref(thisFunction(ReadXmlChildPath))), + "o:lock": array(3, makeweakref(thisFunction(ReadXmlChildLock))), ); container_ := new TSOfficeContainer(sorted_child_); end; @@ -92,12 +115,22 @@ begin {self.}Coordsize := _obj.Coordsize; if not ifnil(_obj.Spt) then {self.}Spt := _obj.Spt; + if not ifnil(_obj.Preferrelative) then + {self.}Preferrelative := _obj.Preferrelative; if not ifnil(_obj.Path) then {self.}Path := _obj.Path; + if not ifnil(_obj.Filled) then + {self.}Filled := _obj.Filled; + if not ifnil(_obj.Stroked) then + {self.}Stroked := _obj.Stroked; if not ifnil(_obj.XmlChildStroke) then {self.}Stroke.Copy(_obj.XmlChildStroke); + if not ifnil(_obj.XmlChildFormulas) then + {self.}Formulas.Copy(_obj.XmlChildFormulas); if not ifnil(_obj.XmlChildPath) then {self.}Path.Copy(_obj.XmlChildPath); + if not ifnil(_obj.XmlChildLock) then + {self.}Lock.Copy(_obj.XmlChildLock); tslassigning := tslassigning_backup; end; @@ -161,6 +194,21 @@ begin {self.}XmlAttrSpt.Value := _value; end; +function Shapetype.ReadXmlAttrPreferrelative(); +begin + return {self.}XmlAttrPreferrelative.Value; +end; + +function Shapetype.WriteXmlAttrPreferrelative(_value); +begin + if ifnil({self.}XmlAttrPreferrelative) then + begin + {self.}XmlAttrPreferrelative := new OpenXmlAttribute("", "preferrelative", nil); + attributes_[length(attributes_)] := {self.}XmlAttrPreferrelative; + end + {self.}XmlAttrPreferrelative.Value := _value; +end; + function Shapetype.ReadXmlAttrPath(); begin return {self.}XmlAttrPath.Value; @@ -176,6 +224,36 @@ begin {self.}XmlAttrPath.Value := _value; end; +function Shapetype.ReadXmlAttrFilled(); +begin + return {self.}XmlAttrFilled.Value; +end; + +function Shapetype.WriteXmlAttrFilled(_value); +begin + if ifnil({self.}XmlAttrFilled) then + begin + {self.}XmlAttrFilled := new OpenXmlAttribute("", "filled", nil); + attributes_[length(attributes_)] := {self.}XmlAttrFilled; + end + {self.}XmlAttrFilled.Value := _value; +end; + +function Shapetype.ReadXmlAttrStroked(); +begin + return {self.}XmlAttrStroked.Value; +end; + +function Shapetype.WriteXmlAttrStroked(_value); +begin + if ifnil({self.}XmlAttrStroked) then + begin + {self.}XmlAttrStroked := new OpenXmlAttribute("", "stroked", nil); + attributes_[length(attributes_)] := {self.}XmlAttrStroked; + end + {self.}XmlAttrStroked.Value := _value; +end; + function Shapetype.ReadXmlChildStroke(); begin if tslassigning and ifnil({self.}XmlChildStroke) then @@ -186,6 +264,16 @@ begin return {self.}XmlChildStroke; end; +function Shapetype.ReadXmlChildFormulas(); +begin + if tslassigning and ifnil({self.}XmlChildFormulas) then + begin + {self.}XmlChildFormulas := new formulas(self, {self.}Prefix, "formulas"); + container_.Set({self.}XmlChildFormulas); + end + return {self.}XmlChildFormulas; +end; + function Shapetype.ReadXmlChildPath(); begin if tslassigning and ifnil({self.}XmlChildPath) then @@ -195,3 +283,13 @@ begin end return {self.}XmlChildPath; end; + +function Shapetype.ReadXmlChildLock(); +begin + if tslassigning and ifnil({self.}XmlChildLock) then + begin + {self.}XmlChildLock := new Lock(self, "o", "lock"); + container_.Set({self.}XmlChildLock); + end + return {self.}XmlChildLock; +end; diff --git a/autoclass/docx/SpPr@DOCX.tsf b/autoclass/docx/SpPr@DOCX.tsf index a0083d1..d6ec26c 100644 --- a/autoclass/docx/SpPr@DOCX.tsf +++ b/autoclass/docx/SpPr@DOCX.tsf @@ -123,7 +123,7 @@ begin container_.Set({self.}XmlChildNoFill); return {self.}XmlChildNoFill; end - return {self.}XmlChildNoFill.BoolValue(); + return ifnil({self.}XmlChildNoFill) ? false : {self.}XmlChildNoFill.BoolValue(); end; function SpPr.WriteXmlChildNoFill(_value); diff --git a/autoclass/docx/Style@DOCX.tsf b/autoclass/docx/Style@DOCX.tsf index af82b77..9c72522 100644 --- a/autoclass/docx/Style@DOCX.tsf +++ b/autoclass/docx/Style@DOCX.tsf @@ -231,7 +231,7 @@ begin container_.Set({self.}XmlChildSemiHidden); return {self.}XmlChildSemiHidden; end - return {self.}XmlChildSemiHidden.BoolValue(); + return ifnil({self.}XmlChildSemiHidden) ? false : {self.}XmlChildSemiHidden.BoolValue(); end; function Style.WriteXmlChildSemiHidden(_value); @@ -252,7 +252,7 @@ begin container_.Set({self.}XmlChildUnhideWhenUsed); return {self.}XmlChildUnhideWhenUsed; end - return {self.}XmlChildUnhideWhenUsed.BoolValue(); + return ifnil({self.}XmlChildUnhideWhenUsed) ? false : {self.}XmlChildUnhideWhenUsed.BoolValue(); end; function Style.WriteXmlChildUnhideWhenUsed(_value); @@ -273,7 +273,7 @@ begin container_.Set({self.}XmlChildQFormat); return {self.}XmlChildQFormat; end - return {self.}XmlChildQFormat.BoolValue(); + return ifnil({self.}XmlChildQFormat) ? false : {self.}XmlChildQFormat.BoolValue(); end; function Style.WriteXmlChildQFormat(_value); @@ -294,7 +294,7 @@ begin container_.Set({self.}XmlChildRsid); return {self.}XmlChildRsid; end - return {self.}XmlChildRsid.BoolValue(); + return ifnil({self.}XmlChildRsid) ? false : {self.}XmlChildRsid.BoolValue(); end; function Style.WriteXmlChildRsid(_value); diff --git a/autoclass/docx/TcPr@DOCX.tsf b/autoclass/docx/TcPr@DOCX.tsf index 1ce95aa..f17195a 100644 --- a/autoclass/docx/TcPr@DOCX.tsf +++ b/autoclass/docx/TcPr@DOCX.tsf @@ -91,7 +91,7 @@ begin container_.Set({self.}XmlChildVMerge); return {self.}XmlChildVMerge; end - return {self.}XmlChildVMerge.BoolValue(); + return ifnil({self.}XmlChildVMerge) ? false : {self.}XmlChildVMerge.BoolValue(); end; function TcPr.WriteXmlChildVMerge(_value); diff --git a/autoclass/docx/Theme@DOCX.tsf b/autoclass/docx/Theme@DOCX.tsf index d03a914..85be596 100644 --- a/autoclass/docx/Theme@DOCX.tsf +++ b/autoclass/docx/Theme@DOCX.tsf @@ -134,7 +134,7 @@ begin container_.Set({self.}XmlChildObjectDefaults); return {self.}XmlChildObjectDefaults; end - return {self.}XmlChildObjectDefaults.BoolValue(); + return ifnil({self.}XmlChildObjectDefaults) ? false : {self.}XmlChildObjectDefaults.BoolValue(); end; function Theme.WriteXmlChildObjectDefaults(_value); @@ -155,7 +155,7 @@ begin container_.Set({self.}XmlChildExtraClrSchemeLst); return {self.}XmlChildExtraClrSchemeLst; end - return {self.}XmlChildExtraClrSchemeLst.BoolValue(); + return ifnil({self.}XmlChildExtraClrSchemeLst) ? false : {self.}XmlChildExtraClrSchemeLst.BoolValue(); end; function Theme.WriteXmlChildExtraClrSchemeLst(_value); diff --git a/autoclass/docx/Title@DOCX.tsf b/autoclass/docx/Title@DOCX.tsf index 1447eb8..fdbe10b 100644 --- a/autoclass/docx/Title@DOCX.tsf +++ b/autoclass/docx/Title@DOCX.tsf @@ -79,7 +79,7 @@ begin container_.Set({self.}XmlChildLayout); return {self.}XmlChildLayout; end - return {self.}XmlChildLayout.BoolValue(); + return ifnil({self.}XmlChildLayout) ? false : {self.}XmlChildLayout.BoolValue(); end; function Title.WriteXmlChildLayout(_value); diff --git a/autoclass/docx/TrPr@DOCX.tsf b/autoclass/docx/TrPr@DOCX.tsf index 4aa92aa..1e0519b 100644 --- a/autoclass/docx/TrPr@DOCX.tsf +++ b/autoclass/docx/TrPr@DOCX.tsf @@ -91,7 +91,7 @@ begin container_.Set({self.}XmlChildCantSplit); return {self.}XmlChildCantSplit; end - return {self.}XmlChildCantSplit.BoolValue(); + return ifnil({self.}XmlChildCantSplit) ? false : {self.}XmlChildCantSplit.BoolValue(); end; function TrPr.WriteXmlChildCantSplit(_value); diff --git a/autoclass/docx/TxPr@DOCX.tsf b/autoclass/docx/TxPr@DOCX.tsf index 8bdffc6..3d0b9e6 100644 --- a/autoclass/docx/TxPr@DOCX.tsf +++ b/autoclass/docx/TxPr@DOCX.tsf @@ -80,7 +80,7 @@ begin container_.Set({self.}XmlChildLstStyle); return {self.}XmlChildLstStyle; end - return {self.}XmlChildLstStyle.BoolValue(); + return ifnil({self.}XmlChildLstStyle) ? false : {self.}XmlChildLstStyle.BoolValue(); end; function TxPr.WriteXmlChildLstStyle(_value); diff --git a/autoclass/docx/WebSettings@DOCX.tsf b/autoclass/docx/WebSettings@DOCX.tsf index 57fe8fd..1a612b3 100644 --- a/autoclass/docx/WebSettings@DOCX.tsf +++ b/autoclass/docx/WebSettings@DOCX.tsf @@ -340,7 +340,7 @@ begin container_.Set({self.}XmlChildOptimizeForBrowser); return {self.}XmlChildOptimizeForBrowser; end - return {self.}XmlChildOptimizeForBrowser.BoolValue(); + return ifnil({self.}XmlChildOptimizeForBrowser) ? false : {self.}XmlChildOptimizeForBrowser.BoolValue(); end; function WebSettings.WriteXmlChildOptimizeForBrowser(_value); @@ -361,7 +361,7 @@ begin container_.Set({self.}XmlChildAllowPNG); return {self.}XmlChildAllowPNG; end - return {self.}XmlChildAllowPNG.BoolValue(); + return ifnil({self.}XmlChildAllowPNG) ? false : {self.}XmlChildAllowPNG.BoolValue(); end; function WebSettings.WriteXmlChildAllowPNG(_value); diff --git a/openxml/OpenXmlEmpty.tsf b/openxml/OpenXmlEmpty.tsf index 2965056..5e2abcf 100644 --- a/openxml/OpenXmlEmpty.tsf +++ b/openxml/OpenXmlEmpty.tsf @@ -103,7 +103,7 @@ end; function OpenXmlEmpty.BoolValue(): boolean; begin - return ifnil({self.}Val) ? {self.}Value : {self.}Val; + return ifnil({self.}Val) ? {self.}Value ? true : false : {self.}Val; end; function OpenXmlEmpty.ReadXmlAttrVal();