From 16452c8362228a9d358b8ca0ca294bb68ad248f0 Mon Sep 17 00:00:00 2001 From: csh Date: Wed, 6 Aug 2025 18:16:15 +0800 Subject: [PATCH] =?UTF-8?q?improvement:=20=E5=8D=95=E4=BD=8D=E8=BD=AC?= =?UTF-8?q?=E6=8D=A2=E7=9A=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autounit/DocxMLUnitDecorator.tsf | 1158 +++++++++++++++------------ autounit/DrawingMLUnitDecorator.tsf | 558 ++++++------- autounit/SharedMLUnitDecorator.tsf | 228 +++--- autounit/VMLUnitDecorator.tsf | 104 +-- utils/TSSafeUnitConverter.tsf | 148 +++- utils/TSUnitConverter.tsf | 124 ++- 6 files changed, 1301 insertions(+), 1019 deletions(-) diff --git a/autounit/DocxMLUnitDecorator.tsf b/autounit/DocxMLUnitDecorator.tsf index 8639620..2871f97 100644 --- a/autounit/DocxMLUnitDecorator.tsf +++ b/autounit/DocxMLUnitDecorator.tsf @@ -4,7 +4,7 @@ uses DocxML, TSSafeUnitConverter; type PropertiesUnitDecorator = class(Properties) public - function Create(_obj: Properties); + function create(_obj: Properties); function GetObject(); function Convert(); private @@ -13,7 +13,7 @@ end; type DocumentUnitDecorator = class(Document) public - function Create(_obj: Document); + function create(_obj: Document); function GetObject(); function Convert(); private @@ -22,7 +22,7 @@ end; type BodyUnitDecorator = class(Body) public - function Create(_obj: Body); + function create(_obj: Body); function GetObject(); function Convert(); private @@ -31,7 +31,7 @@ end; type PUnitDecorator = class(P) public - function Create(_obj: P); + function create(_obj: P); function GetObject(); function Convert(); private @@ -40,7 +40,7 @@ end; type FldSimpleUnitDecorator = class(FldSimple) public - function Create(_obj: FldSimple); + function create(_obj: FldSimple); function GetObject(); function Convert(); private @@ -49,7 +49,7 @@ end; type CommentRangeUnitDecorator = class(CommentRange) public - function Create(_obj: CommentRange); + function create(_obj: CommentRange); function GetObject(); function Convert(); private @@ -58,7 +58,7 @@ end; type HyperLinkUnitDecorator = class(HyperLink) public - function Create(_obj: HyperLink); + function create(_obj: HyperLink); function GetObject(); function Convert(); private @@ -67,7 +67,7 @@ end; type BookmarkUnitDecorator = class(Bookmark) public - function Create(_obj: Bookmark); + function create(_obj: Bookmark); function GetObject(); function Convert(); private @@ -76,7 +76,7 @@ end; type PPrUnitDecorator = class(PPr) public - function Create(_obj: PPr); + function create(_obj: PPr); function GetObject(); function Convert(); private @@ -85,7 +85,7 @@ end; type PBdrUnitDecorator = class(PBdr) public - function Create(_obj: PBdr); + function create(_obj: PBdr); function GetObject(); function Convert(); private @@ -94,25 +94,16 @@ end; type FramePrUnitDecorator = class(FramePr) public - function Create(_obj: FramePr); + function create(_obj: FramePr); function GetObject(); function Convert(); private object_: FramePr; end; -type PBorderUnitDecorator = class(PBorder) -public - function Create(_obj: PBorder); - function GetObject(); - function Convert(); -private - object_: PBorder; -end; - type TabsUnitDecorator = class(Tabs) public - function Create(_obj: Tabs); + function create(_obj: Tabs); function GetObject(); function Convert(); private @@ -121,7 +112,7 @@ end; type TabUnitDecorator = class(Tab) public - function Create(_obj: Tab); + function create(_obj: Tab); function GetObject(); function Convert(); private @@ -130,7 +121,7 @@ end; type NumPrUnitDecorator = class(NumPr) public - function Create(_obj: NumPr); + function create(_obj: NumPr); function GetObject(); function Convert(); private @@ -139,7 +130,7 @@ end; type IndUnitDecorator = class(Ind) public - function Create(_obj: Ind); + function create(_obj: Ind); function GetObject(); function Convert(); private @@ -148,7 +139,7 @@ end; type SpacingUnitDecorator = class(Spacing) public - function Create(_obj: Spacing); + function create(_obj: Spacing); function GetObject(); function Convert(); private @@ -157,16 +148,25 @@ end; type RPrUnitDecorator = class(RPr) public - function Create(_obj: RPr); + function create(_obj: RPr); function GetObject(); function Convert(); private object_: RPr; end; +type UUnitDecorator = class(U) +public + function create(_obj: U); + function GetObject(); + function Convert(); +private + object_: U; +end; + type ShdUnitDecorator = class(Shd) public - function Create(_obj: Shd); + function create(_obj: Shd); function GetObject(); function Convert(); private @@ -175,7 +175,7 @@ end; type HighlightUnitDecorator = class(Highlight) public - function Create(_obj: Highlight); + function create(_obj: Highlight); function GetObject(); function Convert(); private @@ -184,7 +184,7 @@ end; type FitTextUnitDecorator = class(FitText) public - function Create(_obj: FitText); + function create(_obj: FitText); function GetObject(); function Convert(); private @@ -193,7 +193,7 @@ end; type EastAsianLayoutUnitDecorator = class(EastAsianLayout) public - function Create(_obj: EastAsianLayout); + function create(_obj: EastAsianLayout); function GetObject(); function Convert(); private @@ -202,7 +202,7 @@ end; type DelUnitDecorator = class(Del) public - function Create(_obj: Del); + function create(_obj: Del); function GetObject(); function Convert(); private @@ -211,7 +211,7 @@ end; type BdrUnitDecorator = class(Bdr) public - function Create(_obj: Bdr); + function create(_obj: Bdr); function GetObject(); function Convert(); private @@ -220,7 +220,7 @@ end; type RFontsUnitDecorator = class(RFonts) public - function Create(_obj: RFonts); + function create(_obj: RFonts); function GetObject(); function Convert(); private @@ -229,7 +229,7 @@ end; type SzCsUnitDecorator = class(SzCs) public - function Create(_obj: SzCs); + function create(_obj: SzCs); function GetObject(); function Convert(); private @@ -238,7 +238,7 @@ end; type SzUnitDecorator = class(Sz) public - function Create(_obj: Sz); + function create(_obj: Sz); function GetObject(); function Convert(); private @@ -247,7 +247,7 @@ end; type PureValUnitDecorator = class(PureVal) public - function Create(_obj: PureVal); + function create(_obj: PureVal); function GetObject(); function Convert(); private @@ -256,7 +256,7 @@ end; type PureWValUnitDecorator = class(PureWVal) public - function Create(_obj: PureWVal); + function create(_obj: PureWVal); function GetObject(); function Convert(); private @@ -265,7 +265,7 @@ end; type ColorUnitDecorator = class(Color) public - function Create(_obj: Color); + function create(_obj: Color); function GetObject(); function Convert(); private @@ -274,7 +274,7 @@ end; type LangUnitDecorator = class(Lang) public - function Create(_obj: Lang); + function create(_obj: Lang); function GetObject(); function Convert(); private @@ -283,7 +283,7 @@ end; type RUnitDecorator = class(R) public - function Create(_obj: R); + function create(_obj: R); function GetObject(); function Convert(); private @@ -292,7 +292,7 @@ end; type CommentReferenceUnitDecorator = class(CommentReference) public - function Create(_obj: CommentReference); + function create(_obj: CommentReference); function GetObject(); function Convert(); private @@ -301,7 +301,7 @@ end; type ObjectUnitDecorator = class(Object) public - function Create(_obj: Object); + function create(_obj: Object); function GetObject(); function Convert(); private @@ -310,7 +310,7 @@ end; type FootnoteReferenceUnitDecorator = class(FootnoteReference) public - function Create(_obj: FootnoteReference); + function create(_obj: FootnoteReference); function GetObject(); function Convert(); private @@ -319,7 +319,7 @@ end; type FldCharUnitDecorator = class(FldChar) public - function Create(_obj: FldChar); + function create(_obj: FldChar); function GetObject(); function Convert(); private @@ -328,7 +328,7 @@ end; type InstrTextUnitDecorator = class(InstrText) public - function Create(_obj: InstrText); + function create(_obj: InstrText); function GetObject(); function Convert(); private @@ -337,7 +337,7 @@ end; type BrUnitDecorator = class(Br) public - function Create(_obj: Br); + function create(_obj: Br); function GetObject(); function Convert(); private @@ -346,7 +346,7 @@ end; type TxbxContentUnitDecorator = class(TxbxContent) public - function Create(_obj: TxbxContent); + function create(_obj: TxbxContent); function GetObject(); function Convert(); private @@ -355,7 +355,7 @@ end; type DrawingUnitDecorator = class(Drawing) public - function Create(_obj: Drawing); + function create(_obj: Drawing); function GetObject(); function Convert(); private @@ -364,7 +364,7 @@ end; type TUnitDecorator = class(T) public - function Create(_obj: T); + function create(_obj: T); function GetObject(); function Convert(); private @@ -373,7 +373,7 @@ end; type TblUnitDecorator = class(Tbl) public - function Create(_obj: Tbl); + function create(_obj: Tbl); function GetObject(); function Convert(); private @@ -382,7 +382,7 @@ end; type TblPrUnitDecorator = class(TblPr) public - function Create(_obj: TblPr); + function create(_obj: TblPr); function GetObject(); function Convert(); private @@ -391,7 +391,7 @@ end; type TblCellSpacingUnitDecorator = class(TblCellSpacing) public - function Create(_obj: TblCellSpacing); + function create(_obj: TblCellSpacing); function GetObject(); function Convert(); private @@ -400,7 +400,7 @@ end; type TblWUnitDecorator = class(TblW) public - function Create(_obj: TblW); + function create(_obj: TblW); function GetObject(); function Convert(); private @@ -409,7 +409,7 @@ end; type TblLayoutUnitDecorator = class(TblLayout) public - function Create(_obj: TblLayout); + function create(_obj: TblLayout); function GetObject(); function Convert(); private @@ -418,7 +418,7 @@ end; type TblLookUnitDecorator = class(TblLook) public - function Create(_obj: TblLook); + function create(_obj: TblLook); function GetObject(); function Convert(); private @@ -427,25 +427,16 @@ end; type TblBordersUnitDecorator = class(TblBorders) public - function Create(_obj: TblBorders); + function create(_obj: TblBorders); function GetObject(); function Convert(); private object_: TblBorders; end; -type TblBorderUnitDecorator = class(TblBorder) -public - function Create(_obj: TblBorder); - function GetObject(); - function Convert(); -private - object_: TblBorder; -end; - type TblGridUnitDecorator = class(TblGrid) public - function Create(_obj: TblGrid); + function create(_obj: TblGrid); function GetObject(); function Convert(); private @@ -454,7 +445,7 @@ end; type GridColUnitDecorator = class(GridCol) public - function Create(_obj: GridCol); + function create(_obj: GridCol); function GetObject(); function Convert(); private @@ -463,16 +454,34 @@ end; type TrUnitDecorator = class(Tr) public - function Create(_obj: Tr); + function create(_obj: Tr); function GetObject(); function Convert(); private object_: Tr; end; +type TblPrExUnitDecorator = class(TblPrEx) +public + function create(_obj: TblPrEx); + function GetObject(); + function Convert(); +private + object_: TblPrEx; +end; + +type TblPrExChangeUnitDecorator = class(TblPrExChange) +public + function create(_obj: TblPrExChange); + function GetObject(); + function Convert(); +private + object_: TblPrExChange; +end; + type TrPrUnitDecorator = class(TrPr) public - function Create(_obj: TrPr); + function create(_obj: TrPr); function GetObject(); function Convert(); private @@ -481,7 +490,7 @@ end; type InsUnitDecorator = class(Ins) public - function Create(_obj: Ins); + function create(_obj: Ins); function GetObject(); function Convert(); private @@ -490,7 +499,7 @@ end; type CnfStyleUnitDecorator = class(CnfStyle) public - function Create(_obj: CnfStyle); + function create(_obj: CnfStyle); function GetObject(); function Convert(); private @@ -499,7 +508,7 @@ end; type TrHeightUnitDecorator = class(TrHeight) public - function Create(_obj: TrHeight); + function create(_obj: TrHeight); function GetObject(); function Convert(); private @@ -508,7 +517,7 @@ end; type TcUnitDecorator = class(Tc) public - function Create(_obj: Tc); + function create(_obj: Tc); function GetObject(); function Convert(); private @@ -517,34 +526,43 @@ end; type TcPrUnitDecorator = class(TcPr) public - function Create(_obj: TcPr); + function create(_obj: TcPr); function GetObject(); function Convert(); private object_: TcPr; end; +type TcMarUnitDecorator = class(TcMar) +public + function create(_obj: TcMar); + function GetObject(); + function Convert(); +private + object_: TcMar; +end; + +type TcMarginUnitDecorator = class(TcMargin) +public + function create(_obj: TcMargin); + function GetObject(); + function Convert(); +private + object_: TcMargin; +end; + type TcBordersUnitDecorator = class(TcBorders) public - function Create(_obj: TcBorders); + function create(_obj: TcBorders); function GetObject(); function Convert(); private object_: TcBorders; end; -type TcBorderUnitDecorator = class(TcBorder) -public - function Create(_obj: TcBorder); - function GetObject(); - function Convert(); -private - object_: TcBorder; -end; - type GridSpanUnitDecorator = class(GridSpan) public - function Create(_obj: GridSpan); + function create(_obj: GridSpan); function GetObject(); function Convert(); private @@ -553,7 +571,7 @@ end; type SdtUnitDecorator = class(Sdt) public - function Create(_obj: Sdt); + function create(_obj: Sdt); function GetObject(); function Convert(); private @@ -562,7 +580,7 @@ end; type SdtPrUnitDecorator = class(SdtPr) public - function Create(_obj: SdtPr); + function create(_obj: SdtPr); function GetObject(); function Convert(); private @@ -571,7 +589,7 @@ end; type DocPartObjUnitDecorator = class(DocPartObj) public - function Create(_obj: DocPartObj); + function create(_obj: DocPartObj); function GetObject(); function Convert(); private @@ -580,7 +598,7 @@ end; type SdtEndPrUnitDecorator = class(SdtEndPr) public - function Create(_obj: SdtEndPr); + function create(_obj: SdtEndPr); function GetObject(); function Convert(); private @@ -589,7 +607,7 @@ end; type SdtContentUnitDecorator = class(SdtContent) public - function Create(_obj: SdtContent); + function create(_obj: SdtContent); function GetObject(); function Convert(); private @@ -598,7 +616,7 @@ end; type SectPrUnitDecorator = class(SectPr) public - function Create(_obj: SectPr); + function create(_obj: SectPr); function GetObject(); function Convert(); private @@ -607,7 +625,7 @@ end; type ReferenceUnitDecorator = class(Reference) public - function Create(_obj: Reference); + function create(_obj: Reference); function GetObject(); function Convert(); private @@ -616,7 +634,7 @@ end; type PgNumTypeUnitDecorator = class(PgNumType) public - function Create(_obj: PgNumType); + function create(_obj: PgNumType); function GetObject(); function Convert(); private @@ -625,7 +643,7 @@ end; type PgSzUnitDecorator = class(PgSz) public - function Create(_obj: PgSz); + function create(_obj: PgSz); function GetObject(); function Convert(); private @@ -634,7 +652,7 @@ end; type PgMarUnitDecorator = class(PgMar) public - function Create(_obj: PgMar); + function create(_obj: PgMar); function GetObject(); function Convert(); private @@ -643,7 +661,7 @@ end; type ColsUnitDecorator = class(Cols) public - function Create(_obj: Cols); + function create(_obj: Cols); function GetObject(); function Convert(); private @@ -652,7 +670,7 @@ end; type ColUnitDecorator = class(Col) public - function Create(_obj: Col); + function create(_obj: Col); function GetObject(); function Convert(); private @@ -661,7 +679,7 @@ end; type DocGridUnitDecorator = class(DocGrid) public - function Create(_obj: DocGrid); + function create(_obj: DocGrid); function GetObject(); function Convert(); private @@ -670,7 +688,7 @@ end; type EndnotesUnitDecorator = class(Endnotes) public - function Create(_obj: Endnotes); + function create(_obj: Endnotes); function GetObject(); function Convert(); private @@ -679,7 +697,7 @@ end; type EndnoteUnitDecorator = class(Endnote) public - function Create(_obj: Endnote); + function create(_obj: Endnote); function GetObject(); function Convert(); private @@ -688,7 +706,7 @@ end; type FootnotesUnitDecorator = class(Footnotes) public - function Create(_obj: Footnotes); + function create(_obj: Footnotes); function GetObject(); function Convert(); private @@ -697,7 +715,7 @@ end; type FootnoteUnitDecorator = class(Footnote) public - function Create(_obj: Footnote); + function create(_obj: Footnote); function GetObject(); function Convert(); private @@ -706,7 +724,7 @@ end; type FontsUnitDecorator = class(Fonts) public - function Create(_obj: Fonts); + function create(_obj: Fonts); function GetObject(); function Convert(); private @@ -715,7 +733,7 @@ end; type FontUnitDecorator = class(Font) public - function Create(_obj: Font); + function create(_obj: Font); function GetObject(); function Convert(); private @@ -724,7 +742,7 @@ end; type SigUnitDecorator = class(Sig) public - function Create(_obj: Sig); + function create(_obj: Sig); function GetObject(); function Convert(); private @@ -733,7 +751,7 @@ end; type SettingsUnitDecorator = class(Settings) public - function Create(_obj: Settings); + function create(_obj: Settings); function GetObject(); function Convert(); private @@ -742,7 +760,7 @@ end; type ZoomUnitDecorator = class(Zoom) public - function Create(_obj: Zoom); + function create(_obj: Zoom); function GetObject(); function Convert(); private @@ -751,7 +769,7 @@ end; type HdrShapeDefaultsUnitDecorator = class(HdrShapeDefaults) public - function Create(_obj: HdrShapeDefaults); + function create(_obj: HdrShapeDefaults); function GetObject(); function Convert(); private @@ -760,7 +778,7 @@ end; type ShapeDefaultsUnitDecorator = class(ShapeDefaults) public - function Create(_obj: ShapeDefaults); + function create(_obj: ShapeDefaults); function GetObject(); function Convert(); private @@ -769,7 +787,7 @@ end; type FootnotePrUnitDecorator = class(FootnotePr) public - function Create(_obj: FootnotePr); + function create(_obj: FootnotePr); function GetObject(); function Convert(); private @@ -778,7 +796,7 @@ end; type EndnotePrUnitDecorator = class(EndnotePr) public - function Create(_obj: EndnotePr); + function create(_obj: EndnotePr); function GetObject(); function Convert(); private @@ -787,7 +805,7 @@ end; type CompatUnitDecorator = class(Compat) public - function Create(_obj: Compat); + function create(_obj: Compat); function GetObject(); function Convert(); private @@ -796,7 +814,7 @@ end; type CompatSettingUnitDecorator = class(CompatSetting) public - function Create(_obj: CompatSetting); + function create(_obj: CompatSetting); function GetObject(); function Convert(); private @@ -805,7 +823,7 @@ end; type RsidsUnitDecorator = class(Rsids) public - function Create(_obj: Rsids); + function create(_obj: Rsids); function GetObject(); function Convert(); private @@ -814,7 +832,7 @@ end; type ThemeFontLangUnitDecorator = class(ThemeFontLang) public - function Create(_obj: ThemeFontLang); + function create(_obj: ThemeFontLang); function GetObject(); function Convert(); private @@ -823,7 +841,7 @@ end; type ClrSchemeMappingUnitDecorator = class(ClrSchemeMapping) public - function Create(_obj: ClrSchemeMapping); + function create(_obj: ClrSchemeMapping); function GetObject(); function Convert(); private @@ -832,7 +850,7 @@ end; type ShapeDefaults2UnitDecorator = class(ShapeDefaults2) public - function Create(_obj: ShapeDefaults2); + function create(_obj: ShapeDefaults2); function GetObject(); function Convert(); private @@ -841,7 +859,7 @@ end; type ShapeLayoutUnitDecorator = class(ShapeLayout) public - function Create(_obj: ShapeLayout); + function create(_obj: ShapeLayout); function GetObject(); function Convert(); private @@ -850,7 +868,7 @@ end; type IdMapUnitDecorator = class(IdMap) public - function Create(_obj: IdMap); + function create(_obj: IdMap); function GetObject(); function Convert(); private @@ -859,7 +877,7 @@ end; type StylesUnitDecorator = class(Styles) public - function Create(_obj: Styles); + function create(_obj: Styles); function GetObject(); function Convert(); private @@ -868,7 +886,7 @@ end; type DocDefaultsUnitDecorator = class(DocDefaults) public - function Create(_obj: DocDefaults); + function create(_obj: DocDefaults); function GetObject(); function Convert(); private @@ -877,7 +895,7 @@ end; type RPrDefaultUnitDecorator = class(RPrDefault) public - function Create(_obj: RPrDefault); + function create(_obj: RPrDefault); function GetObject(); function Convert(); private @@ -886,7 +904,7 @@ end; type PPrDefaultUnitDecorator = class(PPrDefault) public - function Create(_obj: PPrDefault); + function create(_obj: PPrDefault); function GetObject(); function Convert(); private @@ -895,7 +913,7 @@ end; type LatenStylesUnitDecorator = class(LatenStyles) public - function Create(_obj: LatenStyles); + function create(_obj: LatenStyles); function GetObject(); function Convert(); private @@ -904,7 +922,7 @@ end; type LsdExceptionUnitDecorator = class(LsdException) public - function Create(_obj: LsdException); + function create(_obj: LsdException); function GetObject(); function Convert(); private @@ -913,7 +931,7 @@ end; type StyleUnitDecorator = class(Style) public - function Create(_obj: Style); + function create(_obj: Style); function GetObject(); function Convert(); private @@ -922,7 +940,7 @@ end; type TblStylePrUnitDecorator = class(TblStylePr) public - function Create(_obj: TblStylePr); + function create(_obj: TblStylePr); function GetObject(); function Convert(); private @@ -931,7 +949,7 @@ end; type TblIndUnitDecorator = class(TblInd) public - function Create(_obj: TblInd); + function create(_obj: TblInd); function GetObject(); function Convert(); private @@ -940,7 +958,7 @@ end; type TblCellMarUnitDecorator = class(TblCellMar) public - function Create(_obj: TblCellMar); + function create(_obj: TblCellMar); function GetObject(); function Convert(); private @@ -949,7 +967,7 @@ end; type WebSettingsUnitDecorator = class(WebSettings) public - function Create(_obj: WebSettings); + function create(_obj: WebSettings); function GetObject(); function Convert(); private @@ -958,7 +976,7 @@ end; type AlternateContentUnitDecorator = class(AlternateContent) public - function Create(_obj: AlternateContent); + function create(_obj: AlternateContent); function GetObject(); function Convert(); private @@ -967,7 +985,7 @@ end; type ChoiceUnitDecorator = class(Choice) public - function Create(_obj: Choice); + function create(_obj: Choice); function GetObject(); function Convert(); private @@ -976,7 +994,7 @@ end; type FallbackUnitDecorator = class(Fallback) public - function Create(_obj: Fallback); + function create(_obj: Fallback); function GetObject(); function Convert(); private @@ -985,7 +1003,7 @@ end; type PictUnitDecorator = class(Pict) public - function Create(_obj: Pict); + function create(_obj: Pict); function GetObject(); function Convert(); private @@ -994,7 +1012,7 @@ end; type ControlUnitDecorator = class(Control) public - function Create(_obj: Control); + function create(_obj: Control); function GetObject(); function Convert(); private @@ -1003,7 +1021,7 @@ end; type FtrUnitDecorator = class(Ftr) public - function Create(_obj: Ftr); + function create(_obj: Ftr); function GetObject(); function Convert(); private @@ -1012,7 +1030,7 @@ end; type HdrUnitDecorator = class(Hdr) public - function Create(_obj: Hdr); + function create(_obj: Hdr); function GetObject(); function Convert(); private @@ -1021,7 +1039,7 @@ end; type CommentsUnitDecorator = class(Comments) public - function Create(_obj: Comments); + function create(_obj: Comments); function GetObject(); function Convert(); private @@ -1030,7 +1048,7 @@ end; type CommentUnitDecorator = class(Comment) public - function Create(_obj: Comment); + function create(_obj: Comment); function GetObject(); function Convert(); private @@ -1039,7 +1057,7 @@ end; type NumberingUnitDecorator = class(Numbering) public - function Create(_obj: Numbering); + function create(_obj: Numbering); function GetObject(); function Convert(); private @@ -1048,7 +1066,7 @@ end; type NumUnitDecorator = class(Num) public - function Create(_obj: Num); + function create(_obj: Num); function GetObject(); function Convert(); private @@ -1057,7 +1075,7 @@ end; type AbstractNumUnitDecorator = class(AbstractNum) public - function Create(_obj: AbstractNum); + function create(_obj: AbstractNum); function GetObject(); function Convert(); private @@ -1066,7 +1084,7 @@ end; type LvlUnitDecorator = class(Lvl) public - function Create(_obj: Lvl); + function create(_obj: Lvl); function GetObject(); function Convert(); private @@ -1075,9 +1093,9 @@ end; implementation -function PropertiesUnitDecorator.Create(_obj: Properties); +function PropertiesUnitDecorator.create(_obj: Properties); begin - class(Properties).Create(); + class(Properties).create(); object_ := _obj; {self.}Convert(); end; @@ -1110,9 +1128,9 @@ begin tslassigning := tslassigning_backup; end; -function DocumentUnitDecorator.Create(_obj: Document); +function DocumentUnitDecorator.create(_obj: Document); begin - class(Document).Create(); + class(Document).create(); object_ := _obj; {self.}Convert(); end; @@ -1133,9 +1151,9 @@ begin tslassigning := tslassigning_backup; end; -function BodyUnitDecorator.Create(_obj: Body); +function BodyUnitDecorator.create(_obj: Body); begin - class(Body).Create(); + class(Body).create(); object_ := _obj; {self.}Convert(); end; @@ -1163,9 +1181,9 @@ begin tslassigning := tslassigning_backup; end; -function PUnitDecorator.Create(_obj: P); +function PUnitDecorator.create(_obj: P); begin - class(P).Create(); + class(P).create(); object_ := _obj; {self.}Convert(); end; @@ -1228,9 +1246,9 @@ begin tslassigning := tslassigning_backup; end; -function FldSimpleUnitDecorator.Create(_obj: FldSimple); +function FldSimpleUnitDecorator.create(_obj: FldSimple); begin - class(FldSimple).Create(); + class(FldSimple).create(); object_ := _obj; {self.}Convert(); end; @@ -1256,9 +1274,9 @@ begin tslassigning := tslassigning_backup; end; -function CommentRangeUnitDecorator.Create(_obj: CommentRange); +function CommentRangeUnitDecorator.create(_obj: CommentRange); begin - class(CommentRange).Create(); + class(CommentRange).create(); object_ := _obj; {self.}Convert(); end; @@ -1277,9 +1295,9 @@ begin tslassigning := tslassigning_backup; end; -function HyperLinkUnitDecorator.Create(_obj: HyperLink); +function HyperLinkUnitDecorator.create(_obj: HyperLink); begin - class(HyperLink).Create(); + class(HyperLink).create(); object_ := _obj; {self.}Convert(); end; @@ -1305,9 +1323,9 @@ begin tslassigning := tslassigning_backup; end; -function BookmarkUnitDecorator.Create(_obj: Bookmark); +function BookmarkUnitDecorator.create(_obj: Bookmark); begin - class(Bookmark).Create(); + class(Bookmark).create(); object_ := _obj; {self.}Convert(); end; @@ -1328,9 +1346,9 @@ begin tslassigning := tslassigning_backup; end; -function PPrUnitDecorator.Create(_obj: PPr); +function PPrUnitDecorator.create(_obj: PPr); begin - class(PPr).Create(); + class(PPr).create(); object_ := _obj; {self.}Convert(); end; @@ -1369,7 +1387,7 @@ begin if not ifnil(object_.XmlChildMirrorIndents) then {self.}MirrorIndents.Copy(object_.XmlChildMirrorIndents); if not ifnil(object_.XmlChildKinsoku) then - {self.}XmlChildKinsoku := new PureWValUnitDecorator(object_.XmlChildKinsoku); + {self.}Kinsoku.Copy(object_.XmlChildKinsoku); if not ifnil(object_.XmlChildPageBreakBefore) then {self.}PageBreakBefore.Copy(object_.XmlChildPageBreakBefore); if not ifnil(object_.XmlChildSuppressAutoHyphens) then @@ -1379,7 +1397,7 @@ begin if not ifnil(object_.XmlChildSuppressOverlap) then {self.}SuppressOverlap.Copy(object_.XmlChildSuppressOverlap); if not ifnil(object_.XmlChildOverflowPunct) then - {self.}XmlChildOverflowPunct := new PureWValUnitDecorator(object_.XmlChildOverflowPunct); + {self.}OverflowPunct.Copy(object_.XmlChildOverflowPunct); if not ifnil(object_.XmlChildAdjustRightInd) then {self.}XmlChildAdjustRightInd := new PureWValUnitDecorator(object_.XmlChildAdjustRightInd); if not ifnil(object_.XmlChildSpacing) then @@ -1387,9 +1405,9 @@ begin if not ifnil(object_.XmlChildOutlineLvl) then {self.}XmlChildOutlineLvl := new PureWValUnitDecorator(object_.XmlChildOutlineLvl); if not ifnil(object_.XmlChildAutoSpaceDE) then - {self.}XmlChildAutoSpaceDE := new PureWValUnitDecorator(object_.XmlChildAutoSpaceDE); + {self.}AutoSpaceDE.Copy(object_.XmlChildAutoSpaceDE); if not ifnil(object_.XmlChildAutoSpaceDN) then - {self.}XmlChildAutoSpaceDN := new PureWValUnitDecorator(object_.XmlChildAutoSpaceDN); + {self.}AutoSpaceDN.Copy(object_.XmlChildAutoSpaceDN); if not ifnil(object_.XmlChildRPr) then {self.}XmlChildRPr := new RPrUnitDecorator(object_.XmlChildRPr); if not ifnil(object_.XmlChildPBdr) then @@ -1399,7 +1417,7 @@ begin if not ifnil(object_.XmlChildShd) then {self.}XmlChildShd := new ShdUnitDecorator(object_.XmlChildShd); if not ifnil(object_.XmlChildWordWrap) then - {self.}XmlChildWordWrap := new PureWValUnitDecorator(object_.XmlChildWordWrap); + {self.}WordWrap.Copy(object_.XmlChildWordWrap); if not ifnil(object_.XmlChildDivId) then {self.}XmlChildDivId := new PureWValUnitDecorator(object_.XmlChildDivId); if not ifnil(object_.XmlChildCnfStyle) then @@ -1409,7 +1427,7 @@ begin if not ifnil(object_.XmlChildTextboxTightWrap) then {self.}XmlChildTextboxTightWrap := new PureWValUnitDecorator(object_.XmlChildTextboxTightWrap); if not ifnil(object_.XmlChildTopLinePunct) then - {self.}XmlChildTopLinePunct := new PureWValUnitDecorator(object_.XmlChildTopLinePunct); + {self.}TopLinePunct.Copy(object_.XmlChildTopLinePunct); if not ifnil(object_.XmlChildTextAlignment) then {self.}XmlChildTextAlignment := new PureWValUnitDecorator(object_.XmlChildTextAlignment); if not ifnil(object_.XmlChildTextDirection) then @@ -1419,9 +1437,9 @@ begin tslassigning := tslassigning_backup; end; -function PBdrUnitDecorator.Create(_obj: PBdr); +function PBdrUnitDecorator.create(_obj: PBdr); begin - class(PBdr).Create(); + class(PBdr).create(); object_ := _obj; {self.}Convert(); end; @@ -1435,22 +1453,24 @@ function PBdrUnitDecorator.Convert(); begin tslassigning_backup := tslassigning; tslassigning := 1; + if not ifnil(object_.XmlChildBar) then + {self.}XmlChildBar := new BdrUnitDecorator(object_.XmlChildBar); if not ifnil(object_.XmlChildTop) then - {self.}XmlChildTop := new PBorderUnitDecorator(object_.XmlChildTop); + {self.}XmlChildTop := new BdrUnitDecorator(object_.XmlChildTop); if not ifnil(object_.XmlChildLeft) then - {self.}XmlChildLeft := new PBorderUnitDecorator(object_.XmlChildLeft); + {self.}XmlChildLeft := new BdrUnitDecorator(object_.XmlChildLeft); if not ifnil(object_.XmlChildRight) then - {self.}XmlChildRight := new PBorderUnitDecorator(object_.XmlChildRight); + {self.}XmlChildRight := new BdrUnitDecorator(object_.XmlChildRight); if not ifnil(object_.XmlChildBottom) then - {self.}XmlChildBottom := new PBorderUnitDecorator(object_.XmlChildBottom); + {self.}XmlChildBottom := new BdrUnitDecorator(object_.XmlChildBottom); if not ifnil(object_.XmlChildBetween) then - {self.}XmlChildBetween := new PBorderUnitDecorator(object_.XmlChildBetween); + {self.}XmlChildBetween := new BdrUnitDecorator(object_.XmlChildBetween); tslassigning := tslassigning_backup; end; -function FramePrUnitDecorator.Create(_obj: FramePr); +function FramePrUnitDecorator.create(_obj: FramePr); begin - class(FramePr).Create(); + class(FramePr).create(); object_ := _obj; {self.}Convert(); end; @@ -1499,46 +1519,9 @@ begin tslassigning := tslassigning_backup; end; -function PBorderUnitDecorator.Create(_obj: PBorder); +function TabsUnitDecorator.create(_obj: Tabs); begin - class(PBorder).Create(); - object_ := _obj; - {self.}Convert(); -end; - -function PBorderUnitDecorator.GetObject(); -begin - return object_; -end; - -function PBorderUnitDecorator.Convert(); -begin - tslassigning_backup := tslassigning; - tslassigning := 1; - if not ifnil(object_.XmlAttrVal) then - {self.}Val := object_.XmlAttrVal.Value; - if not ifnil(object_.XmlAttrColor) then - {self.}Color := object_.XmlAttrColor.Value; - if not ifnil(object_.XmlAttrSpace) then - {self.}Space := object_.XmlAttrSpace.Value; - if not ifnil(object_.XmlAttrFrame) then - {self.}Frame := object_.XmlAttrFrame.Value; - if not ifnil(object_.XmlAttrShadow) then - {self.}Shadow := object_.XmlAttrShadow.Value; - if not ifnil(object_.XmlAttrThemeColor) then - {self.}ThemeColor := object_.XmlAttrThemeColor.Value; - if not ifnil(object_.XmlAttrThemeShade) then - {self.}ThemeShade := object_.XmlAttrThemeShade.Value; - if not ifnil(object_.XmlAttrThemeTint) then - {self.}ThemeTint := object_.XmlAttrThemeTint.Value; - if not ifnil(object_.XmlAttrSz) then - {self.}Sz := TSSafeUnitConverter.HalfPointToPoints(object_.XmlAttrSz.Value); - tslassigning := tslassigning_backup; -end; - -function TabsUnitDecorator.Create(_obj: Tabs); -begin - class(Tabs).Create(); + class(Tabs).create(); object_ := _obj; {self.}Convert(); end; @@ -1558,9 +1541,9 @@ begin tslassigning := tslassigning_backup; end; -function TabUnitDecorator.Create(_obj: Tab); +function TabUnitDecorator.create(_obj: Tab); begin - class(Tab).Create(); + class(Tab).create(); object_ := _obj; {self.}Convert(); end; @@ -1583,9 +1566,9 @@ begin tslassigning := tslassigning_backup; end; -function NumPrUnitDecorator.Create(_obj: NumPr); +function NumPrUnitDecorator.create(_obj: NumPr); begin - class(NumPr).Create(); + class(NumPr).create(); object_ := _obj; {self.}Convert(); end; @@ -1606,9 +1589,9 @@ begin tslassigning := tslassigning_backup; end; -function IndUnitDecorator.Create(_obj: Ind); +function IndUnitDecorator.create(_obj: Ind); begin - class(Ind).Create(); + class(Ind).create(); object_ := _obj; {self.}Convert(); end; @@ -1641,9 +1624,9 @@ begin tslassigning := tslassigning_backup; end; -function SpacingUnitDecorator.Create(_obj: Spacing); +function SpacingUnitDecorator.create(_obj: Spacing); begin - class(Spacing).Create(); + class(Spacing).create(); object_ := _obj; {self.}Convert(); end; @@ -1676,9 +1659,9 @@ begin tslassigning := tslassigning_backup; end; -function RPrUnitDecorator.Create(_obj: RPr); +function RPrUnitDecorator.create(_obj: RPr); begin - class(RPr).Create(); + class(RPr).create(); object_ := _obj; {self.}Convert(); end; @@ -1693,11 +1676,11 @@ begin tslassigning_backup := tslassigning; tslassigning := 1; if not ifnil(object_.XmlChildNoProof) then - {self.}XmlChildNoProof := new PureValUnitDecorator(object_.XmlChildNoProof); + {self.}XmlChildNoProof := new PureWValUnitDecorator(object_.XmlChildNoProof); if not ifnil(object_.XmlChildOutline) then - {self.}XmlChildOutline := new PureValUnitDecorator(object_.XmlChildOutline); + {self.}Outline.Copy(object_.XmlChildOutline); if not ifnil(object_.XmlChildPosition) then - {self.}XmlChildPosition := new PureValUnitDecorator(object_.XmlChildPosition); + {self.}XmlChildPosition := new PureWValUnitDecorator(object_.XmlChildPosition); if not ifnil(object_.XmlChildWebHidden) then {self.}XmlChildWebHidden := new PureWValUnitDecorator(object_.XmlChildWebHidden); if not ifnil(object_.XmlChildRStyle) then @@ -1708,6 +1691,8 @@ begin {self.}XmlChildRFonts := new RFontsUnitDecorator(object_.XmlChildRFonts); if not ifnil(object_.XmlChildKern) then {self.}XmlChildKern := new PureWValUnitDecorator(object_.XmlChildKern); + if not ifnil(object_.XmlChildSpacing) then + {self.}XmlChildSpacing := new PureWValUnitDecorator(object_.XmlChildSpacing); if not ifnil(object_.XmlChildI) then {self.}I.Copy(object_.XmlChildI); if not ifnil(object_.XmlChildICs) then @@ -1719,19 +1704,21 @@ begin if not ifnil(object_.XmlChildBdr) then {self.}XmlChildBdr := new BdrUnitDecorator(object_.XmlChildBdr); if not ifnil(object_.XmlChildCaps) then - {self.}XmlChildCaps := new PureWValUnitDecorator(object_.XmlChildCaps); + {self.}Caps.Copy(object_.XmlChildCaps); if not ifnil(object_.XmlChildDel) then {self.}XmlChildDel := new DelUnitDecorator(object_.XmlChildDel); if not ifnil(object_.XmlChildStrike) then {self.}Strike.Copy(object_.XmlChildStrike); if not ifnil(object_.XmlChildDStrike) then - {self.}XmlChildDStrike := new PureWValUnitDecorator(object_.XmlChildDStrike); + {self.}DStrike.Copy(object_.XmlChildDStrike); if not ifnil(object_.XmlChildEffect) then {self.}XmlChildEffect := new PureWValUnitDecorator(object_.XmlChildEffect); if not ifnil(object_.XmlChildEm) then {self.}XmlChildEm := new PureWValUnitDecorator(object_.XmlChildEm); if not ifnil(object_.XmlChildEmboss) then - {self.}XmlChildEmboss := new PureWValUnitDecorator(object_.XmlChildEmboss); + {self.}Emboss.Copy(object_.XmlChildEmboss); + if not ifnil(object_.XmlChildImprint) then + {self.}Imprint.Copy(object_.XmlChildImprint); if not ifnil(object_.XmlChildFitText) then {self.}XmlChildFitText := new FitTextUnitDecorator(object_.XmlChildFitText); if not ifnil(object_.XmlChildHighlight) then @@ -1747,15 +1734,11 @@ begin if not ifnil(object_.XmlChildSzCs) then {self.}XmlChildSzCs := new SzCsUnitDecorator(object_.XmlChildSzCs); if not ifnil(object_.XmlChildU) then - {self.}U.Copy(object_.XmlChildU); + {self.}XmlChildU := new UUnitDecorator(object_.XmlChildU); if not ifnil(object_.XmlChildLang) then {self.}XmlChildLang := new LangUnitDecorator(object_.XmlChildLang); - if not ifnil(object_.XmlChildImprint) then - {self.}XmlChildImprint := new PureWValUnitDecorator(object_.XmlChildImprint); if not ifnil(object_.XmlChildVertAlign) then {self.}XmlChildVertAlign := new PureWValUnitDecorator(object_.XmlChildVertAlign); - if not ifnil(object_.XmlChildLigatures) then - {self.}XmlChildLigatures := new PureWValUnitDecorator(object_.XmlChildLigatures); if not ifnil(object_.XmlChildRtl) then {self.}XmlChildRtl := new PureWValUnitDecorator(object_.XmlChildRtl); if not ifnil(object_.XmlChildOMath) then @@ -1769,15 +1752,48 @@ begin if not ifnil(object_.XmlChildShd) then {self.}XmlChildShd := new ShdUnitDecorator(object_.XmlChildShd); if not ifnil(object_.XmlChildSmallCaps) then - {self.}XmlChildSmallCaps := new PureWValUnitDecorator(object_.XmlChildSmallCaps); + {self.}SmallCaps.Copy(object_.XmlChildSmallCaps); if not ifnil(object_.XmlChildW) then {self.}XmlChildW := new PureWValUnitDecorator(object_.XmlChildW); + if not ifnil(object_.XmlChildSnapToGrid) then + {self.}SnapToGrid.Copy(object_.XmlChildSnapToGrid); + if not ifnil(object_.XmlChildLigatures) then + {self.}XmlChildLigatures := new PureWValUnitDecorator(object_.XmlChildLigatures); + if not ifnil(object_.XmlChildCntxtAlts) then + {self.}CntxtAlts.Copy(object_.XmlChildCntxtAlts); + if not ifnil(object_.XmlChildNumForm) then + {self.}XmlChildNumForm := new PureWValUnitDecorator(object_.XmlChildNumForm); + if not ifnil(object_.XmlChildNumSpacing) then + {self.}XmlChildNumSpacing := new PureWValUnitDecorator(object_.XmlChildNumSpacing); tslassigning := tslassigning_backup; end; -function ShdUnitDecorator.Create(_obj: Shd); +function UUnitDecorator.create(_obj: U); begin - class(Shd).Create(); + class(U).create(); + object_ := _obj; + {self.}Convert(); +end; + +function UUnitDecorator.GetObject(); +begin + return object_; +end; + +function UUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + if not ifnil(object_.XmlAttrVal) then + {self.}Val := object_.XmlAttrVal.Value; + if not ifnil(object_.XmlAttrColor) then + {self.}Color := object_.XmlAttrColor.Value; + tslassigning := tslassigning_backup; +end; + +function ShdUnitDecorator.create(_obj: Shd); +begin + class(Shd).create(); object_ := _obj; {self.}Convert(); end; @@ -1812,9 +1828,9 @@ begin tslassigning := tslassigning_backup; end; -function HighlightUnitDecorator.Create(_obj: Highlight); +function HighlightUnitDecorator.create(_obj: Highlight); begin - class(Highlight).Create(); + class(Highlight).create(); object_ := _obj; {self.}Convert(); end; @@ -1833,9 +1849,9 @@ begin tslassigning := tslassigning_backup; end; -function FitTextUnitDecorator.Create(_obj: FitText); +function FitTextUnitDecorator.create(_obj: FitText); begin - class(FitText).Create(); + class(FitText).create(); object_ := _obj; {self.}Convert(); end; @@ -1856,9 +1872,9 @@ begin tslassigning := tslassigning_backup; end; -function EastAsianLayoutUnitDecorator.Create(_obj: EastAsianLayout); +function EastAsianLayoutUnitDecorator.create(_obj: EastAsianLayout); begin - class(EastAsianLayout).Create(); + class(EastAsianLayout).create(); object_ := _obj; {self.}Convert(); end; @@ -1885,9 +1901,9 @@ begin tslassigning := tslassigning_backup; end; -function DelUnitDecorator.Create(_obj: Del); +function DelUnitDecorator.create(_obj: Del); begin - class(Del).Create(); + class(Del).create(); object_ := _obj; {self.}Convert(); end; @@ -1922,9 +1938,9 @@ begin tslassigning := tslassigning_backup; end; -function BdrUnitDecorator.Create(_obj: Bdr); +function BdrUnitDecorator.create(_obj: Bdr); begin - class(Bdr).Create(); + class(Bdr).create(); object_ := _obj; {self.}Convert(); end; @@ -1941,7 +1957,7 @@ begin if not ifnil(object_.XmlAttrVal) then {self.}Val := object_.XmlAttrVal.Value; if not ifnil(object_.XmlAttrSz) then - {self.}Sz := object_.XmlAttrSz.Value; + {self.}Sz := TSSafeUnitConverter.EighthPointToPoints(object_.XmlAttrSz.Value); if not ifnil(object_.XmlAttrSpace) then {self.}Space := object_.XmlAttrSpace.Value; if not ifnil(object_.XmlAttrColor) then @@ -1959,9 +1975,9 @@ begin tslassigning := tslassigning_backup; end; -function RFontsUnitDecorator.Create(_obj: RFonts); +function RFontsUnitDecorator.create(_obj: RFonts); begin - class(RFonts).Create(); + class(RFonts).create(); object_ := _obj; {self.}Convert(); end; @@ -1996,9 +2012,9 @@ begin tslassigning := tslassigning_backup; end; -function SzCsUnitDecorator.Create(_obj: SzCs); +function SzCsUnitDecorator.create(_obj: SzCs); begin - class(SzCs).Create(); + class(SzCs).create(); object_ := _obj; {self.}Convert(); end; @@ -2013,13 +2029,13 @@ begin tslassigning_backup := tslassigning; tslassigning := 1; if not ifnil(object_.XmlAttrVal) then - {self.}Val := TSSafeUnitConverter.HalfPointToPoints(object_.XmlAttrVal.Value); + {self.}Val := TSSafeUnitConverter.HalfPointsToPoints(object_.XmlAttrVal.Value); tslassigning := tslassigning_backup; end; -function SzUnitDecorator.Create(_obj: Sz); +function SzUnitDecorator.create(_obj: Sz); begin - class(Sz).Create(); + class(Sz).create(); object_ := _obj; {self.}Convert(); end; @@ -2034,13 +2050,13 @@ begin tslassigning_backup := tslassigning; tslassigning := 1; if not ifnil(object_.XmlAttrVal) then - {self.}Val := TSSafeUnitConverter.HalfPointToPoints(object_.XmlAttrVal.Value); + {self.}Val := TSSafeUnitConverter.HalfPointsToPoints(object_.XmlAttrVal.Value); tslassigning := tslassigning_backup; end; -function PureValUnitDecorator.Create(_obj: PureVal); +function PureValUnitDecorator.create(_obj: PureVal); begin - class(PureVal).Create(); + class(PureVal).create(); object_ := _obj; {self.}Convert(); end; @@ -2059,9 +2075,9 @@ begin tslassigning := tslassigning_backup; end; -function PureWValUnitDecorator.Create(_obj: PureWVal); +function PureWValUnitDecorator.create(_obj: PureWVal); begin - class(PureWVal).Create(); + class(PureWVal).create(); object_ := _obj; {self.}Convert(); end; @@ -2080,9 +2096,9 @@ begin tslassigning := tslassigning_backup; end; -function ColorUnitDecorator.Create(_obj: Color); +function ColorUnitDecorator.create(_obj: Color); begin - class(Color).Create(); + class(Color).create(); object_ := _obj; {self.}Convert(); end; @@ -2103,9 +2119,9 @@ begin tslassigning := tslassigning_backup; end; -function LangUnitDecorator.Create(_obj: Lang); +function LangUnitDecorator.create(_obj: Lang); begin - class(Lang).Create(); + class(Lang).create(); object_ := _obj; {self.}Convert(); end; @@ -2128,9 +2144,9 @@ begin tslassigning := tslassigning_backup; end; -function RUnitDecorator.Create(_obj: R); +function RUnitDecorator.create(_obj: R); begin - class(R).Create(); + class(R).create(); object_ := _obj; {self.}Convert(); end; @@ -2186,9 +2202,9 @@ begin tslassigning := tslassigning_backup; end; -function CommentReferenceUnitDecorator.Create(_obj: CommentReference); +function CommentReferenceUnitDecorator.create(_obj: CommentReference); begin - class(CommentReference).Create(); + class(CommentReference).create(); object_ := _obj; {self.}Convert(); end; @@ -2207,9 +2223,9 @@ begin tslassigning := tslassigning_backup; end; -function ObjectUnitDecorator.Create(_obj: Object); +function ObjectUnitDecorator.create(_obj: Object); begin - class(Object).Create(); + class(Object).create(); object_ := _obj; {self.}Convert(); end; @@ -2238,9 +2254,9 @@ begin tslassigning := tslassigning_backup; end; -function FootnoteReferenceUnitDecorator.Create(_obj: FootnoteReference); +function FootnoteReferenceUnitDecorator.create(_obj: FootnoteReference); begin - class(FootnoteReference).Create(); + class(FootnoteReference).create(); object_ := _obj; {self.}Convert(); end; @@ -2259,9 +2275,9 @@ begin tslassigning := tslassigning_backup; end; -function FldCharUnitDecorator.Create(_obj: FldChar); +function FldCharUnitDecorator.create(_obj: FldChar); begin - class(FldChar).Create(); + class(FldChar).create(); object_ := _obj; {self.}Convert(); end; @@ -2284,9 +2300,9 @@ begin tslassigning := tslassigning_backup; end; -function InstrTextUnitDecorator.Create(_obj: InstrText); +function InstrTextUnitDecorator.create(_obj: InstrText); begin - class(InstrText).Create(); + class(InstrText).create(); object_ := _obj; {self.}Convert(); end; @@ -2305,9 +2321,9 @@ begin tslassigning := tslassigning_backup; end; -function BrUnitDecorator.Create(_obj: Br); +function BrUnitDecorator.create(_obj: Br); begin - class(Br).Create(); + class(Br).create(); object_ := _obj; {self.}Convert(); end; @@ -2326,9 +2342,9 @@ begin tslassigning := tslassigning_backup; end; -function TxbxContentUnitDecorator.Create(_obj: TxbxContent); +function TxbxContentUnitDecorator.create(_obj: TxbxContent); begin - class(TxbxContent).Create(); + class(TxbxContent).create(); object_ := _obj; {self.}Convert(); end; @@ -2348,9 +2364,9 @@ begin tslassigning := tslassigning_backup; end; -function DrawingUnitDecorator.Create(_obj: Drawing); +function DrawingUnitDecorator.create(_obj: Drawing); begin - class(Drawing).Create(); + class(Drawing).create(); object_ := _obj; {self.}Convert(); end; @@ -2371,9 +2387,9 @@ begin tslassigning := tslassigning_backup; end; -function TUnitDecorator.Create(_obj: T); +function TUnitDecorator.create(_obj: T); begin - class(T).Create(); + class(T).create(); object_ := _obj; {self.}Convert(); end; @@ -2392,9 +2408,9 @@ begin tslassigning := tslassigning_backup; end; -function TblUnitDecorator.Create(_obj: Tbl); +function TblUnitDecorator.create(_obj: Tbl); begin - class(Tbl).Create(); + class(Tbl).create(); object_ := _obj; {self.}Convert(); end; @@ -2421,9 +2437,9 @@ begin tslassigning := tslassigning_backup; end; -function TblPrUnitDecorator.Create(_obj: TblPr); +function TblPrUnitDecorator.create(_obj: TblPr); begin - class(TblPr).Create(); + class(TblPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2443,10 +2459,12 @@ begin {self.}XmlChildShd := new ShdUnitDecorator(object_.XmlChildShd); if not ifnil(object_.XmlChildTblStyle) then {self.}XmlChildTblStyle := new PureWValUnitDecorator(object_.XmlChildTblStyle); + if not ifnil(object_.XmlChildBidiVisual) then + {self.}BidiVisual.Copy(object_.XmlChildBidiVisual); if not ifnil(object_.XmlChildTblW) then {self.}XmlChildTblW := new TblWUnitDecorator(object_.XmlChildTblW); if not ifnil(object_.XmlChildTblInd) then - {self.}XmlChildTblInd := new TblWUnitDecorator(object_.XmlChildTblInd); + {self.}XmlChildTblInd := new TblIndUnitDecorator(object_.XmlChildTblInd); if not ifnil(object_.XmlChildTblLayout) then {self.}XmlChildTblLayout := new TblLayoutUnitDecorator(object_.XmlChildTblLayout); if not ifnil(object_.XmlChildTblLook) then @@ -2468,9 +2486,9 @@ begin tslassigning := tslassigning_backup; end; -function TblCellSpacingUnitDecorator.Create(_obj: TblCellSpacing); +function TblCellSpacingUnitDecorator.create(_obj: TblCellSpacing); begin - class(TblCellSpacing).Create(); + class(TblCellSpacing).create(); object_ := _obj; {self.}Convert(); end; @@ -2491,9 +2509,9 @@ begin tslassigning := tslassigning_backup; end; -function TblWUnitDecorator.Create(_obj: TblW); +function TblWUnitDecorator.create(_obj: TblW); begin - class(TblW).Create(); + class(TblW).create(); object_ := _obj; {self.}Convert(); end; @@ -2514,9 +2532,9 @@ begin tslassigning := tslassigning_backup; end; -function TblLayoutUnitDecorator.Create(_obj: TblLayout); +function TblLayoutUnitDecorator.create(_obj: TblLayout); begin - class(TblLayout).Create(); + class(TblLayout).create(); object_ := _obj; {self.}Convert(); end; @@ -2535,9 +2553,9 @@ begin tslassigning := tslassigning_backup; end; -function TblLookUnitDecorator.Create(_obj: TblLook); +function TblLookUnitDecorator.create(_obj: TblLook); begin - class(TblLook).Create(); + class(TblLook).create(); object_ := _obj; {self.}Convert(); end; @@ -2568,9 +2586,9 @@ begin tslassigning := tslassigning_backup; end; -function TblBordersUnitDecorator.Create(_obj: TblBorders); +function TblBordersUnitDecorator.create(_obj: TblBorders); begin - class(TblBorders).Create(); + class(TblBorders).create(); object_ := _obj; {self.}Convert(); end; @@ -2585,54 +2603,23 @@ begin tslassigning_backup := tslassigning; tslassigning := 1; if not ifnil(object_.XmlChildTop) then - {self.}XmlChildTop := new TblBorderUnitDecorator(object_.XmlChildTop); + {self.}XmlChildTop := new BdrUnitDecorator(object_.XmlChildTop); if not ifnil(object_.XmlChildLeft) then - {self.}XmlChildLeft := new TblBorderUnitDecorator(object_.XmlChildLeft); + {self.}XmlChildLeft := new BdrUnitDecorator(object_.XmlChildLeft); if not ifnil(object_.XmlChildBottom) then - {self.}XmlChildBottom := new TblBorderUnitDecorator(object_.XmlChildBottom); + {self.}XmlChildBottom := new BdrUnitDecorator(object_.XmlChildBottom); if not ifnil(object_.XmlChildRight) then - {self.}XmlChildRight := new TblBorderUnitDecorator(object_.XmlChildRight); + {self.}XmlChildRight := new BdrUnitDecorator(object_.XmlChildRight); if not ifnil(object_.XmlChildInsideH) then - {self.}XmlChildInsideH := new TblBorderUnitDecorator(object_.XmlChildInsideH); + {self.}XmlChildInsideH := new BdrUnitDecorator(object_.XmlChildInsideH); if not ifnil(object_.XmlChildInsideV) then - {self.}XmlChildInsideV := new TblBorderUnitDecorator(object_.XmlChildInsideV); + {self.}XmlChildInsideV := new BdrUnitDecorator(object_.XmlChildInsideV); tslassigning := tslassigning_backup; end; -function TblBorderUnitDecorator.Create(_obj: TblBorder); +function TblGridUnitDecorator.create(_obj: TblGrid); begin - class(TblBorder).Create(); - object_ := _obj; - {self.}Convert(); -end; - -function TblBorderUnitDecorator.GetObject(); -begin - return object_; -end; - -function TblBorderUnitDecorator.Convert(); -begin - tslassigning_backup := tslassigning; - tslassigning := 1; - if not ifnil(object_.XmlAttrVal) then - {self.}Val := object_.XmlAttrVal.Value; - if not ifnil(object_.XmlAttrColor) then - {self.}Color := object_.XmlAttrColor.Value; - if not ifnil(object_.XmlAttrSpace) then - {self.}Space := object_.XmlAttrSpace.Value; - if not ifnil(object_.XmlAttrThemeColor) then - {self.}ThemeColor := object_.XmlAttrThemeColor.Value; - if not ifnil(object_.XmlAttrThemeTint) then - {self.}ThemeTint := object_.XmlAttrThemeTint.Value; - if not ifnil(object_.XmlAttrSz) then - {self.}Sz := TSSafeUnitConverter.EighthPointToPoints(object_.XmlAttrSz.Value); - tslassigning := tslassigning_backup; -end; - -function TblGridUnitDecorator.Create(_obj: TblGrid); -begin - class(TblGrid).Create(); + class(TblGrid).create(); object_ := _obj; {self.}Convert(); end; @@ -2652,9 +2639,9 @@ begin tslassigning := tslassigning_backup; end; -function GridColUnitDecorator.Create(_obj: GridCol); +function GridColUnitDecorator.create(_obj: GridCol); begin - class(GridCol).Create(); + class(GridCol).create(); object_ := _obj; {self.}Convert(); end; @@ -2673,9 +2660,9 @@ begin tslassigning := tslassigning_backup; end; -function TrUnitDecorator.Create(_obj: Tr); +function TrUnitDecorator.create(_obj: Tr); begin - class(Tr).Create(); + class(Tr).create(); object_ := _obj; {self.}Convert(); end; @@ -2697,6 +2684,8 @@ begin {self.}TextId := object_.XmlAttrTextId.Value; if not ifnil(object_.XmlAttrRsidTr) then {self.}RsidTr := object_.XmlAttrRsidTr.Value; + if not ifnil(object_.XmlChildTblPrEx) then + {self.}XmlChildTblPrEx := new TblPrExUnitDecorator(object_.XmlChildTblPrEx); if not ifnil(object_.XmlChildTrPr) then {self.}XmlChildTrPr := new TrPrUnitDecorator(object_.XmlChildTrPr); elems := object_.Sdts(); @@ -2708,9 +2697,75 @@ begin tslassigning := tslassigning_backup; end; -function TrPrUnitDecorator.Create(_obj: TrPr); +function TblPrExUnitDecorator.create(_obj: TblPrEx); begin - class(TrPr).Create(); + class(TblPrEx).create(); + object_ := _obj; + {self.}Convert(); +end; + +function TblPrExUnitDecorator.GetObject(); +begin + return object_; +end; + +function TblPrExUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + if not ifnil(object_.XmlChildJc) then + {self.}XmlChildJc := new PureWValUnitDecorator(object_.XmlChildJc); + if not ifnil(object_.XmlChildShd) then + {self.}XmlChildShd := new ShdUnitDecorator(object_.XmlChildShd); + if not ifnil(object_.XmlChildTblBorders) then + {self.}XmlChildTblBorders := new TblBordersUnitDecorator(object_.XmlChildTblBorders); + if not ifnil(object_.XmlChildTblCellMar) then + {self.}XmlChildTblCellMar := new TblCellMarUnitDecorator(object_.XmlChildTblCellMar); + if not ifnil(object_.XmlChildTblCellSpacing) then + {self.}XmlChildTblCellSpacing := new TblCellSpacingUnitDecorator(object_.XmlChildTblCellSpacing); + if not ifnil(object_.XmlChildTblInd) then + {self.}XmlChildTblInd := new TblIndUnitDecorator(object_.XmlChildTblInd); + if not ifnil(object_.XmlChildTblLayout) then + {self.}XmlChildTblLayout := new TblLayoutUnitDecorator(object_.XmlChildTblLayout); + if not ifnil(object_.XmlChildTblLook) then + {self.}XmlChildTblLook := new TblLookUnitDecorator(object_.XmlChildTblLook); + if not ifnil(object_.XmlChildTblW) then + {self.}XmlChildTblW := new TblWUnitDecorator(object_.XmlChildTblW); + if not ifnil(object_.XmlChildTblPrExChange) then + {self.}XmlChildTblPrExChange := new TblPrExChangeUnitDecorator(object_.XmlChildTblPrExChange); + tslassigning := tslassigning_backup; +end; + +function TblPrExChangeUnitDecorator.create(_obj: TblPrExChange); +begin + class(TblPrExChange).create(); + object_ := _obj; + {self.}Convert(); +end; + +function TblPrExChangeUnitDecorator.GetObject(); +begin + return object_; +end; + +function TblPrExChangeUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + if not ifnil(object_.XmlAttrAuthor) then + {self.}Author := object_.XmlAttrAuthor.Value; + if not ifnil(object_.XmlAttrDate) then + {self.}Date := object_.XmlAttrDate.Value; + if not ifnil(object_.XmlAttrId) then + {self.}Id := object_.XmlAttrId.Value; + if not ifnil(object_.XmlChildTblPrEx) then + {self.}XmlChildTblPrEx := new TblPrExUnitDecorator(object_.XmlChildTblPrEx); + tslassigning := tslassigning_backup; +end; + +function TrPrUnitDecorator.create(_obj: TrPr); +begin + class(TrPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2741,9 +2796,9 @@ begin tslassigning := tslassigning_backup; end; -function InsUnitDecorator.Create(_obj: Ins); +function InsUnitDecorator.create(_obj: Ins); begin - class(Ins).Create(); + class(Ins).create(); object_ := _obj; {self.}Convert(); end; @@ -2771,9 +2826,9 @@ begin tslassigning := tslassigning_backup; end; -function CnfStyleUnitDecorator.Create(_obj: CnfStyle); +function CnfStyleUnitDecorator.create(_obj: CnfStyle); begin - class(CnfStyle).Create(); + class(CnfStyle).create(); object_ := _obj; {self.}Convert(); end; @@ -2816,9 +2871,9 @@ begin tslassigning := tslassigning_backup; end; -function TrHeightUnitDecorator.Create(_obj: TrHeight); +function TrHeightUnitDecorator.create(_obj: TrHeight); begin - class(TrHeight).Create(); + class(TrHeight).create(); object_ := _obj; {self.}Convert(); end; @@ -2834,14 +2889,14 @@ begin tslassigning := 1; if not ifnil(object_.XmlAttrHRule) then {self.}HRule := object_.XmlAttrHRule.Value; - if not ifnil(object_.XmlAttrval) then - {self.}val := TSSafeUnitConverter.TwipsToPoints(object_.XmlAttrval.Value); + if not ifnil(object_.XmlAttrVal) then + {self.}Val := TSSafeUnitConverter.TwipsToPoints(object_.XmlAttrVal.Value); tslassigning := tslassigning_backup; end; -function TcUnitDecorator.Create(_obj: Tc); +function TcUnitDecorator.create(_obj: Tc); begin - class(Tc).Create(); + class(Tc).create(); object_ := _obj; {self.}Convert(); end; @@ -2866,9 +2921,9 @@ begin tslassigning := tslassigning_backup; end; -function TcPrUnitDecorator.Create(_obj: TcPr); +function TcPrUnitDecorator.create(_obj: TcPr); begin - class(TcPr).Create(); + class(TcPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2890,20 +2945,76 @@ begin {self.}VMerge.Copy(object_.XmlChildVMerge); if not ifnil(object_.XmlChildVAlign) then {self.}XmlChildVAlign := new PureWValUnitDecorator(object_.XmlChildVAlign); + if not ifnil(object_.XmlChildNoWrap) then + {self.}NoWrap.Copy(object_.XmlChildNoWrap); if not ifnil(object_.XmlChildHideMark) then {self.}HideMark.Copy(object_.XmlChildHideMark); if not ifnil(object_.XmlChildShd) then {self.}XmlChildShd := new ShdUnitDecorator(object_.XmlChildShd); + if not ifnil(object_.XmlChildTcMar) then + {self.}XmlChildTcMar := new TcMarUnitDecorator(object_.XmlChildTcMar); if not ifnil(object_.XmlChildTcBorders) then {self.}XmlChildTcBorders := new TcBordersUnitDecorator(object_.XmlChildTcBorders); if not ifnil(object_.XmlChildTextDirection) then {self.}XmlChildTextDirection := new PureWValUnitDecorator(object_.XmlChildTextDirection); + if not ifnil(object_.XmlChildTcFitText) then + {self.}TcFitText.Copy(object_.XmlChildTcFitText); tslassigning := tslassigning_backup; end; -function TcBordersUnitDecorator.Create(_obj: TcBorders); +function TcMarUnitDecorator.create(_obj: TcMar); begin - class(TcBorders).Create(); + class(TcMar).create(); + object_ := _obj; + {self.}Convert(); +end; + +function TcMarUnitDecorator.GetObject(); +begin + return object_; +end; + +function TcMarUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + if not ifnil(object_.XmlChildTop) then + {self.}XmlChildTop := new TcMarginUnitDecorator(object_.XmlChildTop); + if not ifnil(object_.XmlChildLeft) then + {self.}XmlChildLeft := new TcMarginUnitDecorator(object_.XmlChildLeft); + if not ifnil(object_.XmlChildBottom) then + {self.}XmlChildBottom := new TcMarginUnitDecorator(object_.XmlChildBottom); + if not ifnil(object_.XmlChildRight) then + {self.}XmlChildRight := new TcMarginUnitDecorator(object_.XmlChildRight); + tslassigning := tslassigning_backup; +end; + +function TcMarginUnitDecorator.create(_obj: TcMargin); +begin + class(TcMargin).create(); + object_ := _obj; + {self.}Convert(); +end; + +function TcMarginUnitDecorator.GetObject(); +begin + return object_; +end; + +function TcMarginUnitDecorator.Convert(); +begin + tslassigning_backup := tslassigning; + tslassigning := 1; + if not ifnil(object_.XmlAttrW) then + {self.}W := TSSafeUnitConverter.TwipsToPoints(object_.XmlAttrW.Value); + if not ifnil(object_.XmlAttrType) then + {self.}Type := object_.XmlAttrType.Value; + tslassigning := tslassigning_backup; +end; + +function TcBordersUnitDecorator.create(_obj: TcBorders); +begin + class(TcBorders).create(); object_ := _obj; {self.}Convert(); end; @@ -2918,58 +3029,27 @@ begin tslassigning_backup := tslassigning; tslassigning := 1; if not ifnil(object_.XmlChildTop) then - {self.}XmlChildTop := new TcBorderUnitDecorator(object_.XmlChildTop); + {self.}XmlChildTop := new BdrUnitDecorator(object_.XmlChildTop); if not ifnil(object_.XmlChildLeft) then - {self.}XmlChildLeft := new TcBorderUnitDecorator(object_.XmlChildLeft); + {self.}XmlChildLeft := new BdrUnitDecorator(object_.XmlChildLeft); if not ifnil(object_.XmlChildBottom) then - {self.}XmlChildBottom := new TcBorderUnitDecorator(object_.XmlChildBottom); + {self.}XmlChildBottom := new BdrUnitDecorator(object_.XmlChildBottom); if not ifnil(object_.XmlChildRight) then - {self.}XmlChildRight := new TcBorderUnitDecorator(object_.XmlChildRight); + {self.}XmlChildRight := new BdrUnitDecorator(object_.XmlChildRight); if not ifnil(object_.XmlChildTl2Br) then - {self.}XmlChildTl2Br := new TcBorderUnitDecorator(object_.XmlChildTl2Br); + {self.}XmlChildTl2Br := new BdrUnitDecorator(object_.XmlChildTl2Br); if not ifnil(object_.XmlChildTr2Bl) then - {self.}XmlChildTr2Bl := new TcBorderUnitDecorator(object_.XmlChildTr2Bl); + {self.}XmlChildTr2Bl := new BdrUnitDecorator(object_.XmlChildTr2Bl); if not ifnil(object_.XmlChildInsideH) then - {self.}XmlChildInsideH := new TcBorderUnitDecorator(object_.XmlChildInsideH); + {self.}XmlChildInsideH := new BdrUnitDecorator(object_.XmlChildInsideH); if not ifnil(object_.XmlChildInsideV) then - {self.}XmlChildInsideV := new TcBorderUnitDecorator(object_.XmlChildInsideV); + {self.}XmlChildInsideV := new BdrUnitDecorator(object_.XmlChildInsideV); tslassigning := tslassigning_backup; end; -function TcBorderUnitDecorator.Create(_obj: TcBorder); +function GridSpanUnitDecorator.create(_obj: GridSpan); begin - class(TcBorder).Create(); - object_ := _obj; - {self.}Convert(); -end; - -function TcBorderUnitDecorator.GetObject(); -begin - return object_; -end; - -function TcBorderUnitDecorator.Convert(); -begin - tslassigning_backup := tslassigning; - tslassigning := 1; - if not ifnil(object_.XmlAttrVal) then - {self.}Val := object_.XmlAttrVal.Value; - if not ifnil(object_.XmlAttrColor) then - {self.}Color := object_.XmlAttrColor.Value; - if not ifnil(object_.XmlAttrSpace) then - {self.}Space := object_.XmlAttrSpace.Value; - if not ifnil(object_.XmlAttrThemeColor) then - {self.}ThemeColor := object_.XmlAttrThemeColor.Value; - if not ifnil(object_.XmlAttrThemeTint) then - {self.}ThemeTint := object_.XmlAttrThemeTint.Value; - if not ifnil(object_.XmlAttrSz) then - {self.}Sz := TSSafeUnitConverter.EighthPointToPoints(object_.XmlAttrSz.Value); - tslassigning := tslassigning_backup; -end; - -function GridSpanUnitDecorator.Create(_obj: GridSpan); -begin - class(GridSpan).Create(); + class(GridSpan).create(); object_ := _obj; {self.}Convert(); end; @@ -2988,9 +3068,9 @@ begin tslassigning := tslassigning_backup; end; -function SdtUnitDecorator.Create(_obj: Sdt); +function SdtUnitDecorator.create(_obj: Sdt); begin - class(Sdt).Create(); + class(Sdt).create(); object_ := _obj; {self.}Convert(); end; @@ -3013,9 +3093,9 @@ begin tslassigning := tslassigning_backup; end; -function SdtPrUnitDecorator.Create(_obj: SdtPr); +function SdtPrUnitDecorator.create(_obj: SdtPr); begin - class(SdtPr).Create(); + class(SdtPr).create(); object_ := _obj; {self.}Convert(); end; @@ -3038,9 +3118,9 @@ begin tslassigning := tslassigning_backup; end; -function DocPartObjUnitDecorator.Create(_obj: DocPartObj); +function DocPartObjUnitDecorator.create(_obj: DocPartObj); begin - class(DocPartObj).Create(); + class(DocPartObj).create(); object_ := _obj; {self.}Convert(); end; @@ -3057,13 +3137,13 @@ begin if not ifnil(object_.XmlChildDocPartGallery) then {self.}XmlChildDocPartGallery := new PureWValUnitDecorator(object_.XmlChildDocPartGallery); if not ifnil(object_.XmlChildDocPartUnique) then - {self.}XmlChildDocPartUnique := new PureValUnitDecorator(object_.XmlChildDocPartUnique); + {self.}XmlChildDocPartUnique := new PureWValUnitDecorator(object_.XmlChildDocPartUnique); tslassigning := tslassigning_backup; end; -function SdtEndPrUnitDecorator.Create(_obj: SdtEndPr); +function SdtEndPrUnitDecorator.create(_obj: SdtEndPr); begin - class(SdtEndPr).Create(); + class(SdtEndPr).create(); object_ := _obj; {self.}Convert(); end; @@ -3082,9 +3162,9 @@ begin tslassigning := tslassigning_backup; end; -function SdtContentUnitDecorator.Create(_obj: SdtContent); +function SdtContentUnitDecorator.create(_obj: SdtContent); begin - class(SdtContent).Create(); + class(SdtContent).create(); object_ := _obj; {self.}Convert(); end; @@ -3109,9 +3189,9 @@ begin tslassigning := tslassigning_backup; end; -function SectPrUnitDecorator.Create(_obj: SectPr); +function SectPrUnitDecorator.create(_obj: SectPr); begin - class(SectPr).Create(); + class(SectPr).create(); object_ := _obj; {self.}Convert(); end; @@ -3158,9 +3238,9 @@ begin tslassigning := tslassigning_backup; end; -function ReferenceUnitDecorator.Create(_obj: Reference); +function ReferenceUnitDecorator.create(_obj: Reference); begin - class(Reference).Create(); + class(Reference).create(); object_ := _obj; {self.}Convert(); end; @@ -3181,9 +3261,9 @@ begin tslassigning := tslassigning_backup; end; -function PgNumTypeUnitDecorator.Create(_obj: PgNumType); +function PgNumTypeUnitDecorator.create(_obj: PgNumType); begin - class(PgNumType).Create(); + class(PgNumType).create(); object_ := _obj; {self.}Convert(); end; @@ -3202,9 +3282,9 @@ begin tslassigning := tslassigning_backup; end; -function PgSzUnitDecorator.Create(_obj: PgSz); +function PgSzUnitDecorator.create(_obj: PgSz); begin - class(PgSz).Create(); + class(PgSz).create(); object_ := _obj; {self.}Convert(); end; @@ -3229,9 +3309,9 @@ begin tslassigning := tslassigning_backup; end; -function PgMarUnitDecorator.Create(_obj: PgMar); +function PgMarUnitDecorator.create(_obj: PgMar); begin - class(PgMar).Create(); + class(PgMar).create(); object_ := _obj; {self.}Convert(); end; @@ -3262,9 +3342,9 @@ begin tslassigning := tslassigning_backup; end; -function ColsUnitDecorator.Create(_obj: Cols); +function ColsUnitDecorator.create(_obj: Cols); begin - class(Cols).Create(); + class(Cols).create(); object_ := _obj; {self.}Convert(); end; @@ -3290,9 +3370,9 @@ begin tslassigning := tslassigning_backup; end; -function ColUnitDecorator.Create(_obj: Col); +function ColUnitDecorator.create(_obj: Col); begin - class(Col).Create(); + class(Col).create(); object_ := _obj; {self.}Convert(); end; @@ -3313,9 +3393,9 @@ begin tslassigning := tslassigning_backup; end; -function DocGridUnitDecorator.Create(_obj: DocGrid); +function DocGridUnitDecorator.create(_obj: DocGrid); begin - class(DocGrid).Create(); + class(DocGrid).create(); object_ := _obj; {self.}Convert(); end; @@ -3336,9 +3416,9 @@ begin tslassigning := tslassigning_backup; end; -function EndnotesUnitDecorator.Create(_obj: Endnotes); +function EndnotesUnitDecorator.create(_obj: Endnotes); begin - class(Endnotes).Create(); + class(Endnotes).create(); object_ := _obj; {self.}Convert(); end; @@ -3360,9 +3440,9 @@ begin tslassigning := tslassigning_backup; end; -function EndnoteUnitDecorator.Create(_obj: Endnote); +function EndnoteUnitDecorator.create(_obj: Endnote); begin - class(Endnote).Create(); + class(Endnote).create(); object_ := _obj; {self.}Convert(); end; @@ -3386,9 +3466,9 @@ begin tslassigning := tslassigning_backup; end; -function FootnotesUnitDecorator.Create(_obj: Footnotes); +function FootnotesUnitDecorator.create(_obj: Footnotes); begin - class(Footnotes).Create(); + class(Footnotes).create(); object_ := _obj; {self.}Convert(); end; @@ -3410,9 +3490,9 @@ begin tslassigning := tslassigning_backup; end; -function FootnoteUnitDecorator.Create(_obj: Footnote); +function FootnoteUnitDecorator.create(_obj: Footnote); begin - class(Footnote).Create(); + class(Footnote).create(); object_ := _obj; {self.}Convert(); end; @@ -3436,9 +3516,9 @@ begin tslassigning := tslassigning_backup; end; -function FontsUnitDecorator.Create(_obj: Fonts); +function FontsUnitDecorator.create(_obj: Fonts); begin - class(Fonts).Create(); + class(Fonts).create(); object_ := _obj; {self.}Convert(); end; @@ -3460,9 +3540,9 @@ begin tslassigning := tslassigning_backup; end; -function FontUnitDecorator.Create(_obj: Font); +function FontUnitDecorator.create(_obj: Font); begin - class(Font).Create(); + class(Font).create(); object_ := _obj; {self.}Convert(); end; @@ -3493,9 +3573,9 @@ begin tslassigning := tslassigning_backup; end; -function SigUnitDecorator.Create(_obj: Sig); +function SigUnitDecorator.create(_obj: Sig); begin - class(Sig).Create(); + class(Sig).create(); object_ := _obj; {self.}Convert(); end; @@ -3524,9 +3604,9 @@ begin tslassigning := tslassigning_backup; end; -function SettingsUnitDecorator.Create(_obj: Settings); +function SettingsUnitDecorator.create(_obj: Settings); begin - class(Settings).Create(); + class(Settings).create(); object_ := _obj; {self.}Convert(); end; @@ -3556,6 +3636,48 @@ begin {self.}Sig := object_.XmlAttrSig.Value; if not ifnil(object_.XmlAttrSig) then {self.}Sig := object_.XmlAttrSig.Value; + if not ifnil(object_.XmlChildZoom) then + {self.}XmlChildZoom := new ZoomUnitDecorator(object_.XmlChildZoom); + if not ifnil(object_.XmlChildBordersDoNotSurroundHeader) then + {self.}BordersDoNotSurroundHeader.Copy(object_.XmlChildBordersDoNotSurroundHeader); + if not ifnil(object_.XmlChildBordersDoNotSurroundFooter) then + {self.}BordersDoNotSurroundFooter.Copy(object_.XmlChildBordersDoNotSurroundFooter); + if not ifnil(object_.XmlChildDefaultTabStop) then + {self.}XmlChildDefaultTabStop := new PureWValUnitDecorator(object_.XmlChildDefaultTabStop); + if not ifnil(object_.XmlChildEvenAndOddHeaders) then + {self.}EvenAndOddHeaders.Copy(object_.XmlChildEvenAndOddHeaders); + if not ifnil(object_.XmlChildDrawingGridVerticalSpacing) then + {self.}XmlChildDrawingGridVerticalSpacing := new PureWValUnitDecorator(object_.XmlChildDrawingGridVerticalSpacing); + if not ifnil(object_.XmlChildDisplayHorizontalDrawingGridEvery) then + {self.}XmlChildDisplayHorizontalDrawingGridEvery := new PureWValUnitDecorator(object_.XmlChildDisplayHorizontalDrawingGridEvery); + if not ifnil(object_.XmlChildDisplayVerticalDrawingGridEvery) then + {self.}XmlChildDisplayVerticalDrawingGridEvery := new PureWValUnitDecorator(object_.XmlChildDisplayVerticalDrawingGridEvery); + if not ifnil(object_.XmlChildCharacterSpacingControl) then + {self.}XmlChildCharacterSpacingControl := new PureWValUnitDecorator(object_.XmlChildCharacterSpacingControl); + if not ifnil(object_.XmlChildHdrShapeDefaults) then + {self.}XmlChildHdrShapeDefaults := new HdrShapeDefaultsUnitDecorator(object_.XmlChildHdrShapeDefaults); + if not ifnil(object_.XmlChildFootnotePr) then + {self.}XmlChildFootnotePr := new FootnotePrUnitDecorator(object_.XmlChildFootnotePr); + if not ifnil(object_.XmlChildEndnotePr) then + {self.}XmlChildEndnotePr := new EndnotePrUnitDecorator(object_.XmlChildEndnotePr); + if not ifnil(object_.XmlChildCompat) then + {self.}XmlChildCompat := new CompatUnitDecorator(object_.XmlChildCompat); + if not ifnil(object_.XmlChildRsids) then + {self.}XmlChildRsids := new RsidsUnitDecorator(object_.XmlChildRsids); + if not ifnil(object_.XmlChildMathPr) then + {self.}XmlChildMathPr := new MathPrUnitDecorator(object_.XmlChildMathPr); + if not ifnil(object_.XmlChildThemeFontLang) then + {self.}XmlChildThemeFontLang := new ThemeFontLangUnitDecorator(object_.XmlChildThemeFontLang); + if not ifnil(object_.XmlChildClrSchemeMapping) then + {self.}XmlChildClrSchemeMapping := new ClrSchemeMappingUnitDecorator(object_.XmlChildClrSchemeMapping); + if not ifnil(object_.XmlChildDoNotIncludeSubdocsInStats) then + {self.}DoNotIncludeSubdocsInStats.Copy(object_.XmlChildDoNotIncludeSubdocsInStats); + if not ifnil(object_.XmlChildShapeDefaults) then + {self.}XmlChildShapeDefaults := new ShapeDefaults2UnitDecorator(object_.XmlChildShapeDefaults); + if not ifnil(object_.XmlChildDecimalSymbol) then + {self.}XmlChildDecimalSymbol := new PureWValUnitDecorator(object_.XmlChildDecimalSymbol); + if not ifnil(object_.XmlChildListSeparator) then + {self.}XmlChildListSeparator := new PureWValUnitDecorator(object_.XmlChildListSeparator); if not ifnil(object_.XmlChildDocId) then {self.}XmlChildDocId := new PureWValUnitDecorator(object_.XmlChildDocId); if not ifnil(object_.XmlChildDocId) then @@ -3567,9 +3689,9 @@ begin tslassigning := tslassigning_backup; end; -function ZoomUnitDecorator.Create(_obj: Zoom); +function ZoomUnitDecorator.create(_obj: Zoom); begin - class(Zoom).Create(); + class(Zoom).create(); object_ := _obj; {self.}Convert(); end; @@ -3588,9 +3710,9 @@ begin tslassigning := tslassigning_backup; end; -function HdrShapeDefaultsUnitDecorator.Create(_obj: HdrShapeDefaults); +function HdrShapeDefaultsUnitDecorator.create(_obj: HdrShapeDefaults); begin - class(HdrShapeDefaults).Create(); + class(HdrShapeDefaults).create(); object_ := _obj; {self.}Convert(); end; @@ -3609,9 +3731,9 @@ begin tslassigning := tslassigning_backup; end; -function ShapeDefaultsUnitDecorator.Create(_obj: ShapeDefaults); +function ShapeDefaultsUnitDecorator.create(_obj: ShapeDefaults); begin - class(ShapeDefaults).Create(); + class(ShapeDefaults).create(); object_ := _obj; {self.}Convert(); end; @@ -3632,9 +3754,9 @@ begin tslassigning := tslassigning_backup; end; -function FootnotePrUnitDecorator.Create(_obj: FootnotePr); +function FootnotePrUnitDecorator.create(_obj: FootnotePr); begin - class(FootnotePr).Create(); + class(FootnotePr).create(); object_ := _obj; {self.}Convert(); end; @@ -3662,9 +3784,9 @@ begin tslassigning := tslassigning_backup; end; -function EndnotePrUnitDecorator.Create(_obj: EndnotePr); +function EndnotePrUnitDecorator.create(_obj: EndnotePr); begin - class(EndnotePr).Create(); + class(EndnotePr).create(); object_ := _obj; {self.}Convert(); end; @@ -3692,9 +3814,9 @@ begin tslassigning := tslassigning_backup; end; -function CompatUnitDecorator.Create(_obj: Compat); +function CompatUnitDecorator.create(_obj: Compat); begin - class(Compat).Create(); + class(Compat).create(); object_ := _obj; {self.}Convert(); end; @@ -3728,9 +3850,9 @@ begin tslassigning := tslassigning_backup; end; -function CompatSettingUnitDecorator.Create(_obj: CompatSetting); +function CompatSettingUnitDecorator.create(_obj: CompatSetting); begin - class(CompatSetting).Create(); + class(CompatSetting).create(); object_ := _obj; {self.}Convert(); end; @@ -3753,9 +3875,9 @@ begin tslassigning := tslassigning_backup; end; -function RsidsUnitDecorator.Create(_obj: Rsids); +function RsidsUnitDecorator.create(_obj: Rsids); begin - class(Rsids).Create(); + class(Rsids).create(); object_ := _obj; {self.}Convert(); end; @@ -3777,9 +3899,9 @@ begin tslassigning := tslassigning_backup; end; -function ThemeFontLangUnitDecorator.Create(_obj: ThemeFontLang); +function ThemeFontLangUnitDecorator.create(_obj: ThemeFontLang); begin - class(ThemeFontLang).Create(); + class(ThemeFontLang).create(); object_ := _obj; {self.}Convert(); end; @@ -3800,9 +3922,9 @@ begin tslassigning := tslassigning_backup; end; -function ClrSchemeMappingUnitDecorator.Create(_obj: ClrSchemeMapping); +function ClrSchemeMappingUnitDecorator.create(_obj: ClrSchemeMapping); begin - class(ClrSchemeMapping).Create(); + class(ClrSchemeMapping).create(); object_ := _obj; {self.}Convert(); end; @@ -3843,9 +3965,9 @@ begin tslassigning := tslassigning_backup; end; -function ShapeDefaults2UnitDecorator.Create(_obj: ShapeDefaults2); +function ShapeDefaults2UnitDecorator.create(_obj: ShapeDefaults2); begin - class(ShapeDefaults2).Create(); + class(ShapeDefaults2).create(); object_ := _obj; {self.}Convert(); end; @@ -3866,9 +3988,9 @@ begin tslassigning := tslassigning_backup; end; -function ShapeLayoutUnitDecorator.Create(_obj: ShapeLayout); +function ShapeLayoutUnitDecorator.create(_obj: ShapeLayout); begin - class(ShapeLayout).Create(); + class(ShapeLayout).create(); object_ := _obj; {self.}Convert(); end; @@ -3889,9 +4011,9 @@ begin tslassigning := tslassigning_backup; end; -function IdMapUnitDecorator.Create(_obj: IdMap); +function IdMapUnitDecorator.create(_obj: IdMap); begin - class(IdMap).Create(); + class(IdMap).create(); object_ := _obj; {self.}Convert(); end; @@ -3912,9 +4034,9 @@ begin tslassigning := tslassigning_backup; end; -function StylesUnitDecorator.Create(_obj: Styles); +function StylesUnitDecorator.create(_obj: Styles); begin - class(Styles).Create(); + class(Styles).create(); object_ := _obj; {self.}Convert(); end; @@ -3940,9 +4062,9 @@ begin tslassigning := tslassigning_backup; end; -function DocDefaultsUnitDecorator.Create(_obj: DocDefaults); +function DocDefaultsUnitDecorator.create(_obj: DocDefaults); begin - class(DocDefaults).Create(); + class(DocDefaults).create(); object_ := _obj; {self.}Convert(); end; @@ -3963,9 +4085,9 @@ begin tslassigning := tslassigning_backup; end; -function RPrDefaultUnitDecorator.Create(_obj: RPrDefault); +function RPrDefaultUnitDecorator.create(_obj: RPrDefault); begin - class(RPrDefault).Create(); + class(RPrDefault).create(); object_ := _obj; {self.}Convert(); end; @@ -3984,9 +4106,9 @@ begin tslassigning := tslassigning_backup; end; -function PPrDefaultUnitDecorator.Create(_obj: PPrDefault); +function PPrDefaultUnitDecorator.create(_obj: PPrDefault); begin - class(PPrDefault).Create(); + class(PPrDefault).create(); object_ := _obj; {self.}Convert(); end; @@ -4005,9 +4127,9 @@ begin tslassigning := tslassigning_backup; end; -function LatenStylesUnitDecorator.Create(_obj: LatenStyles); +function LatenStylesUnitDecorator.create(_obj: LatenStyles); begin - class(LatenStyles).Create(); + class(LatenStyles).create(); object_ := _obj; {self.}Convert(); end; @@ -4039,9 +4161,9 @@ begin tslassigning := tslassigning_backup; end; -function LsdExceptionUnitDecorator.Create(_obj: LsdException); +function LsdExceptionUnitDecorator.create(_obj: LsdException); begin - class(LsdException).Create(); + class(LsdException).create(); object_ := _obj; {self.}Convert(); end; @@ -4068,9 +4190,9 @@ begin tslassigning := tslassigning_backup; end; -function StyleUnitDecorator.Create(_obj: Style); +function StyleUnitDecorator.create(_obj: Style); begin - class(Style).Create(); + class(Style).create(); object_ := _obj; {self.}Convert(); end; @@ -4126,9 +4248,9 @@ begin tslassigning := tslassigning_backup; end; -function TblStylePrUnitDecorator.Create(_obj: TblStylePr); +function TblStylePrUnitDecorator.create(_obj: TblStylePr); begin - class(TblStylePr).Create(); + class(TblStylePr).create(); object_ := _obj; {self.}Convert(); end; @@ -4157,9 +4279,9 @@ begin tslassigning := tslassigning_backup; end; -function TblIndUnitDecorator.Create(_obj: TblInd); +function TblIndUnitDecorator.create(_obj: TblInd); begin - class(TblInd).Create(); + class(TblInd).create(); object_ := _obj; {self.}Convert(); end; @@ -4180,9 +4302,9 @@ begin tslassigning := tslassigning_backup; end; -function TblCellMarUnitDecorator.Create(_obj: TblCellMar); +function TblCellMarUnitDecorator.create(_obj: TblCellMar); begin - class(TblCellMar).Create(); + class(TblCellMar).create(); object_ := _obj; {self.}Convert(); end; @@ -4207,9 +4329,9 @@ begin tslassigning := tslassigning_backup; end; -function WebSettingsUnitDecorator.Create(_obj: WebSettings); +function WebSettingsUnitDecorator.create(_obj: WebSettings); begin - class(WebSettings).Create(); + class(WebSettings).create(); object_ := _obj; {self.}Convert(); end; @@ -4232,9 +4354,9 @@ begin tslassigning := tslassigning_backup; end; -function AlternateContentUnitDecorator.Create(_obj: AlternateContent); +function AlternateContentUnitDecorator.create(_obj: AlternateContent); begin - class(AlternateContent).Create(); + class(AlternateContent).create(); object_ := _obj; {self.}Convert(); end; @@ -4255,9 +4377,9 @@ begin tslassigning := tslassigning_backup; end; -function ChoiceUnitDecorator.Create(_obj: Choice); +function ChoiceUnitDecorator.create(_obj: Choice); begin - class(Choice).Create(); + class(Choice).create(); object_ := _obj; {self.}Convert(); end; @@ -4280,9 +4402,9 @@ begin tslassigning := tslassigning_backup; end; -function FallbackUnitDecorator.Create(_obj: Fallback); +function FallbackUnitDecorator.create(_obj: Fallback); begin - class(Fallback).Create(); + class(Fallback).create(); object_ := _obj; {self.}Convert(); end; @@ -4303,9 +4425,9 @@ begin tslassigning := tslassigning_backup; end; -function PictUnitDecorator.Create(_obj: Pict); +function PictUnitDecorator.create(_obj: Pict); begin - class(Pict).Create(); + class(Pict).create(); object_ := _obj; {self.}Convert(); end; @@ -4328,9 +4450,9 @@ begin tslassigning := tslassigning_backup; end; -function ControlUnitDecorator.Create(_obj: Control); +function ControlUnitDecorator.create(_obj: Control); begin - class(Control).Create(); + class(Control).create(); object_ := _obj; {self.}Convert(); end; @@ -4353,9 +4475,9 @@ begin tslassigning := tslassigning_backup; end; -function FtrUnitDecorator.Create(_obj: Ftr); +function FtrUnitDecorator.create(_obj: Ftr); begin - class(Ftr).Create(); + class(Ftr).create(); object_ := _obj; {self.}Convert(); end; @@ -4379,9 +4501,9 @@ begin tslassigning := tslassigning_backup; end; -function HdrUnitDecorator.Create(_obj: Hdr); +function HdrUnitDecorator.create(_obj: Hdr); begin - class(Hdr).Create(); + class(Hdr).create(); object_ := _obj; {self.}Convert(); end; @@ -4405,9 +4527,9 @@ begin tslassigning := tslassigning_backup; end; -function CommentsUnitDecorator.Create(_obj: Comments); +function CommentsUnitDecorator.create(_obj: Comments); begin - class(Comments).Create(); + class(Comments).create(); object_ := _obj; {self.}Convert(); end; @@ -4429,9 +4551,9 @@ begin tslassigning := tslassigning_backup; end; -function CommentUnitDecorator.Create(_obj: Comment); +function CommentUnitDecorator.create(_obj: Comment); begin - class(Comment).Create(); + class(Comment).create(); object_ := _obj; {self.}Convert(); end; @@ -4457,9 +4579,9 @@ begin tslassigning := tslassigning_backup; end; -function NumberingUnitDecorator.Create(_obj: Numbering); +function NumberingUnitDecorator.create(_obj: Numbering); begin - class(Numbering).Create(); + class(Numbering).create(); object_ := _obj; {self.}Convert(); end; @@ -4484,9 +4606,9 @@ begin tslassigning := tslassigning_backup; end; -function NumUnitDecorator.Create(_obj: Num); +function NumUnitDecorator.create(_obj: Num); begin - class(Num).Create(); + class(Num).create(); object_ := _obj; {self.}Convert(); end; @@ -4507,9 +4629,9 @@ begin tslassigning := tslassigning_backup; end; -function AbstractNumUnitDecorator.Create(_obj: AbstractNum); +function AbstractNumUnitDecorator.create(_obj: AbstractNum); begin - class(AbstractNum).Create(); + class(AbstractNum).create(); object_ := _obj; {self.}Convert(); end; @@ -4539,9 +4661,9 @@ begin tslassigning := tslassigning_backup; end; -function LvlUnitDecorator.Create(_obj: Lvl); +function LvlUnitDecorator.create(_obj: Lvl); begin - class(Lvl).Create(); + class(Lvl).create(); object_ := _obj; {self.}Convert(); end; diff --git a/autounit/DrawingMLUnitDecorator.tsf b/autounit/DrawingMLUnitDecorator.tsf index c497667..734f890 100644 --- a/autounit/DrawingMLUnitDecorator.tsf +++ b/autounit/DrawingMLUnitDecorator.tsf @@ -4,7 +4,7 @@ uses DrawingML, TSSafeUnitConverter; type ThemeUnitDecorator = class(Theme) public - function Create(_obj: Theme); + function create(_obj: Theme); function GetObject(); function Convert(); private @@ -13,7 +13,7 @@ end; type ThemeElementsUnitDecorator = class(ThemeElements) public - function Create(_obj: ThemeElements); + function create(_obj: ThemeElements); function GetObject(); function Convert(); private @@ -22,7 +22,7 @@ end; type ClrSchemeUnitDecorator = class(ClrScheme) public - function Create(_obj: ClrScheme); + function create(_obj: ClrScheme); function GetObject(); function Convert(); private @@ -31,7 +31,7 @@ end; type Clr1UnitDecorator = class(Clr1) public - function Create(_obj: Clr1); + function create(_obj: Clr1); function GetObject(); function Convert(); private @@ -40,7 +40,7 @@ end; type SysClrUnitDecorator = class(SysClr) public - function Create(_obj: SysClr); + function create(_obj: SysClr); function GetObject(); function Convert(); private @@ -49,7 +49,7 @@ end; type Clr2UnitDecorator = class(Clr2) public - function Create(_obj: Clr2); + function create(_obj: Clr2); function GetObject(); function Convert(); private @@ -58,7 +58,7 @@ end; type SrgbClrUnitDecorator = class(SrgbClr) public - function Create(_obj: SrgbClr); + function create(_obj: SrgbClr); function GetObject(); function Convert(); private @@ -67,7 +67,7 @@ end; type PureValUnitDecorator = class(PureVal) public - function Create(_obj: PureVal); + function create(_obj: PureVal); function GetObject(); function Convert(); private @@ -76,7 +76,7 @@ end; type FontSchemeUnitDecorator = class(FontScheme) public - function Create(_obj: FontScheme); + function create(_obj: FontScheme); function GetObject(); function Convert(); private @@ -85,7 +85,7 @@ end; type MFontUnitDecorator = class(MFont) public - function Create(_obj: MFont); + function create(_obj: MFont); function GetObject(); function Convert(); private @@ -94,7 +94,7 @@ end; type FontUnitDecorator = class(Font) public - function Create(_obj: Font); + function create(_obj: Font); function GetObject(); function Convert(); private @@ -103,7 +103,7 @@ end; type FmtSchemeUnitDecorator = class(FmtScheme) public - function Create(_obj: FmtScheme); + function create(_obj: FmtScheme); function GetObject(); function Convert(); private @@ -112,7 +112,7 @@ end; type FillStyleLstUnitDecorator = class(FillStyleLst) public - function Create(_obj: FillStyleLst); + function create(_obj: FillStyleLst); function GetObject(); function Convert(); private @@ -121,7 +121,7 @@ end; type SolidFillUnitDecorator = class(SolidFill) public - function Create(_obj: SolidFill); + function create(_obj: SolidFill); function GetObject(); function Convert(); private @@ -130,7 +130,7 @@ end; type SchemeClrUnitDecorator = class(SchemeClr) public - function Create(_obj: SchemeClr); + function create(_obj: SchemeClr); function GetObject(); function Convert(); private @@ -139,7 +139,7 @@ end; type GradFillUnitDecorator = class(GradFill) public - function Create(_obj: GradFill); + function create(_obj: GradFill); function GetObject(); function Convert(); private @@ -148,7 +148,7 @@ end; type GsLstUnitDecorator = class(GsLst) public - function Create(_obj: GsLst); + function create(_obj: GsLst); function GetObject(); function Convert(); private @@ -157,7 +157,7 @@ end; type GsUnitDecorator = class(Gs) public - function Create(_obj: Gs); + function create(_obj: Gs); function GetObject(); function Convert(); private @@ -166,7 +166,7 @@ end; type LinUnitDecorator = class(Lin) public - function Create(_obj: Lin); + function create(_obj: Lin); function GetObject(); function Convert(); private @@ -175,7 +175,7 @@ end; type LnStyleLstUnitDecorator = class(LnStyleLst) public - function Create(_obj: LnStyleLst); + function create(_obj: LnStyleLst); function GetObject(); function Convert(); private @@ -184,7 +184,7 @@ end; type EffectStyleLstUnitDecorator = class(EffectStyleLst) public - function Create(_obj: EffectStyleLst); + function create(_obj: EffectStyleLst); function GetObject(); function Convert(); private @@ -193,7 +193,7 @@ end; type EffectStyleUnitDecorator = class(EffectStyle) public - function Create(_obj: EffectStyle); + function create(_obj: EffectStyle); function GetObject(); function Convert(); private @@ -202,7 +202,7 @@ end; type OuterShdwUnitDecorator = class(OuterShdw) public - function Create(_obj: OuterShdw); + function create(_obj: OuterShdw); function GetObject(); function Convert(); private @@ -211,7 +211,7 @@ end; type ExtLstUnitDecorator = class(ExtLst) public - function Create(_obj: ExtLst); + function create(_obj: ExtLst); function GetObject(); function Convert(); private @@ -220,7 +220,7 @@ end; type ExtUnitDecorator = class(Ext) public - function Create(_obj: Ext); + function create(_obj: Ext); function GetObject(); function Convert(); private @@ -229,7 +229,7 @@ end; type SlicerStylesUnitDecorator = class(SlicerStyles) public - function Create(_obj: SlicerStyles); + function create(_obj: SlicerStyles); function GetObject(); function Convert(); private @@ -238,7 +238,7 @@ end; type TimelineStylesUnitDecorator = class(TimelineStyles) public - function Create(_obj: TimelineStyles); + function create(_obj: TimelineStyles); function GetObject(); function Convert(); private @@ -247,7 +247,7 @@ end; type ThemeFamilyUnitDecorator = class(ThemeFamily) public - function Create(_obj: ThemeFamily); + function create(_obj: ThemeFamily); function GetObject(); function Convert(); private @@ -256,7 +256,7 @@ end; type ChartSpaceUnitDecorator = class(ChartSpace) public - function Create(_obj: ChartSpace); + function create(_obj: ChartSpace); function GetObject(); function Convert(); private @@ -265,7 +265,7 @@ end; type ChartUnitDecorator = class(Chart) public - function Create(_obj: Chart); + function create(_obj: Chart); function GetObject(); function Convert(); private @@ -274,7 +274,7 @@ end; type LegendUnitDecorator = class(Legend) public - function Create(_obj: Legend); + function create(_obj: Legend); function GetObject(); function Convert(); private @@ -283,7 +283,7 @@ end; type View3DUnitDecorator = class(View3D) public - function Create(_obj: View3D); + function create(_obj: View3D); function GetObject(); function Convert(); private @@ -292,7 +292,7 @@ end; type PlotAreaUnitDecorator = class(PlotArea) public - function Create(_obj: PlotArea); + function create(_obj: PlotArea); function GetObject(); function Convert(); private @@ -301,7 +301,7 @@ end; type BarChartUnitDecorator = class(BarChart) public - function Create(_obj: BarChart); + function create(_obj: BarChart); function GetObject(); function Convert(); private @@ -310,7 +310,7 @@ end; type SerUnitDecorator = class(Ser) public - function Create(_obj: Ser); + function create(_obj: Ser); function GetObject(); function Convert(); private @@ -319,7 +319,7 @@ end; type DLblsUnitDecorator = class(DLbls) public - function Create(_obj: DLbls); + function create(_obj: DLbls); function GetObject(); function Convert(); private @@ -328,7 +328,7 @@ end; type CatUnitDecorator = class(Cat) public - function Create(_obj: Cat); + function create(_obj: Cat); function GetObject(); function Convert(); private @@ -337,7 +337,7 @@ end; type StrRefUnitDecorator = class(StrRef) public - function Create(_obj: StrRef); + function create(_obj: StrRef); function GetObject(); function Convert(); private @@ -346,7 +346,7 @@ end; type ValUnitDecorator = class(Val) public - function Create(_obj: Val); + function create(_obj: Val); function GetObject(); function Convert(); private @@ -355,7 +355,7 @@ end; type NumRefUnitDecorator = class(NumRef) public - function Create(_obj: NumRef); + function create(_obj: NumRef); function GetObject(); function Convert(); private @@ -364,7 +364,7 @@ end; type StrCacheUnitDecorator = class(StrCache) public - function Create(_obj: StrCache); + function create(_obj: StrCache); function GetObject(); function Convert(); private @@ -373,7 +373,7 @@ end; type NumCacheUnitDecorator = class(NumCache) public - function Create(_obj: NumCache); + function create(_obj: NumCache); function GetObject(); function Convert(); private @@ -382,7 +382,7 @@ end; type PtUnitDecorator = class(Pt) public - function Create(_obj: Pt); + function create(_obj: Pt); function GetObject(); function Convert(); private @@ -391,7 +391,7 @@ end; type AxUnitDecorator = class(Ax) public - function Create(_obj: Ax); + function create(_obj: Ax); function GetObject(); function Convert(); private @@ -400,7 +400,7 @@ end; type NumFmtUnitDecorator = class(NumFmt) public - function Create(_obj: NumFmt); + function create(_obj: NumFmt); function GetObject(); function Convert(); private @@ -409,7 +409,7 @@ end; type ScalingUnitDecorator = class(Scaling) public - function Create(_obj: Scaling); + function create(_obj: Scaling); function GetObject(); function Convert(); private @@ -418,7 +418,7 @@ end; type DTableUnitDecorator = class(DTable) public - function Create(_obj: DTable); + function create(_obj: DTable); function GetObject(); function Convert(); private @@ -427,7 +427,7 @@ end; type TxPrUnitDecorator = class(TxPr) public - function Create(_obj: TxPr); + function create(_obj: TxPr); function GetObject(); function Convert(); private @@ -436,7 +436,7 @@ end; type TitleUnitDecorator = class(Title) public - function Create(_obj: Title); + function create(_obj: Title); function GetObject(); function Convert(); private @@ -445,7 +445,7 @@ end; type TxUnitDecorator = class(Tx) public - function Create(_obj: Tx); + function create(_obj: Tx); function GetObject(); function Convert(); private @@ -454,7 +454,7 @@ end; type RichUnitDecorator = class(Rich) public - function Create(_obj: Rich); + function create(_obj: Rich); function GetObject(); function Convert(); private @@ -463,7 +463,7 @@ end; type BodyPrUnitDecorator = class(BodyPr) public - function Create(_obj: BodyPr); + function create(_obj: BodyPr); function GetObject(); function Convert(); private @@ -472,7 +472,7 @@ end; type PrstTxWrapUnitDecorator = class(PrstTxWrap) public - function Create(_obj: PrstTxWrap); + function create(_obj: PrstTxWrap); function GetObject(); function Convert(); private @@ -481,7 +481,7 @@ end; type PUnitDecorator = class(P) public - function Create(_obj: P); + function create(_obj: P); function GetObject(); function Convert(); private @@ -490,7 +490,7 @@ end; type RPrUnitDecorator = class(RPr) public - function Create(_obj: RPr); + function create(_obj: RPr); function GetObject(); function Convert(); private @@ -499,7 +499,7 @@ end; type PPrUnitDecorator = class(PPr) public - function Create(_obj: PPr); + function create(_obj: PPr); function GetObject(); function Convert(); private @@ -508,7 +508,7 @@ end; type LatinUnitDecorator = class(Latin) public - function Create(_obj: Latin); + function create(_obj: Latin); function GetObject(); function Convert(); private @@ -517,7 +517,7 @@ end; type RUnitDecorator = class(R) public - function Create(_obj: R); + function create(_obj: R); function GetObject(); function Convert(); private @@ -526,7 +526,7 @@ end; type ExternalDataUnitDecorator = class(ExternalData) public - function Create(_obj: ExternalData); + function create(_obj: ExternalData); function GetObject(); function Convert(); private @@ -535,7 +535,7 @@ end; type _InlineUnitDecorator = class(_Inline) public - function Create(_obj: _Inline); + function create(_obj: _Inline); function GetObject(); function Convert(); private @@ -544,7 +544,7 @@ end; type EffectExtentUnitDecorator = class(EffectExtent) public - function Create(_obj: EffectExtent); + function create(_obj: EffectExtent); function GetObject(); function Convert(); private @@ -553,7 +553,7 @@ end; type DocPrUnitDecorator = class(DocPr) public - function Create(_obj: DocPr); + function create(_obj: DocPr); function GetObject(); function Convert(); private @@ -562,7 +562,7 @@ end; type CNvGraphicFramePrUnitDecorator = class(CNvGraphicFramePr) public - function Create(_obj: CNvGraphicFramePr); + function create(_obj: CNvGraphicFramePr); function GetObject(); function Convert(); private @@ -571,7 +571,7 @@ end; type GraphicFrameLocksUnitDecorator = class(GraphicFrameLocks) public - function Create(_obj: GraphicFrameLocks); + function create(_obj: GraphicFrameLocks); function GetObject(); function Convert(); private @@ -580,7 +580,7 @@ end; type GraphicUnitDecorator = class(Graphic) public - function Create(_obj: Graphic); + function create(_obj: Graphic); function GetObject(); function Convert(); private @@ -589,7 +589,7 @@ end; type GraphicDataUnitDecorator = class(GraphicData) public - function Create(_obj: GraphicData); + function create(_obj: GraphicData); function GetObject(); function Convert(); private @@ -598,7 +598,7 @@ end; type WspUnitDecorator = class(Wsp) public - function Create(_obj: Wsp); + function create(_obj: Wsp); function GetObject(); function Convert(); private @@ -607,7 +607,7 @@ end; type WpsStyleUnitDecorator = class(WpsStyle) public - function Create(_obj: WpsStyle); + function create(_obj: WpsStyle); function GetObject(); function Convert(); private @@ -616,7 +616,7 @@ end; type XRefUnitDecorator = class(XRef) public - function Create(_obj: XRef); + function create(_obj: XRef); function GetObject(); function Convert(); private @@ -625,7 +625,7 @@ end; type TxbxUnitDecorator = class(Txbx) public - function Create(_obj: Txbx); + function create(_obj: Txbx); function GetObject(); function Convert(); private @@ -634,7 +634,7 @@ end; type CNvSpPrUnitDecorator = class(CNvSpPr) public - function Create(_obj: CNvSpPr); + function create(_obj: CNvSpPr); function GetObject(); function Convert(); private @@ -643,7 +643,7 @@ end; type SpLocksUnitDecorator = class(SpLocks) public - function Create(_obj: SpLocks); + function create(_obj: SpLocks); function GetObject(); function Convert(); private @@ -652,7 +652,7 @@ end; type PicUnitDecorator = class(Pic) public - function Create(_obj: Pic); + function create(_obj: Pic); function GetObject(); function Convert(); private @@ -661,7 +661,7 @@ end; type NvPicPrUnitDecorator = class(NvPicPr) public - function Create(_obj: NvPicPr); + function create(_obj: NvPicPr); function GetObject(); function Convert(); private @@ -670,7 +670,7 @@ end; type CNvPrUnitDecorator = class(CNvPr) public - function Create(_obj: CNvPr); + function create(_obj: CNvPr); function GetObject(); function Convert(); private @@ -679,7 +679,7 @@ end; type CNvPicPrUnitDecorator = class(CNvPicPr) public - function Create(_obj: CNvPicPr); + function create(_obj: CNvPicPr); function GetObject(); function Convert(); private @@ -688,7 +688,7 @@ end; type PicLocksUnitDecorator = class(PicLocks) public - function Create(_obj: PicLocks); + function create(_obj: PicLocks); function GetObject(); function Convert(); private @@ -697,7 +697,7 @@ end; type BlipFillUnitDecorator = class(BlipFill) public - function Create(_obj: BlipFill); + function create(_obj: BlipFill); function GetObject(); function Convert(); private @@ -706,7 +706,7 @@ end; type BlipUnitDecorator = class(Blip) public - function Create(_obj: Blip); + function create(_obj: Blip); function GetObject(); function Convert(); private @@ -715,7 +715,7 @@ end; type StretchUnitDecorator = class(Stretch) public - function Create(_obj: Stretch); + function create(_obj: Stretch); function GetObject(); function Convert(); private @@ -724,7 +724,7 @@ end; type SpPrUnitDecorator = class(SpPr) public - function Create(_obj: SpPr); + function create(_obj: SpPr); function GetObject(); function Convert(); private @@ -733,7 +733,7 @@ end; type EffectLstUnitDecorator = class(EffectLst) public - function Create(_obj: EffectLst); + function create(_obj: EffectLst); function GetObject(); function Convert(); private @@ -742,7 +742,7 @@ end; type LnUnitDecorator = class(Ln) public - function Create(_obj: Ln); + function create(_obj: Ln); function GetObject(); function Convert(); private @@ -751,7 +751,7 @@ end; type MiterUnitDecorator = class(Miter) public - function Create(_obj: Miter); + function create(_obj: Miter); function GetObject(); function Convert(); private @@ -760,7 +760,7 @@ end; type XfrmUnitDecorator = class(Xfrm) public - function Create(_obj: Xfrm); + function create(_obj: Xfrm); function GetObject(); function Convert(); private @@ -769,7 +769,7 @@ end; type XYUnitDecorator = class(XY) public - function Create(_obj: XY); + function create(_obj: XY); function GetObject(); function Convert(); private @@ -778,7 +778,7 @@ end; type CXYUnitDecorator = class(CXY) public - function Create(_obj: CXY); + function create(_obj: CXY); function GetObject(); function Convert(); private @@ -787,7 +787,7 @@ end; type PrstGeomUnitDecorator = class(PrstGeom) public - function Create(_obj: PrstGeom); + function create(_obj: PrstGeom); function GetObject(); function Convert(); private @@ -796,7 +796,7 @@ end; type AnchorUnitDecorator = class(Anchor) public - function Create(_obj: Anchor); + function create(_obj: Anchor); function GetObject(); function Convert(); private @@ -805,7 +805,7 @@ end; type PositionVUnitDecorator = class(PositionV) public - function Create(_obj: PositionV); + function create(_obj: PositionV); function GetObject(); function Convert(); private @@ -814,7 +814,7 @@ end; type PositionHUnitDecorator = class(PositionH) public - function Create(_obj: PositionH); + function create(_obj: PositionH); function GetObject(); function Convert(); private @@ -823,7 +823,7 @@ end; type SizeRelHUnitDecorator = class(SizeRelH) public - function Create(_obj: SizeRelH); + function create(_obj: SizeRelH); function GetObject(); function Convert(); private @@ -832,7 +832,7 @@ end; type SizeRelVUnitDecorator = class(SizeRelV) public - function Create(_obj: SizeRelV); + function create(_obj: SizeRelV); function GetObject(); function Convert(); private @@ -841,9 +841,9 @@ end; implementation -function ThemeUnitDecorator.Create(_obj: Theme); +function ThemeUnitDecorator.create(_obj: Theme); begin - class(Theme).Create(); + class(Theme).create(); object_ := _obj; {self.}Convert(); end; @@ -870,9 +870,9 @@ begin tslassigning := tslassigning_backup; end; -function ThemeElementsUnitDecorator.Create(_obj: ThemeElements); +function ThemeElementsUnitDecorator.create(_obj: ThemeElements); begin - class(ThemeElements).Create(); + class(ThemeElements).create(); object_ := _obj; {self.}Convert(); end; @@ -897,9 +897,9 @@ begin tslassigning := tslassigning_backup; end; -function ClrSchemeUnitDecorator.Create(_obj: ClrScheme); +function ClrSchemeUnitDecorator.create(_obj: ClrScheme); begin - class(ClrScheme).Create(); + class(ClrScheme).create(); object_ := _obj; {self.}Convert(); end; @@ -942,9 +942,9 @@ begin tslassigning := tslassigning_backup; end; -function Clr1UnitDecorator.Create(_obj: Clr1); +function Clr1UnitDecorator.create(_obj: Clr1); begin - class(Clr1).Create(); + class(Clr1).create(); object_ := _obj; {self.}Convert(); end; @@ -963,9 +963,9 @@ begin tslassigning := tslassigning_backup; end; -function SysClrUnitDecorator.Create(_obj: SysClr); +function SysClrUnitDecorator.create(_obj: SysClr); begin - class(SysClr).Create(); + class(SysClr).create(); object_ := _obj; {self.}Convert(); end; @@ -986,9 +986,9 @@ begin tslassigning := tslassigning_backup; end; -function Clr2UnitDecorator.Create(_obj: Clr2); +function Clr2UnitDecorator.create(_obj: Clr2); begin - class(Clr2).Create(); + class(Clr2).create(); object_ := _obj; {self.}Convert(); end; @@ -1007,9 +1007,9 @@ begin tslassigning := tslassigning_backup; end; -function SrgbClrUnitDecorator.Create(_obj: SrgbClr); +function SrgbClrUnitDecorator.create(_obj: SrgbClr); begin - class(SrgbClr).Create(); + class(SrgbClr).create(); object_ := _obj; {self.}Convert(); end; @@ -1030,9 +1030,9 @@ begin tslassigning := tslassigning_backup; end; -function PureValUnitDecorator.Create(_obj: PureVal); +function PureValUnitDecorator.create(_obj: PureVal); begin - class(PureVal).Create(); + class(PureVal).create(); object_ := _obj; {self.}Convert(); end; @@ -1051,9 +1051,9 @@ begin tslassigning := tslassigning_backup; end; -function FontSchemeUnitDecorator.Create(_obj: FontScheme); +function FontSchemeUnitDecorator.create(_obj: FontScheme); begin - class(FontScheme).Create(); + class(FontScheme).create(); object_ := _obj; {self.}Convert(); end; @@ -1076,9 +1076,9 @@ begin tslassigning := tslassigning_backup; end; -function MFontUnitDecorator.Create(_obj: MFont); +function MFontUnitDecorator.create(_obj: MFont); begin - class(MFont).Create(); + class(MFont).create(); object_ := _obj; {self.}Convert(); end; @@ -1104,9 +1104,9 @@ begin tslassigning := tslassigning_backup; end; -function FontUnitDecorator.Create(_obj: Font); +function FontUnitDecorator.create(_obj: Font); begin - class(Font).Create(); + class(Font).create(); object_ := _obj; {self.}Convert(); end; @@ -1127,9 +1127,9 @@ begin tslassigning := tslassigning_backup; end; -function FmtSchemeUnitDecorator.Create(_obj: FmtScheme); +function FmtSchemeUnitDecorator.create(_obj: FmtScheme); begin - class(FmtScheme).Create(); + class(FmtScheme).create(); object_ := _obj; {self.}Convert(); end; @@ -1156,9 +1156,9 @@ begin tslassigning := tslassigning_backup; end; -function FillStyleLstUnitDecorator.Create(_obj: FillStyleLst); +function FillStyleLstUnitDecorator.create(_obj: FillStyleLst); begin - class(FillStyleLst).Create(); + class(FillStyleLst).create(); object_ := _obj; {self.}Convert(); end; @@ -1181,9 +1181,9 @@ begin tslassigning := tslassigning_backup; end; -function SolidFillUnitDecorator.Create(_obj: SolidFill); +function SolidFillUnitDecorator.create(_obj: SolidFill); begin - class(SolidFill).Create(); + class(SolidFill).create(); object_ := _obj; {self.}Convert(); end; @@ -1202,9 +1202,9 @@ begin tslassigning := tslassigning_backup; end; -function SchemeClrUnitDecorator.Create(_obj: SchemeClr); +function SchemeClrUnitDecorator.create(_obj: SchemeClr); begin - class(SchemeClr).Create(); + class(SchemeClr).create(); object_ := _obj; {self.}Convert(); end; @@ -1229,9 +1229,9 @@ begin tslassigning := tslassigning_backup; end; -function GradFillUnitDecorator.Create(_obj: GradFill); +function GradFillUnitDecorator.create(_obj: GradFill); begin - class(GradFill).Create(); + class(GradFill).create(); object_ := _obj; {self.}Convert(); end; @@ -1254,9 +1254,9 @@ begin tslassigning := tslassigning_backup; end; -function GsLstUnitDecorator.Create(_obj: GsLst); +function GsLstUnitDecorator.create(_obj: GsLst); begin - class(GsLst).Create(); + class(GsLst).create(); object_ := _obj; {self.}Convert(); end; @@ -1276,9 +1276,9 @@ begin tslassigning := tslassigning_backup; end; -function GsUnitDecorator.Create(_obj: Gs); +function GsUnitDecorator.create(_obj: Gs); begin - class(Gs).Create(); + class(Gs).create(); object_ := _obj; {self.}Convert(); end; @@ -1299,9 +1299,9 @@ begin tslassigning := tslassigning_backup; end; -function LinUnitDecorator.Create(_obj: Lin); +function LinUnitDecorator.create(_obj: Lin); begin - class(Lin).Create(); + class(Lin).create(); object_ := _obj; {self.}Convert(); end; @@ -1322,9 +1322,9 @@ begin tslassigning := tslassigning_backup; end; -function LnStyleLstUnitDecorator.Create(_obj: LnStyleLst); +function LnStyleLstUnitDecorator.create(_obj: LnStyleLst); begin - class(LnStyleLst).Create(); + class(LnStyleLst).create(); object_ := _obj; {self.}Convert(); end; @@ -1344,9 +1344,9 @@ begin tslassigning := tslassigning_backup; end; -function EffectStyleLstUnitDecorator.Create(_obj: EffectStyleLst); +function EffectStyleLstUnitDecorator.create(_obj: EffectStyleLst); begin - class(EffectStyleLst).Create(); + class(EffectStyleLst).create(); object_ := _obj; {self.}Convert(); end; @@ -1366,9 +1366,9 @@ begin tslassigning := tslassigning_backup; end; -function EffectStyleUnitDecorator.Create(_obj: EffectStyle); +function EffectStyleUnitDecorator.create(_obj: EffectStyle); begin - class(EffectStyle).Create(); + class(EffectStyle).create(); object_ := _obj; {self.}Convert(); end; @@ -1387,9 +1387,9 @@ begin tslassigning := tslassigning_backup; end; -function OuterShdwUnitDecorator.Create(_obj: OuterShdw); +function OuterShdwUnitDecorator.create(_obj: OuterShdw); begin - class(OuterShdw).Create(); + class(OuterShdw).create(); object_ := _obj; {self.}Convert(); end; @@ -1418,9 +1418,9 @@ begin tslassigning := tslassigning_backup; end; -function ExtLstUnitDecorator.Create(_obj: ExtLst); +function ExtLstUnitDecorator.create(_obj: ExtLst); begin - class(ExtLst).Create(); + class(ExtLst).create(); object_ := _obj; {self.}Convert(); end; @@ -1440,9 +1440,9 @@ begin tslassigning := tslassigning_backup; end; -function ExtUnitDecorator.Create(_obj: Ext); +function ExtUnitDecorator.create(_obj: Ext); begin - class(Ext).Create(); + class(Ext).create(); object_ := _obj; {self.}Convert(); end; @@ -1469,9 +1469,9 @@ begin tslassigning := tslassigning_backup; end; -function SlicerStylesUnitDecorator.Create(_obj: SlicerStyles); +function SlicerStylesUnitDecorator.create(_obj: SlicerStyles); begin - class(SlicerStyles).Create(); + class(SlicerStyles).create(); object_ := _obj; {self.}Convert(); end; @@ -1490,9 +1490,9 @@ begin tslassigning := tslassigning_backup; end; -function TimelineStylesUnitDecorator.Create(_obj: TimelineStyles); +function TimelineStylesUnitDecorator.create(_obj: TimelineStyles); begin - class(TimelineStyles).Create(); + class(TimelineStyles).create(); object_ := _obj; {self.}Convert(); end; @@ -1511,9 +1511,9 @@ begin tslassigning := tslassigning_backup; end; -function ThemeFamilyUnitDecorator.Create(_obj: ThemeFamily); +function ThemeFamilyUnitDecorator.create(_obj: ThemeFamily); begin - class(ThemeFamily).Create(); + class(ThemeFamily).create(); object_ := _obj; {self.}Convert(); end; @@ -1536,9 +1536,9 @@ begin tslassigning := tslassigning_backup; end; -function ChartSpaceUnitDecorator.Create(_obj: ChartSpace); +function ChartSpaceUnitDecorator.create(_obj: ChartSpace); begin - class(ChartSpace).Create(); + class(ChartSpace).create(); object_ := _obj; {self.}Convert(); end; @@ -1567,9 +1567,9 @@ begin tslassigning := tslassigning_backup; end; -function ChartUnitDecorator.Create(_obj: Chart); +function ChartUnitDecorator.create(_obj: Chart); begin - class(Chart).Create(); + class(Chart).create(); object_ := _obj; {self.}Convert(); end; @@ -1604,9 +1604,9 @@ begin tslassigning := tslassigning_backup; end; -function LegendUnitDecorator.Create(_obj: Legend); +function LegendUnitDecorator.create(_obj: Legend); begin - class(Legend).Create(); + class(Legend).create(); object_ := _obj; {self.}Convert(); end; @@ -1631,9 +1631,9 @@ begin tslassigning := tslassigning_backup; end; -function View3DUnitDecorator.Create(_obj: View3D); +function View3DUnitDecorator.create(_obj: View3D); begin - class(View3D).Create(); + class(View3D).create(); object_ := _obj; {self.}Convert(); end; @@ -1656,9 +1656,9 @@ begin tslassigning := tslassigning_backup; end; -function PlotAreaUnitDecorator.Create(_obj: PlotArea); +function PlotAreaUnitDecorator.create(_obj: PlotArea); begin - class(PlotArea).Create(); + class(PlotArea).create(); object_ := _obj; {self.}Convert(); end; @@ -1687,9 +1687,9 @@ begin tslassigning := tslassigning_backup; end; -function BarChartUnitDecorator.Create(_obj: BarChart); +function BarChartUnitDecorator.create(_obj: BarChart); begin - class(BarChart).Create(); + class(BarChart).create(); object_ := _obj; {self.}Convert(); end; @@ -1720,9 +1720,9 @@ begin tslassigning := tslassigning_backup; end; -function SerUnitDecorator.Create(_obj: Ser); +function SerUnitDecorator.create(_obj: Ser); begin - class(Ser).Create(); + class(Ser).create(); object_ := _obj; {self.}Convert(); end; @@ -1755,9 +1755,9 @@ begin tslassigning := tslassigning_backup; end; -function DLblsUnitDecorator.Create(_obj: DLbls); +function DLblsUnitDecorator.create(_obj: DLbls); begin - class(DLbls).Create(); + class(DLbls).create(); object_ := _obj; {self.}Convert(); end; @@ -1792,9 +1792,9 @@ begin tslassigning := tslassigning_backup; end; -function CatUnitDecorator.Create(_obj: Cat); +function CatUnitDecorator.create(_obj: Cat); begin - class(Cat).Create(); + class(Cat).create(); object_ := _obj; {self.}Convert(); end; @@ -1813,9 +1813,9 @@ begin tslassigning := tslassigning_backup; end; -function StrRefUnitDecorator.Create(_obj: StrRef); +function StrRefUnitDecorator.create(_obj: StrRef); begin - class(StrRef).Create(); + class(StrRef).create(); object_ := _obj; {self.}Convert(); end; @@ -1835,9 +1835,9 @@ begin tslassigning := tslassigning_backup; end; -function ValUnitDecorator.Create(_obj: Val); +function ValUnitDecorator.create(_obj: Val); begin - class(Val).Create(); + class(Val).create(); object_ := _obj; {self.}Convert(); end; @@ -1856,9 +1856,9 @@ begin tslassigning := tslassigning_backup; end; -function NumRefUnitDecorator.Create(_obj: NumRef); +function NumRefUnitDecorator.create(_obj: NumRef); begin - class(NumRef).Create(); + class(NumRef).create(); object_ := _obj; {self.}Convert(); end; @@ -1878,9 +1878,9 @@ begin tslassigning := tslassigning_backup; end; -function StrCacheUnitDecorator.Create(_obj: StrCache); +function StrCacheUnitDecorator.create(_obj: StrCache); begin - class(StrCache).Create(); + class(StrCache).create(); object_ := _obj; {self.}Convert(); end; @@ -1902,9 +1902,9 @@ begin tslassigning := tslassigning_backup; end; -function NumCacheUnitDecorator.Create(_obj: NumCache); +function NumCacheUnitDecorator.create(_obj: NumCache); begin - class(NumCache).Create(); + class(NumCache).create(); object_ := _obj; {self.}Convert(); end; @@ -1927,9 +1927,9 @@ begin tslassigning := tslassigning_backup; end; -function PtUnitDecorator.Create(_obj: Pt); +function PtUnitDecorator.create(_obj: Pt); begin - class(Pt).Create(); + class(Pt).create(); object_ := _obj; {self.}Convert(); end; @@ -1949,9 +1949,9 @@ begin tslassigning := tslassigning_backup; end; -function AxUnitDecorator.Create(_obj: Ax); +function AxUnitDecorator.create(_obj: Ax); begin - class(Ax).Create(); + class(Ax).create(); object_ := _obj; {self.}Convert(); end; @@ -2002,9 +2002,9 @@ begin tslassigning := tslassigning_backup; end; -function NumFmtUnitDecorator.Create(_obj: NumFmt); +function NumFmtUnitDecorator.create(_obj: NumFmt); begin - class(NumFmt).Create(); + class(NumFmt).create(); object_ := _obj; {self.}Convert(); end; @@ -2025,9 +2025,9 @@ begin tslassigning := tslassigning_backup; end; -function ScalingUnitDecorator.Create(_obj: Scaling); +function ScalingUnitDecorator.create(_obj: Scaling); begin - class(Scaling).Create(); + class(Scaling).create(); object_ := _obj; {self.}Convert(); end; @@ -2046,9 +2046,9 @@ begin tslassigning := tslassigning_backup; end; -function DTableUnitDecorator.Create(_obj: DTable); +function DTableUnitDecorator.create(_obj: DTable); begin - class(DTable).Create(); + class(DTable).create(); object_ := _obj; {self.}Convert(); end; @@ -2075,9 +2075,9 @@ begin tslassigning := tslassigning_backup; end; -function TxPrUnitDecorator.Create(_obj: TxPr); +function TxPrUnitDecorator.create(_obj: TxPr); begin - class(TxPr).Create(); + class(TxPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2101,9 +2101,9 @@ begin tslassigning := tslassigning_backup; end; -function TitleUnitDecorator.Create(_obj: Title); +function TitleUnitDecorator.create(_obj: Title); begin - class(Title).Create(); + class(Title).create(); object_ := _obj; {self.}Convert(); end; @@ -2126,9 +2126,9 @@ begin tslassigning := tslassigning_backup; end; -function TxUnitDecorator.Create(_obj: Tx); +function TxUnitDecorator.create(_obj: Tx); begin - class(Tx).Create(); + class(Tx).create(); object_ := _obj; {self.}Convert(); end; @@ -2149,9 +2149,9 @@ begin tslassigning := tslassigning_backup; end; -function RichUnitDecorator.Create(_obj: Rich); +function RichUnitDecorator.create(_obj: Rich); begin - class(Rich).Create(); + class(Rich).create(); object_ := _obj; {self.}Convert(); end; @@ -2175,9 +2175,9 @@ begin tslassigning := tslassigning_backup; end; -function BodyPrUnitDecorator.Create(_obj: BodyPr); +function BodyPrUnitDecorator.create(_obj: BodyPr); begin - class(BodyPr).Create(); + class(BodyPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2234,9 +2234,9 @@ begin tslassigning := tslassigning_backup; end; -function PrstTxWrapUnitDecorator.Create(_obj: PrstTxWrap); +function PrstTxWrapUnitDecorator.create(_obj: PrstTxWrap); begin - class(PrstTxWrap).Create(); + class(PrstTxWrap).create(); object_ := _obj; {self.}Convert(); end; @@ -2257,9 +2257,9 @@ begin tslassigning := tslassigning_backup; end; -function PUnitDecorator.Create(_obj: P); +function PUnitDecorator.create(_obj: P); begin - class(P).Create(); + class(P).create(); object_ := _obj; {self.}Convert(); end; @@ -2283,9 +2283,9 @@ begin tslassigning := tslassigning_backup; end; -function RPrUnitDecorator.Create(_obj: RPr); +function RPrUnitDecorator.create(_obj: RPr); begin - class(RPr).Create(); + class(RPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2330,9 +2330,9 @@ begin tslassigning := tslassigning_backup; end; -function PPrUnitDecorator.Create(_obj: PPr); +function PPrUnitDecorator.create(_obj: PPr); begin - class(PPr).Create(); + class(PPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2351,9 +2351,9 @@ begin tslassigning := tslassigning_backup; end; -function LatinUnitDecorator.Create(_obj: Latin); +function LatinUnitDecorator.create(_obj: Latin); begin - class(Latin).Create(); + class(Latin).create(); object_ := _obj; {self.}Convert(); end; @@ -2372,9 +2372,9 @@ begin tslassigning := tslassigning_backup; end; -function RUnitDecorator.Create(_obj: R); +function RUnitDecorator.create(_obj: R); begin - class(R).Create(); + class(R).create(); object_ := _obj; {self.}Convert(); end; @@ -2395,9 +2395,9 @@ begin tslassigning := tslassigning_backup; end; -function ExternalDataUnitDecorator.Create(_obj: ExternalData); +function ExternalDataUnitDecorator.create(_obj: ExternalData); begin - class(ExternalData).Create(); + class(ExternalData).create(); object_ := _obj; {self.}Convert(); end; @@ -2418,9 +2418,9 @@ begin tslassigning := tslassigning_backup; end; -function _InlineUnitDecorator.Create(_obj: _Inline); +function _InlineUnitDecorator.create(_obj: _Inline); begin - class(_Inline).Create(); + class(_Inline).create(); object_ := _obj; {self.}Convert(); end; @@ -2459,9 +2459,9 @@ begin tslassigning := tslassigning_backup; end; -function EffectExtentUnitDecorator.Create(_obj: EffectExtent); +function EffectExtentUnitDecorator.create(_obj: EffectExtent); begin - class(EffectExtent).Create(); + class(EffectExtent).create(); object_ := _obj; {self.}Convert(); end; @@ -2486,9 +2486,9 @@ begin tslassigning := tslassigning_backup; end; -function DocPrUnitDecorator.Create(_obj: DocPr); +function DocPrUnitDecorator.create(_obj: DocPr); begin - class(DocPr).Create(); + class(DocPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2513,9 +2513,9 @@ begin tslassigning := tslassigning_backup; end; -function CNvGraphicFramePrUnitDecorator.Create(_obj: CNvGraphicFramePr); +function CNvGraphicFramePrUnitDecorator.create(_obj: CNvGraphicFramePr); begin - class(CNvGraphicFramePr).Create(); + class(CNvGraphicFramePr).create(); object_ := _obj; {self.}Convert(); end; @@ -2534,9 +2534,9 @@ begin tslassigning := tslassigning_backup; end; -function GraphicFrameLocksUnitDecorator.Create(_obj: GraphicFrameLocks); +function GraphicFrameLocksUnitDecorator.create(_obj: GraphicFrameLocks); begin - class(GraphicFrameLocks).Create(); + class(GraphicFrameLocks).create(); object_ := _obj; {self.}Convert(); end; @@ -2555,9 +2555,9 @@ begin tslassigning := tslassigning_backup; end; -function GraphicUnitDecorator.Create(_obj: Graphic); +function GraphicUnitDecorator.create(_obj: Graphic); begin - class(Graphic).Create(); + class(Graphic).create(); object_ := _obj; {self.}Convert(); end; @@ -2576,9 +2576,9 @@ begin tslassigning := tslassigning_backup; end; -function GraphicDataUnitDecorator.Create(_obj: GraphicData); +function GraphicDataUnitDecorator.create(_obj: GraphicData); begin - class(GraphicData).Create(); + class(GraphicData).create(); object_ := _obj; {self.}Convert(); end; @@ -2603,9 +2603,9 @@ begin tslassigning := tslassigning_backup; end; -function WspUnitDecorator.Create(_obj: Wsp); +function WspUnitDecorator.create(_obj: Wsp); begin - class(Wsp).Create(); + class(Wsp).create(); object_ := _obj; {self.}Convert(); end; @@ -2632,9 +2632,9 @@ begin tslassigning := tslassigning_backup; end; -function WpsStyleUnitDecorator.Create(_obj: WpsStyle); +function WpsStyleUnitDecorator.create(_obj: WpsStyle); begin - class(WpsStyle).Create(); + class(WpsStyle).create(); object_ := _obj; {self.}Convert(); end; @@ -2659,9 +2659,9 @@ begin tslassigning := tslassigning_backup; end; -function XRefUnitDecorator.Create(_obj: XRef); +function XRefUnitDecorator.create(_obj: XRef); begin - class(XRef).Create(); + class(XRef).create(); object_ := _obj; {self.}Convert(); end; @@ -2682,9 +2682,9 @@ begin tslassigning := tslassigning_backup; end; -function TxbxUnitDecorator.Create(_obj: Txbx); +function TxbxUnitDecorator.create(_obj: Txbx); begin - class(Txbx).Create(); + class(Txbx).create(); object_ := _obj; {self.}Convert(); end; @@ -2703,9 +2703,9 @@ begin tslassigning := tslassigning_backup; end; -function CNvSpPrUnitDecorator.Create(_obj: CNvSpPr); +function CNvSpPrUnitDecorator.create(_obj: CNvSpPr); begin - class(CNvSpPr).Create(); + class(CNvSpPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2726,9 +2726,9 @@ begin tslassigning := tslassigning_backup; end; -function SpLocksUnitDecorator.Create(_obj: SpLocks); +function SpLocksUnitDecorator.create(_obj: SpLocks); begin - class(SpLocks).Create(); + class(SpLocks).create(); object_ := _obj; {self.}Convert(); end; @@ -2747,9 +2747,9 @@ begin tslassigning := tslassigning_backup; end; -function PicUnitDecorator.Create(_obj: Pic); +function PicUnitDecorator.create(_obj: Pic); begin - class(Pic).Create(); + class(Pic).create(); object_ := _obj; {self.}Convert(); end; @@ -2772,9 +2772,9 @@ begin tslassigning := tslassigning_backup; end; -function NvPicPrUnitDecorator.Create(_obj: NvPicPr); +function NvPicPrUnitDecorator.create(_obj: NvPicPr); begin - class(NvPicPr).Create(); + class(NvPicPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2795,9 +2795,9 @@ begin tslassigning := tslassigning_backup; end; -function CNvPrUnitDecorator.Create(_obj: CNvPr); +function CNvPrUnitDecorator.create(_obj: CNvPr); begin - class(CNvPr).Create(); + class(CNvPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2820,9 +2820,9 @@ begin tslassigning := tslassigning_backup; end; -function CNvPicPrUnitDecorator.Create(_obj: CNvPicPr); +function CNvPicPrUnitDecorator.create(_obj: CNvPicPr); begin - class(CNvPicPr).Create(); + class(CNvPicPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2841,9 +2841,9 @@ begin tslassigning := tslassigning_backup; end; -function PicLocksUnitDecorator.Create(_obj: PicLocks); +function PicLocksUnitDecorator.create(_obj: PicLocks); begin - class(PicLocks).Create(); + class(PicLocks).create(); object_ := _obj; {self.}Convert(); end; @@ -2862,9 +2862,9 @@ begin tslassigning := tslassigning_backup; end; -function BlipFillUnitDecorator.Create(_obj: BlipFill); +function BlipFillUnitDecorator.create(_obj: BlipFill); begin - class(BlipFill).Create(); + class(BlipFill).create(); object_ := _obj; {self.}Convert(); end; @@ -2885,9 +2885,9 @@ begin tslassigning := tslassigning_backup; end; -function BlipUnitDecorator.Create(_obj: Blip); +function BlipUnitDecorator.create(_obj: Blip); begin - class(Blip).Create(); + class(Blip).create(); object_ := _obj; {self.}Convert(); end; @@ -2908,9 +2908,9 @@ begin tslassigning := tslassigning_backup; end; -function StretchUnitDecorator.Create(_obj: Stretch); +function StretchUnitDecorator.create(_obj: Stretch); begin - class(Stretch).Create(); + class(Stretch).create(); object_ := _obj; {self.}Convert(); end; @@ -2929,9 +2929,9 @@ begin tslassigning := tslassigning_backup; end; -function SpPrUnitDecorator.Create(_obj: SpPr); +function SpPrUnitDecorator.create(_obj: SpPr); begin - class(SpPr).Create(); + class(SpPr).create(); object_ := _obj; {self.}Convert(); end; @@ -2962,9 +2962,9 @@ begin tslassigning := tslassigning_backup; end; -function EffectLstUnitDecorator.Create(_obj: EffectLst); +function EffectLstUnitDecorator.create(_obj: EffectLst); begin - class(EffectLst).Create(); + class(EffectLst).create(); object_ := _obj; {self.}Convert(); end; @@ -2983,9 +2983,9 @@ begin tslassigning := tslassigning_backup; end; -function LnUnitDecorator.Create(_obj: Ln); +function LnUnitDecorator.create(_obj: Ln); begin - class(Ln).Create(); + class(Ln).create(); object_ := _obj; {self.}Convert(); end; @@ -3022,9 +3022,9 @@ begin tslassigning := tslassigning_backup; end; -function MiterUnitDecorator.Create(_obj: Miter); +function MiterUnitDecorator.create(_obj: Miter); begin - class(Miter).Create(); + class(Miter).create(); object_ := _obj; {self.}Convert(); end; @@ -3043,9 +3043,9 @@ begin tslassigning := tslassigning_backup; end; -function XfrmUnitDecorator.Create(_obj: Xfrm); +function XfrmUnitDecorator.create(_obj: Xfrm); begin - class(Xfrm).Create(); + class(Xfrm).create(); object_ := _obj; {self.}Convert(); end; @@ -3072,9 +3072,9 @@ begin tslassigning := tslassigning_backup; end; -function XYUnitDecorator.Create(_obj: XY); +function XYUnitDecorator.create(_obj: XY); begin - class(XY).Create(); + class(XY).create(); object_ := _obj; {self.}Convert(); end; @@ -3095,9 +3095,9 @@ begin tslassigning := tslassigning_backup; end; -function CXYUnitDecorator.Create(_obj: CXY); +function CXYUnitDecorator.create(_obj: CXY); begin - class(CXY).Create(); + class(CXY).create(); object_ := _obj; {self.}Convert(); end; @@ -3118,9 +3118,9 @@ begin tslassigning := tslassigning_backup; end; -function PrstGeomUnitDecorator.Create(_obj: PrstGeom); +function PrstGeomUnitDecorator.create(_obj: PrstGeom); begin - class(PrstGeom).Create(); + class(PrstGeom).create(); object_ := _obj; {self.}Convert(); end; @@ -3141,9 +3141,9 @@ begin tslassigning := tslassigning_backup; end; -function AnchorUnitDecorator.Create(_obj: Anchor); +function AnchorUnitDecorator.create(_obj: Anchor); begin - class(Anchor).Create(); + class(Anchor).create(); object_ := _obj; {self.}Convert(); end; @@ -3208,9 +3208,9 @@ begin tslassigning := tslassigning_backup; end; -function PositionVUnitDecorator.Create(_obj: PositionV); +function PositionVUnitDecorator.create(_obj: PositionV); begin - class(PositionV).Create(); + class(PositionV).create(); object_ := _obj; {self.}Convert(); end; @@ -3231,9 +3231,9 @@ begin tslassigning := tslassigning_backup; end; -function PositionHUnitDecorator.Create(_obj: PositionH); +function PositionHUnitDecorator.create(_obj: PositionH); begin - class(PositionH).Create(); + class(PositionH).create(); object_ := _obj; {self.}Convert(); end; @@ -3254,9 +3254,9 @@ begin tslassigning := tslassigning_backup; end; -function SizeRelHUnitDecorator.Create(_obj: SizeRelH); +function SizeRelHUnitDecorator.create(_obj: SizeRelH); begin - class(SizeRelH).Create(); + class(SizeRelH).create(); object_ := _obj; {self.}Convert(); end; @@ -3277,9 +3277,9 @@ begin tslassigning := tslassigning_backup; end; -function SizeRelVUnitDecorator.Create(_obj: SizeRelV); +function SizeRelVUnitDecorator.create(_obj: SizeRelV); begin - class(SizeRelV).Create(); + class(SizeRelV).create(); object_ := _obj; {self.}Convert(); end; diff --git a/autounit/SharedMLUnitDecorator.tsf b/autounit/SharedMLUnitDecorator.tsf index 8961ca7..15815af 100644 --- a/autounit/SharedMLUnitDecorator.tsf +++ b/autounit/SharedMLUnitDecorator.tsf @@ -4,7 +4,7 @@ uses SharedML, TSSafeUnitConverter; type MathPrUnitDecorator = class(MathPr) public - function Create(_obj: MathPr); + function create(_obj: MathPr); function GetObject(); function Convert(); private @@ -13,7 +13,7 @@ end; type OMathParaUnitDecorator = class(OMathPara) public - function Create(_obj: OMathPara); + function create(_obj: OMathPara); function GetObject(); function Convert(); private @@ -22,7 +22,7 @@ end; type OMathParaPrUnitDecorator = class(OMathParaPr) public - function Create(_obj: OMathParaPr); + function create(_obj: OMathParaPr); function GetObject(); function Convert(); private @@ -31,7 +31,7 @@ end; type PureMValUnitDecorator = class(PureMVal) public - function Create(_obj: PureMVal); + function create(_obj: PureMVal); function GetObject(); function Convert(); private @@ -40,7 +40,7 @@ end; type OMathUnitDecorator = class(OMath) public - function Create(_obj: OMath); + function create(_obj: OMath); function GetObject(); function Convert(); private @@ -49,7 +49,7 @@ end; type RUnitDecorator = class(R) public - function Create(_obj: R); + function create(_obj: R); function GetObject(); function Convert(); private @@ -58,7 +58,7 @@ end; type RPrUnitDecorator = class(RPr) public - function Create(_obj: RPr); + function create(_obj: RPr); function GetObject(); function Convert(); private @@ -67,7 +67,7 @@ end; type TUnitDecorator = class(T) public - function Create(_obj: T); + function create(_obj: T); function GetObject(); function Convert(); private @@ -76,7 +76,7 @@ end; type DUnitDecorator = class(D) public - function Create(_obj: D); + function create(_obj: D); function GetObject(); function Convert(); private @@ -85,7 +85,7 @@ end; type DPrUnitDecorator = class(DPr) public - function Create(_obj: DPr); + function create(_obj: DPr); function GetObject(); function Convert(); private @@ -94,7 +94,7 @@ end; type CtrlPrUnitDecorator = class(CtrlPr) public - function Create(_obj: CtrlPr); + function create(_obj: CtrlPr); function GetObject(); function Convert(); private @@ -103,7 +103,7 @@ end; type SSupUnitDecorator = class(SSup) public - function Create(_obj: SSup); + function create(_obj: SSup); function GetObject(); function Convert(); private @@ -112,7 +112,7 @@ end; type SSupPrUnitDecorator = class(SSupPr) public - function Create(_obj: SSupPr); + function create(_obj: SSupPr); function GetObject(); function Convert(); private @@ -121,7 +121,7 @@ end; type FUnitDecorator = class(F) public - function Create(_obj: F); + function create(_obj: F); function GetObject(); function Convert(); private @@ -130,7 +130,7 @@ end; type FPrUnitDecorator = class(FPr) public - function Create(_obj: FPr); + function create(_obj: FPr); function GetObject(); function Convert(); private @@ -139,7 +139,7 @@ end; type RadUnitDecorator = class(Rad) public - function Create(_obj: Rad); + function create(_obj: Rad); function GetObject(); function Convert(); private @@ -148,7 +148,7 @@ end; type RadPrUnitDecorator = class(RadPr) public - function Create(_obj: RadPr); + function create(_obj: RadPr); function GetObject(); function Convert(); private @@ -157,7 +157,7 @@ end; type SSubUnitDecorator = class(SSub) public - function Create(_obj: SSub); + function create(_obj: SSub); function GetObject(); function Convert(); private @@ -166,7 +166,7 @@ end; type SSubPrUnitDecorator = class(SSubPr) public - function Create(_obj: SSubPr); + function create(_obj: SSubPr); function GetObject(); function Convert(); private @@ -175,7 +175,7 @@ end; type NaryUnitDecorator = class(Nary) public - function Create(_obj: Nary); + function create(_obj: Nary); function GetObject(); function Convert(); private @@ -184,7 +184,7 @@ end; type NaryPrUnitDecorator = class(NaryPr) public - function Create(_obj: NaryPr); + function create(_obj: NaryPr); function GetObject(); function Convert(); private @@ -193,7 +193,7 @@ end; type FuncUnitDecorator = class(Func) public - function Create(_obj: Func); + function create(_obj: Func); function GetObject(); function Convert(); private @@ -202,7 +202,7 @@ end; type FNameUnitDecorator = class(FName) public - function Create(_obj: FName); + function create(_obj: FName); function GetObject(); function Convert(); private @@ -211,7 +211,7 @@ end; type FuncPrUnitDecorator = class(FuncPr) public - function Create(_obj: FuncPr); + function create(_obj: FuncPr); function GetObject(); function Convert(); private @@ -220,7 +220,7 @@ end; type CorePropertiesUnitDecorator = class(CoreProperties) public - function Create(_obj: CoreProperties); + function create(_obj: CoreProperties); function GetObject(); function Convert(); private @@ -229,7 +229,7 @@ end; type CreatedUnitDecorator = class(Created) public - function Create(_obj: Created); + function create(_obj: Created); function GetObject(); function Convert(); private @@ -238,7 +238,7 @@ end; type ModifiedUnitDecorator = class(Modified) public - function Create(_obj: Modified); + function create(_obj: Modified); function GetObject(); function Convert(); private @@ -247,7 +247,7 @@ end; type RelationshipsUnitDecorator = class(Relationships) public - function Create(_obj: Relationships); + function create(_obj: Relationships); function GetObject(); function Convert(); private @@ -256,7 +256,7 @@ end; type RelationshipUnitDecorator = class(Relationship) public - function Create(_obj: Relationship); + function create(_obj: Relationship); function GetObject(); function Convert(); private @@ -265,7 +265,7 @@ end; type TypesUnitDecorator = class(Types) public - function Create(_obj: Types); + function create(_obj: Types); function GetObject(); function Convert(); private @@ -274,7 +274,7 @@ end; type DefaultUnitDecorator = class(Default) public - function Create(_obj: Default); + function create(_obj: Default); function GetObject(); function Convert(); private @@ -283,7 +283,7 @@ end; type _OverrideUnitDecorator = class(_Override) public - function Create(_obj: _Override); + function create(_obj: _Override); function GetObject(); function Convert(); private @@ -292,7 +292,7 @@ end; type NumUnitDecorator = class(Num) public - function Create(_obj: Num); + function create(_obj: Num); function GetObject(); function Convert(); private @@ -301,7 +301,7 @@ end; type DegUnitDecorator = class(Deg) public - function Create(_obj: Deg); + function create(_obj: Deg); function GetObject(); function Convert(); private @@ -310,7 +310,7 @@ end; type EUnitDecorator = class(E) public - function Create(_obj: E); + function create(_obj: E); function GetObject(); function Convert(); private @@ -319,7 +319,7 @@ end; type SupUnitDecorator = class(Sup) public - function Create(_obj: Sup); + function create(_obj: Sup); function GetObject(); function Convert(); private @@ -328,7 +328,7 @@ end; type DenUnitDecorator = class(Den) public - function Create(_obj: Den); + function create(_obj: Den); function GetObject(); function Convert(); private @@ -337,7 +337,7 @@ end; type SubUnitDecorator = class(Sub) public - function Create(_obj: Sub); + function create(_obj: Sub); function GetObject(); function Convert(); private @@ -346,9 +346,9 @@ end; implementation -function MathPrUnitDecorator.Create(_obj: MathPr); +function MathPrUnitDecorator.create(_obj: MathPr); begin - class(MathPr).Create(); + class(MathPr).create(); object_ := _obj; {self.}Convert(); end; @@ -387,9 +387,9 @@ begin tslassigning := tslassigning_backup; end; -function OMathParaUnitDecorator.Create(_obj: OMathPara); +function OMathParaUnitDecorator.create(_obj: OMathPara); begin - class(OMathPara).Create(); + class(OMathPara).create(); object_ := _obj; {self.}Convert(); end; @@ -410,9 +410,9 @@ begin tslassigning := tslassigning_backup; end; -function OMathParaPrUnitDecorator.Create(_obj: OMathParaPr); +function OMathParaPrUnitDecorator.create(_obj: OMathParaPr); begin - class(OMathParaPr).Create(); + class(OMathParaPr).create(); object_ := _obj; {self.}Convert(); end; @@ -431,9 +431,9 @@ begin tslassigning := tslassigning_backup; end; -function PureMValUnitDecorator.Create(_obj: PureMVal); +function PureMValUnitDecorator.create(_obj: PureMVal); begin - class(PureMVal).Create(); + class(PureMVal).create(); object_ := _obj; {self.}Convert(); end; @@ -452,9 +452,9 @@ begin tslassigning := tslassigning_backup; end; -function OMathUnitDecorator.Create(_obj: OMath); +function OMathUnitDecorator.create(_obj: OMath); begin - class(OMath).Create(); + class(OMath).create(); object_ := _obj; {self.}Convert(); end; @@ -495,9 +495,9 @@ begin tslassigning := tslassigning_backup; end; -function RUnitDecorator.Create(_obj: R); +function RUnitDecorator.create(_obj: R); begin - class(R).Create(); + class(R).create(); object_ := _obj; {self.}Convert(); end; @@ -522,9 +522,9 @@ begin tslassigning := tslassigning_backup; end; -function RPrUnitDecorator.Create(_obj: RPr); +function RPrUnitDecorator.create(_obj: RPr); begin - class(RPr).Create(); + class(RPr).create(); object_ := _obj; {self.}Convert(); end; @@ -543,9 +543,9 @@ begin tslassigning := tslassigning_backup; end; -function TUnitDecorator.Create(_obj: T); +function TUnitDecorator.create(_obj: T); begin - class(T).Create(); + class(T).create(); object_ := _obj; {self.}Convert(); end; @@ -564,9 +564,9 @@ begin tslassigning := tslassigning_backup; end; -function DUnitDecorator.Create(_obj: D); +function DUnitDecorator.create(_obj: D); begin - class(D).Create(); + class(D).create(); object_ := _obj; {self.}Convert(); end; @@ -587,9 +587,9 @@ begin tslassigning := tslassigning_backup; end; -function DPrUnitDecorator.Create(_obj: DPr); +function DPrUnitDecorator.create(_obj: DPr); begin - class(DPr).Create(); + class(DPr).create(); object_ := _obj; {self.}Convert(); end; @@ -620,9 +620,9 @@ begin tslassigning := tslassigning_backup; end; -function CtrlPrUnitDecorator.Create(_obj: CtrlPr); +function CtrlPrUnitDecorator.create(_obj: CtrlPr); begin - class(CtrlPr).Create(); + class(CtrlPr).create(); object_ := _obj; {self.}Convert(); end; @@ -643,9 +643,9 @@ begin tslassigning := tslassigning_backup; end; -function SSupUnitDecorator.Create(_obj: SSup); +function SSupUnitDecorator.create(_obj: SSup); begin - class(SSup).Create(); + class(SSup).create(); object_ := _obj; {self.}Convert(); end; @@ -668,9 +668,9 @@ begin tslassigning := tslassigning_backup; end; -function SSupPrUnitDecorator.Create(_obj: SSupPr); +function SSupPrUnitDecorator.create(_obj: SSupPr); begin - class(SSupPr).Create(); + class(SSupPr).create(); object_ := _obj; {self.}Convert(); end; @@ -689,9 +689,9 @@ begin tslassigning := tslassigning_backup; end; -function FUnitDecorator.Create(_obj: F); +function FUnitDecorator.create(_obj: F); begin - class(F).Create(); + class(F).create(); object_ := _obj; {self.}Convert(); end; @@ -714,9 +714,9 @@ begin tslassigning := tslassigning_backup; end; -function FPrUnitDecorator.Create(_obj: FPr); +function FPrUnitDecorator.create(_obj: FPr); begin - class(FPr).Create(); + class(FPr).create(); object_ := _obj; {self.}Convert(); end; @@ -737,9 +737,9 @@ begin tslassigning := tslassigning_backup; end; -function RadUnitDecorator.Create(_obj: Rad); +function RadUnitDecorator.create(_obj: Rad); begin - class(Rad).Create(); + class(Rad).create(); object_ := _obj; {self.}Convert(); end; @@ -762,9 +762,9 @@ begin tslassigning := tslassigning_backup; end; -function RadPrUnitDecorator.Create(_obj: RadPr); +function RadPrUnitDecorator.create(_obj: RadPr); begin - class(RadPr).Create(); + class(RadPr).create(); object_ := _obj; {self.}Convert(); end; @@ -785,9 +785,9 @@ begin tslassigning := tslassigning_backup; end; -function SSubUnitDecorator.Create(_obj: SSub); +function SSubUnitDecorator.create(_obj: SSub); begin - class(SSub).Create(); + class(SSub).create(); object_ := _obj; {self.}Convert(); end; @@ -810,9 +810,9 @@ begin tslassigning := tslassigning_backup; end; -function SSubPrUnitDecorator.Create(_obj: SSubPr); +function SSubPrUnitDecorator.create(_obj: SSubPr); begin - class(SSubPr).Create(); + class(SSubPr).create(); object_ := _obj; {self.}Convert(); end; @@ -831,9 +831,9 @@ begin tslassigning := tslassigning_backup; end; -function NaryUnitDecorator.Create(_obj: Nary); +function NaryUnitDecorator.create(_obj: Nary); begin - class(Nary).Create(); + class(Nary).create(); object_ := _obj; {self.}Convert(); end; @@ -858,9 +858,9 @@ begin tslassigning := tslassigning_backup; end; -function NaryPrUnitDecorator.Create(_obj: NaryPr); +function NaryPrUnitDecorator.create(_obj: NaryPr); begin - class(NaryPr).Create(); + class(NaryPr).create(); object_ := _obj; {self.}Convert(); end; @@ -889,9 +889,9 @@ begin tslassigning := tslassigning_backup; end; -function FuncUnitDecorator.Create(_obj: Func); +function FuncUnitDecorator.create(_obj: Func); begin - class(Func).Create(); + class(Func).create(); object_ := _obj; {self.}Convert(); end; @@ -914,9 +914,9 @@ begin tslassigning := tslassigning_backup; end; -function FNameUnitDecorator.Create(_obj: FName); +function FNameUnitDecorator.create(_obj: FName); begin - class(FName).Create(); + class(FName).create(); object_ := _obj; {self.}Convert(); end; @@ -936,9 +936,9 @@ begin tslassigning := tslassigning_backup; end; -function FuncPrUnitDecorator.Create(_obj: FuncPr); +function FuncPrUnitDecorator.create(_obj: FuncPr); begin - class(FuncPr).Create(); + class(FuncPr).create(); object_ := _obj; {self.}Convert(); end; @@ -957,9 +957,9 @@ begin tslassigning := tslassigning_backup; end; -function CorePropertiesUnitDecorator.Create(_obj: CoreProperties); +function CorePropertiesUnitDecorator.create(_obj: CoreProperties); begin - class(CoreProperties).Create(); + class(CoreProperties).create(); object_ := _obj; {self.}Convert(); end; @@ -988,9 +988,9 @@ begin tslassigning := tslassigning_backup; end; -function CreatedUnitDecorator.Create(_obj: Created); +function CreatedUnitDecorator.create(_obj: Created); begin - class(Created).Create(); + class(Created).create(); object_ := _obj; {self.}Convert(); end; @@ -1009,9 +1009,9 @@ begin tslassigning := tslassigning_backup; end; -function ModifiedUnitDecorator.Create(_obj: Modified); +function ModifiedUnitDecorator.create(_obj: Modified); begin - class(Modified).Create(); + class(Modified).create(); object_ := _obj; {self.}Convert(); end; @@ -1030,9 +1030,9 @@ begin tslassigning := tslassigning_backup; end; -function RelationshipsUnitDecorator.Create(_obj: Relationships); +function RelationshipsUnitDecorator.create(_obj: Relationships); begin - class(Relationships).Create(); + class(Relationships).create(); object_ := _obj; {self.}Convert(); end; @@ -1052,9 +1052,9 @@ begin tslassigning := tslassigning_backup; end; -function RelationshipUnitDecorator.Create(_obj: Relationship); +function RelationshipUnitDecorator.create(_obj: Relationship); begin - class(Relationship).Create(); + class(Relationship).create(); object_ := _obj; {self.}Convert(); end; @@ -1077,9 +1077,9 @@ begin tslassigning := tslassigning_backup; end; -function TypesUnitDecorator.Create(_obj: Types); +function TypesUnitDecorator.create(_obj: Types); begin - class(Types).Create(); + class(Types).create(); object_ := _obj; {self.}Convert(); end; @@ -1102,9 +1102,9 @@ begin tslassigning := tslassigning_backup; end; -function DefaultUnitDecorator.Create(_obj: Default); +function DefaultUnitDecorator.create(_obj: Default); begin - class(Default).Create(); + class(Default).create(); object_ := _obj; {self.}Convert(); end; @@ -1125,9 +1125,9 @@ begin tslassigning := tslassigning_backup; end; -function _OverrideUnitDecorator.Create(_obj: _Override); +function _OverrideUnitDecorator.create(_obj: _Override); begin - class(_Override).Create(); + class(_Override).create(); object_ := _obj; {self.}Convert(); end; @@ -1148,9 +1148,9 @@ begin tslassigning := tslassigning_backup; end; -function NumUnitDecorator.Create(_obj: Num); +function NumUnitDecorator.create(_obj: Num); begin - class(Num).Create(); + class(Num).create(); object_ := _obj; {self.}Convert(); end; @@ -1193,9 +1193,9 @@ begin tslassigning := tslassigning_backup; end; -function DegUnitDecorator.Create(_obj: Deg); +function DegUnitDecorator.create(_obj: Deg); begin - class(Deg).Create(); + class(Deg).create(); object_ := _obj; {self.}Convert(); end; @@ -1238,9 +1238,9 @@ begin tslassigning := tslassigning_backup; end; -function EUnitDecorator.Create(_obj: E); +function EUnitDecorator.create(_obj: E); begin - class(E).Create(); + class(E).create(); object_ := _obj; {self.}Convert(); end; @@ -1283,9 +1283,9 @@ begin tslassigning := tslassigning_backup; end; -function SupUnitDecorator.Create(_obj: Sup); +function SupUnitDecorator.create(_obj: Sup); begin - class(Sup).Create(); + class(Sup).create(); object_ := _obj; {self.}Convert(); end; @@ -1328,9 +1328,9 @@ begin tslassigning := tslassigning_backup; end; -function DenUnitDecorator.Create(_obj: Den); +function DenUnitDecorator.create(_obj: Den); begin - class(Den).Create(); + class(Den).create(); object_ := _obj; {self.}Convert(); end; @@ -1373,9 +1373,9 @@ begin tslassigning := tslassigning_backup; end; -function SubUnitDecorator.Create(_obj: Sub); +function SubUnitDecorator.create(_obj: Sub); begin - class(Sub).Create(); + class(Sub).create(); object_ := _obj; {self.}Convert(); end; diff --git a/autounit/VMLUnitDecorator.tsf b/autounit/VMLUnitDecorator.tsf index 63dfa93..8e96cd9 100644 --- a/autounit/VMLUnitDecorator.tsf +++ b/autounit/VMLUnitDecorator.tsf @@ -4,7 +4,7 @@ uses VML, TSSafeUnitConverter; type ShapetypeUnitDecorator = class(Shapetype) public - function Create(_obj: Shapetype); + function create(_obj: Shapetype); function GetObject(); function Convert(); private @@ -13,7 +13,7 @@ end; type FormulasUnitDecorator = class(Formulas) public - function Create(_obj: Formulas); + function create(_obj: Formulas); function GetObject(); function Convert(); private @@ -22,7 +22,7 @@ end; type LockUnitDecorator = class(Lock) public - function Create(_obj: Lock); + function create(_obj: Lock); function GetObject(); function Convert(); private @@ -31,7 +31,7 @@ end; type FUnitDecorator = class(F) public - function Create(_obj: F); + function create(_obj: F); function GetObject(); function Convert(); private @@ -40,7 +40,7 @@ end; type StrokeUnitDecorator = class(Stroke) public - function Create(_obj: Stroke); + function create(_obj: Stroke); function GetObject(); function Convert(); private @@ -49,7 +49,7 @@ end; type PathUnitDecorator = class(Path) public - function Create(_obj: Path); + function create(_obj: Path); function GetObject(); function Convert(); private @@ -58,7 +58,7 @@ end; type TextpathUnitDecorator = class(Textpath) public - function Create(_obj: Textpath); + function create(_obj: Textpath); function GetObject(); function Convert(); private @@ -67,7 +67,7 @@ end; type HandlesUnitDecorator = class(Handles) public - function Create(_obj: Handles); + function create(_obj: Handles); function GetObject(); function Convert(); private @@ -76,7 +76,7 @@ end; type HUnitDecorator = class(H) public - function Create(_obj: H); + function create(_obj: H); function GetObject(); function Convert(); private @@ -85,7 +85,7 @@ end; type ShapeUnitDecorator = class(Shape) public - function Create(_obj: Shape); + function create(_obj: Shape); function GetObject(); function Convert(); private @@ -94,7 +94,7 @@ end; type WrapUnitDecorator = class(Wrap) public - function Create(_obj: Wrap); + function create(_obj: Wrap); function GetObject(); function Convert(); private @@ -103,7 +103,7 @@ end; type FillUnitDecorator = class(Fill) public - function Create(_obj: Fill); + function create(_obj: Fill); function GetObject(); function Convert(); private @@ -112,7 +112,7 @@ end; type ImagedataUnitDecorator = class(Imagedata) public - function Create(_obj: Imagedata); + function create(_obj: Imagedata); function GetObject(); function Convert(); private @@ -121,7 +121,7 @@ end; type TextboxUnitDecorator = class(Textbox) public - function Create(_obj: Textbox); + function create(_obj: Textbox); function GetObject(); function Convert(); private @@ -130,7 +130,7 @@ end; type OLEObjectUnitDecorator = class(OLEObject) public - function Create(_obj: OLEObject); + function create(_obj: OLEObject); function GetObject(); function Convert(); private @@ -139,9 +139,9 @@ end; implementation -function ShapetypeUnitDecorator.Create(_obj: Shapetype); +function ShapetypeUnitDecorator.create(_obj: Shapetype); begin - class(Shapetype).Create(); + class(Shapetype).create(); object_ := _obj; {self.}Convert(); end; @@ -167,8 +167,8 @@ begin {self.}Adj := object_.XmlAttrAdj.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_.XmlAttrAttrPath) then + {self.}AttrPath := object_.XmlAttrAttrPath.Value; if not ifnil(object_.XmlAttrFilled) then {self.}Filled := object_.XmlAttrFilled.Value; if not ifnil(object_.XmlAttrStroked) then @@ -188,9 +188,9 @@ begin tslassigning := tslassigning_backup; end; -function FormulasUnitDecorator.Create(_obj: Formulas); +function FormulasUnitDecorator.create(_obj: Formulas); begin - class(Formulas).Create(); + class(Formulas).create(); object_ := _obj; {self.}Convert(); end; @@ -206,13 +206,13 @@ begin tslassigning := 1; elems := object_.Fs(); for _,elem in elems do - {self.}AppendChild(new ShapetypeUnitDecorator(elem)); + {self.}AppendChild(new FUnitDecorator(elem)); tslassigning := tslassigning_backup; end; -function LockUnitDecorator.Create(_obj: Lock); +function LockUnitDecorator.create(_obj: Lock); begin - class(Lock).Create(); + class(Lock).create(); object_ := _obj; {self.}Convert(); end; @@ -230,12 +230,16 @@ begin {self.}Ext := object_.XmlAttrExt.Value; if not ifnil(object_.XmlAttrAspectration) then {self.}Aspectration := object_.XmlAttrAspectration.Value; + if not ifnil(object_.XmlAttrText) then + {self.}Text := object_.XmlAttrText.Value; + if not ifnil(object_.XmlAttrShapetype) then + {self.}Shapetype := object_.XmlAttrShapetype.Value; tslassigning := tslassigning_backup; end; -function FUnitDecorator.Create(_obj: F); +function FUnitDecorator.create(_obj: F); begin - class(F).Create(); + class(F).create(); object_ := _obj; {self.}Convert(); end; @@ -254,9 +258,9 @@ begin tslassigning := tslassigning_backup; end; -function StrokeUnitDecorator.Create(_obj: Stroke); +function StrokeUnitDecorator.create(_obj: Stroke); begin - class(Stroke).Create(); + class(Stroke).create(); object_ := _obj; {self.}Convert(); end; @@ -275,9 +279,9 @@ begin tslassigning := tslassigning_backup; end; -function PathUnitDecorator.Create(_obj: Path); +function PathUnitDecorator.create(_obj: Path); begin - class(Path).Create(); + class(Path).create(); object_ := _obj; {self.}Convert(); end; @@ -306,9 +310,9 @@ begin tslassigning := tslassigning_backup; end; -function TextpathUnitDecorator.Create(_obj: Textpath); +function TextpathUnitDecorator.create(_obj: Textpath); begin - class(Textpath).Create(); + class(Textpath).create(); object_ := _obj; {self.}Convert(); end; @@ -333,9 +337,9 @@ begin tslassigning := tslassigning_backup; end; -function HandlesUnitDecorator.Create(_obj: Handles); +function HandlesUnitDecorator.create(_obj: Handles); begin - class(Handles).Create(); + class(Handles).create(); object_ := _obj; {self.}Convert(); end; @@ -354,9 +358,9 @@ begin tslassigning := tslassigning_backup; end; -function HUnitDecorator.Create(_obj: H); +function HUnitDecorator.create(_obj: H); begin - class(H).Create(); + class(H).create(); object_ := _obj; {self.}Convert(); end; @@ -370,16 +374,16 @@ function HUnitDecorator.Convert(); begin tslassigning_backup := tslassigning; tslassigning := 1; - if not ifnil(object_.XmlAttrXrange) then - {self.}Xrange := object_.XmlAttrXrange.Value; if not ifnil(object_.XmlAttrPosition) then {self.}Position := object_.XmlAttrPosition.Value; + if not ifnil(object_.XmlAttrXrange) then + {self.}Xrange := object_.XmlAttrXrange.Value; tslassigning := tslassigning_backup; end; -function ShapeUnitDecorator.Create(_obj: Shape); +function ShapeUnitDecorator.create(_obj: Shape); begin - class(Shape).Create(); + class(Shape).create(); object_ := _obj; {self.}Convert(); end; @@ -426,9 +430,9 @@ begin tslassigning := tslassigning_backup; end; -function WrapUnitDecorator.Create(_obj: Wrap); +function WrapUnitDecorator.create(_obj: Wrap); begin - class(Wrap).Create(); + class(Wrap).create(); object_ := _obj; {self.}Convert(); end; @@ -449,9 +453,9 @@ begin tslassigning := tslassigning_backup; end; -function FillUnitDecorator.Create(_obj: Fill); +function FillUnitDecorator.create(_obj: Fill); begin - class(Fill).Create(); + class(Fill).create(); object_ := _obj; {self.}Convert(); end; @@ -470,9 +474,9 @@ begin tslassigning := tslassigning_backup; end; -function ImagedataUnitDecorator.Create(_obj: Imagedata); +function ImagedataUnitDecorator.create(_obj: Imagedata); begin - class(Imagedata).Create(); + class(Imagedata).create(); object_ := _obj; {self.}Convert(); end; @@ -493,9 +497,9 @@ begin tslassigning := tslassigning_backup; end; -function TextboxUnitDecorator.Create(_obj: Textbox); +function TextboxUnitDecorator.create(_obj: Textbox); begin - class(Textbox).Create(); + class(Textbox).create(); object_ := _obj; {self.}Convert(); end; @@ -514,9 +518,9 @@ begin tslassigning := tslassigning_backup; end; -function OLEObjectUnitDecorator.Create(_obj: OLEObject); +function OLEObjectUnitDecorator.create(_obj: OLEObject); begin - class(OLEObject).Create(); + class(OLEObject).create(); object_ := _obj; {self.}Convert(); end; diff --git a/utils/TSSafeUnitConverter.tsf b/utils/TSSafeUnitConverter.tsf index 9e49df3..c2b9dea 100644 --- a/utils/TSSafeUnitConverter.tsf +++ b/utils/TSSafeUnitConverter.tsf @@ -1,70 +1,144 @@ unit TSSafeUnitConverter; interface - function PointsToTwips(value): real; - function TwipsToPoints(value): real; + function CentimetersToPoints(value): real; function EmusToPoints(value): real; - function HalfPointToPoints(value): real; + function InchesToPoints(value): real; + function LinesToPoints(value): real; + function MillimetersToPoints(value): real; + function PicasToPoints(value): real; + function PixelsToPoints(value): real; // TODO 不实现,与DPI有关 + function TwipsToPoints(value): real; + + // points -> other + function PointsToCentimeters(value): real; + function PointsToEmus(value): real; + function PointsToInches(value): real; + function PointsToLines(value): real; + function PointsToMillimeters(value); + function PointsToPicas(value); + function PointsToPixels(value); // TODO + function PointsToTwips(value): real; + + // other + function HalfPointsToPoints(value): real; + function PointsToHalfPoints(value): real; + function EighthPointsToPoints(value): real; function PercentToNumber(value): real; function NumberToPercent(value): real; function ToInt(value): integer; - function EighthPointToPoints(value): real; implementation uses TSUnitConverter; - function PointsToTwips(value): real; + function SafeConvert(value, convert_func): real; begin if ifNil(value) then return 0; - new_value := ifString(value) ? strToFloat(value) : value; - return TSUnitConverter.PointsToTwips(new_value); + new_value := ifString(value) ? strToFloatDef(value, 0) : value; + return ##convert_func(new_value); end; - function TwipsToPoints(value): real; + function CentimetersToPoints(value): real; begin - if ifNil(value) then return 0; - new_value := ifString(value) ? strToFloat(value) : value; - return TSUnitConverter.TwipsToPoints(new_value); - end; - - function HalfPointToPoints(value): real; - begin - if ifNil(value) then return 0; - new_value := ifString(value) ? strToFloat(value) : value; - return TSUnitConverter.HalfPointToPoints(new_value); + return SafeConvert(value, thisFunction(TSUnitConverter.CentimetersToPoints)); end; function EmusToPoints(value): real; begin - if ifNil(value) then return 0; - new_value := ifString(value) ? strToFloat(value) : value; - return TSUnitConverter.EmusToPoints(new_value); + return SafeConvert(value, thisFunction(TSUnitConverter.EmusToPoints)); + end; + + function InchesToPoints(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.InchesToPoints)); + end; + + function LinesToPoints(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.LinesToPoints)); + end; + + function MillimetersToPoints(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.MillimetersToPoints)); + end; + + function PicasToPoints(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.PicasToPoints)); + end; + + function TwipsToPoints(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.TwipsToPoints)); + end; + + // points -> other + function PointsToCentimeters(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.PointsToCentimeters)); + end; + + function PointsToEmus(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.PointsToEmus)); + end; + + function PointsToInches(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.PointsToInches)); + end; + + function PointsToLines(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.PointsToLines)); + end; + + function PointsToMillimeters(value); + begin + return SafeConvert(value, thisFunction(TSUnitConverter.PointsToMillimeters)); + end; + + function PointsToPicas(value); + begin + return SafeConvert(value, thisFunction(TSUnitConverter.PointsToPicas)); + end; + + function PointsToTwips(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.PointsToTwips)); + end; + + // other + function HalfPointsToPoints(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.HalfPointsToPoints)); + end; + + function PointsToHalfPoints(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.PointsToHalfPoints)); + end; + + function EighthPointsToPoints(value): real; + begin + return SafeConvert(value, thisFunction(TSUnitConverter.EighthPointsToPoints)); end; function PercentToNumber(value): real; begin - if ifNil(value) then return 0; - new_value := ifString(value) ? strToFloat(value) : value; - return TSUnitConverter.PercentToNumber(new_value); + return SafeConvert(value, thisFunction(TSUnitConverter.PercentToNumber)); end; function NumberToPercent(value): real; begin - if ifNil(value) then return 0; - new_value := ifString(value) ? strToFloat(value) : value; - return TSUnitConverter.NumberToPercent(new_value); + return SafeConvert(value, thisFunction(TSUnitConverter.NumberToPercent)); end; - function ToInt(value): integer; + function ToInt(value): real; begin - if ifNil(value) then return 0; - return strtoIntDef(value, 0); - end; - - function EighthPointToPoints(value): real; - begin - if ifNil(value) then return 0; - new_value := ifString(value) ? strToFloat(value) : value; - return TSUnitConverter.EighthPointToPoints(new_value); + if ifnumber(value) then return integer(value); + if ifstring(value) then return strToIntDef(value, 0); + return 0; end; end. diff --git a/utils/TSUnitConverter.tsf b/utils/TSUnitConverter.tsf index c948ec1..779d9f3 100644 --- a/utils/TSUnitConverter.tsf +++ b/utils/TSUnitConverter.tsf @@ -1,48 +1,130 @@ unit TSUnitConverter; interface - function PointsToTwips(value): real; - function TwipsToPoints(value: real): real; - function EmusToPoints(value: real): real; - function HalfPointToPoints(value: real): real; - function EighthPointToPoints(value: real): real; - function PercentToNumber(value: real): real; - function NumberToPercent(value: real): real; + // other -> points + function CentimetersToPoints(centimeters: real): real; + function EmusToPoints(emus: real): real; + function InchesToPoints(inches: real): real; + function LinesToPoints(lines: real): real; + function MillimetersToPoints(millimeters: real): real; + function PicasToPoints(picas: real): real; + function PixelsToPoints(pixels: real; f_vertical: boolean = false): real; // TODO 不实现,与DPI有关 + function TwipsToPoints(twips: real): real; + + // points -> other + function PointsToCentimeters(points: real): real; + function PointsToEmus(points: real): real; + function PointsToInches(points: real): real; + function PointsToLines(points: real): real; + function PointsToMillimeters(points: real); + function PointsToPicas(points: real); + function PointsToPixels(points: real); // TODO + function PointsToTwips(points): real; + + // other + function HalfPointsToPoints(half_points: real): real; + function PointsToHalfPoints(points: real): real; + function EighthPointsToPoints(eighth_points: real): real; + function PercentToNumber(percent: real): real; + function NumberToPercent(number: real): real; implementation - function PointsToTwips(value): real; + function CentimetersToPoints(centimeters: real): real; begin - return value * 20; + return centimeters * 28.346456692913385826771653543307; end; - function TwipsToPoints(value: real): real; + function EmusToPoints(emus: real): real; begin - return value / 20; + return emus / 12700; end; - function EmusToPoints(value: real): real; + function InchesToPoints(inches: real): real; begin - return value / 12700; + return inches * 72; end; - function HalfPointToPoints(value: real): real; + function LinesToPoints(lines: real): real; begin - return value / 2; + return lines * 12; // Assuming 1 line = 12 points end; - function PercentToNumber(value: real): real; + function MillimetersToPoints(millimeters: real): real; begin - return value / 100; + return millimeters * 2.8346456692913385826771653543307; end; - function NumberToPercent(value: real): real; + function PicasToPoints(picas: real): real; begin - return value * 100; + return picas * 12; end; - function EighthPointToPoints(value: real): real; + function TwipsToPoints(twips: real): real; begin - return value / 8; + return twips / 20; + end; + + + // Points -> others + function PointsToCentimeters(points: real): real; + begin + return points / 28.346456692913385826771653543307; + end; + + function PointsToEmus(points: real): real; + begin + return points * 12700; + end; + + function PointsToInches(points: real): real; + begin + return points / 72; + end; + + function PointsToLines(points: real): real; + begin + return points / 12; + end; + + function PointsToMillimeters(points: real); + begin + return points / 2.8346456692913385826771653543307; + end; + + function PointsToTwips(points): real; + begin + return points * 20; + end; + + function PointsToPicas(points: real); + begin + return points / 12; + end; + + // other + function HalfPointsToPoints(half_points: real): real; + begin + return half_points / 2; + end; + + function PointsToHalfPoints(points: real): real; + begin + return points * 2; + end; + + function EighthPointsToPoints(eighth_points: real): real; + begin + return eighth_points / 8; + end; + + function PercentToNumber(percent: real): real; + begin + return percent / 100; + end; + + function NumberToPercent(number: real): real; + begin + return number * 100; end; end.