type Components = class(TSComponentsBase) public function Create(); function Init();override; property Rels read ReadRels; property App read ReadApp; property Core read ReadCore; property DocumentRels read ReadDocumentRels; property Themes read ReadThemes; property Document read ReadDocument; property endnotes read Readendnotes; property FontTable read ReadFontTable; property Footnotes read ReadFootnotes; property Settings read ReadSettings; property Styles read ReadStyles; property WebSettings read ReadWebSettings; property ContentTypes read ReadContentTypes; property ChartRels read ReadChartRels; property Charts read ReadCharts; property Comments read ReadComments; property Footers read ReadFooters; property Headers read ReadHeaders; property Numbering read ReadNumbering; property FooterRels read ReadFooterRels; property HeaderRels read ReadHeaderReals; function ReadRels(); function ReadApp(); function ReadCore(); function ReadDocumentRels(); function ReadThemes(_index); function ReadDocument(); function Readendnotes(); function ReadFontTable(); function ReadFootnotes(); function ReadSettings(); function ReadStyles(); function ReadWebSettings(); function ReadContentTypes(); function ReadChartRels(_index: integer); function ReadCharts(_index: integer); function ReadComments(); function ReadFooters(_index: integer); function ReadHeaders(_index: integer); function ReadNumbering(); function ReadFooterRels(_index: integer); function ReadHeaderReals(_index: integer); protected function NewObject(_name: string): tslobj;override; private // xml rels_: Relationships; app_: Properties; core_: CoreProperties; document_rels_: Relationships; theme_array_: array of Theme; document_: Document; endnotes_: Endnotes; font_table_: FontTable; footnotes_: Footnotes; settings_: Settings; styles_: Styles; web_settings_: WebSettings; content_types_: Types; chart_rels_array_: array of Relationships; chart_array_: array of ChartSpace; comments_: Comments; footer_array_: array of Ftr; header_array_: array of Hdr; numbering_: Numbering; header_rels_array_: array of Relationships; footer_rels_array_: array of Relationships; end; function Components.Create(); begin Class(TSComponentsBase).Create(); end; function Components.Init();override; begin conf_ := array ( "rels": array("_rels/.rels", "Relationships"), "app": array("docProps/app.xml", "Properties"), "core": array("docProps/core.xml", "cp:coreProperties"), "document_rels": array("word/_rels/document.xml.rels", "Relationships"), "theme": array("word/theme/theme%d.xml", "a:theme"), "document": array("word/document.xml", "w:document"), "endnotes": array("word/endnotes.xml", "w:endnotes"), "font_table": array("word/fontTable.xml", "w:fonts"), "footnotes": array("word/footnotes.xml", "w:footnotes"), "settings": array("word/settings.xml", "w:settings"), "styles": array("word/styles.xml", "w:styles"), "web_settings": array("word/webSettings.xml", "w:webSettings"), "content_types": array("[Content_Types].xml", "Types"), "chart_rels": array("word/charts/_rels/chart%d.xml.rels", "Relationships"), "chart": array("word/charts/chart%d.xml", "a:chartSpace"), "comments": array("word/comments.xml", "w:comments"), "footer": array("word/footer%d.xml", "w:ftr"), "header": array("word/header%d.xml", "w:hdr"), "numbering": array("word/numbering.xml", "w:numbering"), "header_rels": array("word/_rels/header%d.xml.rels", "Relationships"), "footer_rels": array("word/_rels/footer%d.xml.rels", "Relationships"), ); rels_ := nil; app_ := nil; core_ := nil; document_rels_ := nil; theme_array_ := array(); document_ := nil; endnotes_ := nil; font_table_ := nil; footnotes_ := nil; settings_ := nil; styles_ := nil; web_settings_ := nil; content_types_ := nil; chart_rels_array_ := array(); comments_ := nil; footer_array_ := array(); header_array_ := array(); numbering_ := nil; header_rels_array_ := array(); footer_rels_array_ := array(); end; function Components.NewObject(_name: string): tslobj;override; begin case _name of "rels", "document_rels", "chart_rels", "footer_rels", "header_rels": return new Relationships(); "app": return new Properties(); "core": return new CoreProperties(); "document": return new Document(); "endnotes": return new Endnotes(); "font_table": return new FontTable(); "footnotes": return new Footnotes(); "settings": return new Settings(); "styles": return new Styles(); "web_settings": return new WebSettings(); "theme": return new Theme(); "content_types": return new Types(); "chart": return new ChartSpace(); "comments": return new Comments(); "footer": return new Ftr(); "header": return new Hdr(); "numbering": return new Numbering(); end; end; function Components.ReadRels(); begin return {self.}GetProp(rels_, "rels"); end; function Components.ReadApp(); begin return {self.}GetProp(app_, "app"); end; function Components.ReadCore(); begin return {self.}GetProp(core_, "core"); end; function Components.ReadDocumentRels(); begin return {self.}GetProp(document_rels_, "document_rels"); end; function Components.ReadDocument(); begin return {self.}GetProp(document_, "document"); end; function Components.Readendnotes(); begin return {self.}GetProp(endnotes_, "endnotes"); end; function Components.ReadFontTable(); begin return {self.}GetProp(font_table_, "font_table"); end; function Components.ReadFootnotes(); begin return {self.}GetProp(footnotes_, "footnotes"); end; function Components.ReadSettings(); begin return {self.}GetProp(settings_, "settings"); end; function Components.ReadStyles(); begin return {self.}GetProp(styles_, "styles"); end; function Components.ReadWebSettings(); begin return {self.}GetProp(web_settings_, "web_settings"); end; function Components.ReadThemes(_index); begin return {self.}GetPropArr(theme_array_, "theme", _index); end; function Components.ReadContentTypes(); begin return {self.}GetProp(content_types_, "content_types"); end; function Components.ReadChartRels(_index: integer); begin return {self.}GetPropArr(chart_rels_array_, "chart_rels", _index); end; function Components.ReadCharts(_index: integer); begin return {self.}GetPropArr(chart_array_, "chart", _index); end; function Components.ReadComments(); begin return {self.}GetProp(comments_, "comments"); end; function Components.ReadHeaders(_index: integer); begin return {self.}GetPropArr(header_array_, "header", _index); end; function Components.ReadFooters(_index: integer); begin return {self.}GetPropArr(footer_array_, "footer", _index); end; function Components.ReadNumbering(); begin return {self.}GetProp(numbering_, "numbering"); end; function Components.ReadHeaderReals(_index: integer); begin return {self.}GetPropArr(header_rels_array_, "header_rels", _index); end; function Components.ReadFooterRels(_index: integer); begin return {self.}GetPropArr(footer_rels_array_, "footer_rels", _index); end;