❗重大更新:设计方式由namspace转变成unit
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
type Components = class(TSComponentsBase)
|
||||
type DocxComponents = class(TSComponentsBase)
|
||||
uses DocxML, DrawingML, SharedML;
|
||||
public
|
||||
function Create();
|
||||
function Init();override;
|
||||
@@ -76,12 +77,12 @@ private
|
||||
|
||||
end;
|
||||
|
||||
function Components.Create();
|
||||
function DocxComponents.Create();
|
||||
begin
|
||||
Class(TSComponentsBase).Create();
|
||||
end;
|
||||
|
||||
function Components.Init();override;
|
||||
function DocxComponents.Init();override;
|
||||
begin
|
||||
conf_ := array
|
||||
(
|
||||
@@ -129,7 +130,7 @@ begin
|
||||
footer_rels_array_ := array();
|
||||
end;
|
||||
|
||||
function Components.NewObject(_name: string): tslobj;override;
|
||||
function DocxComponents.NewObject(_name: string): tslobj;override;
|
||||
begin
|
||||
case _name of
|
||||
"rels", "document_rels", "chart_rels", "footer_rels", "header_rels":
|
||||
@@ -152,8 +153,6 @@ begin
|
||||
return new Styles();
|
||||
"web_settings":
|
||||
return new WebSettings();
|
||||
"theme":
|
||||
return new Theme();
|
||||
"content_types":
|
||||
return new Types();
|
||||
"chart":
|
||||
@@ -166,110 +165,113 @@ begin
|
||||
return new Hdr();
|
||||
"numbering":
|
||||
return new Numbering();
|
||||
"theme":
|
||||
return new Theme();
|
||||
end;
|
||||
end;
|
||||
|
||||
function Components.ReadRels();
|
||||
function DocxComponents.ReadRels();
|
||||
begin
|
||||
return {self.}GetProp(rels_, "rels");
|
||||
end;
|
||||
|
||||
function Components.ReadApp();
|
||||
function DocxComponents.ReadApp();
|
||||
begin
|
||||
return {self.}GetProp(app_, "app");
|
||||
end;
|
||||
|
||||
function Components.ReadCore();
|
||||
function DocxComponents.ReadCore();
|
||||
begin
|
||||
return {self.}GetProp(core_, "core");
|
||||
end;
|
||||
|
||||
function Components.ReadDocumentRels();
|
||||
function DocxComponents.ReadDocumentRels();
|
||||
begin
|
||||
return {self.}GetProp(document_rels_, "document_rels");
|
||||
end;
|
||||
|
||||
function Components.ReadDocument();
|
||||
function DocxComponents.ReadDocument();
|
||||
begin
|
||||
return {self.}GetProp(document_, "document");
|
||||
end;
|
||||
|
||||
function Components.ReadEndnotes();
|
||||
function DocxComponents.ReadEndnotes();
|
||||
begin
|
||||
return {self.}GetProp(endnotes_, "endnotes");
|
||||
end;
|
||||
|
||||
function Components.ReadFontTable();
|
||||
function DocxComponents.ReadFontTable();
|
||||
begin
|
||||
return {self.}GetProp(font_table_, "font_table");
|
||||
end;
|
||||
|
||||
function Components.ReadFootnotes();
|
||||
function DocxComponents.ReadFootnotes();
|
||||
begin
|
||||
return {self.}GetProp(footnotes_, "footnotes");
|
||||
end;
|
||||
|
||||
function Components.ReadSettings();
|
||||
function DocxComponents.ReadSettings();
|
||||
begin
|
||||
return {self.}GetProp(settings_, "settings");
|
||||
end;
|
||||
|
||||
function Components.ReadStyles();
|
||||
function DocxComponents.ReadStyles();
|
||||
begin
|
||||
return {self.}GetProp(styles_, "styles");
|
||||
end;
|
||||
|
||||
function Components.ReadWebSettings();
|
||||
function DocxComponents.ReadWebSettings();
|
||||
begin
|
||||
return {self.}GetProp(web_settings_, "web_settings");
|
||||
end;
|
||||
|
||||
function Components.ReadThemes(_index);
|
||||
function DocxComponents.ReadThemes(_index);
|
||||
begin
|
||||
uses DrawingXml;
|
||||
return {self.}GetPropArr(theme_array_, "theme", _index);
|
||||
end;
|
||||
|
||||
function Components.ReadContentTypes();
|
||||
function DocxComponents.ReadContentTypes();
|
||||
begin
|
||||
return {self.}GetProp(content_types_, "content_types");
|
||||
end;
|
||||
|
||||
function Components.ReadChartRels(_index: integer);
|
||||
function DocxComponents.ReadChartRels(_index: integer);
|
||||
begin
|
||||
return {self.}GetPropArr(chart_rels_array_, "chart_rels", _index);
|
||||
end;
|
||||
|
||||
function Components.ReadCharts(_index: integer);
|
||||
function DocxComponents.ReadCharts(_index: integer);
|
||||
begin
|
||||
return {self.}GetPropArr(chart_array_, "chart", _index);
|
||||
end;
|
||||
|
||||
function Components.ReadComments();
|
||||
function DocxComponents.ReadComments();
|
||||
begin
|
||||
return {self.}GetProp(comments_, "comments");
|
||||
end;
|
||||
|
||||
function Components.ReadHeaders(_index: integer);
|
||||
function DocxComponents.ReadHeaders(_index: integer);
|
||||
begin
|
||||
return {self.}GetPropArr(header_array_, "header", _index);
|
||||
end;
|
||||
|
||||
function Components.ReadFooters(_index: integer);
|
||||
function DocxComponents.ReadFooters(_index: integer);
|
||||
begin
|
||||
return {self.}GetPropArr(footer_array_, "footer", _index);
|
||||
end;
|
||||
|
||||
function Components.ReadNumbering();
|
||||
function DocxComponents.ReadNumbering();
|
||||
begin
|
||||
return {self.}GetProp(numbering_, "numbering");
|
||||
end;
|
||||
|
||||
function Components.ReadHeaderReals(_index: integer);
|
||||
function DocxComponents.ReadHeaderReals(_index: integer);
|
||||
begin
|
||||
return {self.}GetPropArr(header_rels_array_, "header_rels", _index);
|
||||
end;
|
||||
|
||||
function Components.ReadFooterRels(_index: integer);
|
||||
function DocxComponents.ReadFooterRels(_index: integer);
|
||||
begin
|
||||
return {self.}GetPropArr(footer_rels_array_, "footer_rels", _index);
|
||||
end;
|
||||
File diff suppressed because it is too large
Load Diff
+13146
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user