1. 支持表格列合并

2. 支持表头背景填充样式
This commit is contained in:
csh
2024-08-14 11:05:47 +08:00
parent 9dc7a66b62
commit 1cd72f6247
6 changed files with 124 additions and 47 deletions
+13
View File
@@ -5,17 +5,20 @@ public
function GetStylesAdapter(): StylesAdapter;
function GetDocumentRelsAdapter(): RelationShipsAdapter;
function GetNumberingWare(): TSNumberingWare;
function GetTblStylePrByType(style_id: string; type: string): TblStylePr;
private
styles_deserialize_flag_;
styles_adapter_;
document_rels_adapter_;
numbering_ware_;
tbl_style_pr_hash_;
end;
function TSDocxComponentsWare.Create();
begin
class(Components).Create();
tbl_style_pr_hash_ := array();
end;
function TSDocxComponentsWare.GetStyles(): Styles;
@@ -50,3 +53,13 @@ begin
return numbering_ware_;
end;
function TSDocxComponentsWare.GetTblStylePrByType(style_id: string; type: string): TblStylePr;
begin
if tbl_style_pr_hash_[style_id][type] then return tbl_style_pr_hash_[style_id][type];
styles_adapter := {self.}GetStylesAdapter();
style := styles_adapter.GetStyleByStyleId(style_id);
style := new StyleAdapter(style);
tbl_style_pr := style.GetTblStylePrByType(type);
tbl_style_pr_hash_[style_id][type] := tbl_style_pr;
return tbl_style_pr;
end;
+1 -1
View File
@@ -30,5 +30,5 @@ end;
function TSSectWare.AddElement(element: tslobj);
begin
Elements[length(Elements)] := element;
{self.}Elements[length({self.}Elements)] := element;
end;