This commit is contained in:
csh
2023-01-11 14:34:38 +08:00
parent d3e01ef4a5
commit e2db550f99
13 changed files with 448 additions and 296 deletions
+1 -1
View File
@@ -463,7 +463,7 @@ appProps.ScaleCrop := "true";
appProps.Company := "TS"; appProps.Company := "TS";
appProps.LinksUpToDate := "true"; appProps.LinksUpToDate := "true";
appProps.HyperlinksChanged := "true"; appProps.HyperlinksChanged := "true";
appProps.AppVersion := "1.000"; appProps.Version := "1.000";
appProps.Manager := "这是主管"; appProps.Manager := "这是主管";
//appProps.HyperlinkBase := "这是超链接基础"; //appProps.HyperlinkBase := "这是超链接基础";
excel.SetAppProps(appProps); excel.SetAppProps(appProps);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large Load Diff
+2 -4
View File
@@ -1,4 +1,4 @@
// Version 1.0.7 // Version 1.0.8
Type TSDocxFile = Class Type TSDocxFile = Class
///Version: V1.0 2022-09-20 ///Version: V1.0 2022-09-20
@@ -136,7 +136,7 @@ Type TSDocxFile = Class
return document_.Body().AddBreak(getPosNode(posOpt), 'column'); return document_.Body().AddBreak(getPosNode(posOpt), 'column');
End; End;
///删除指定段落 ///删除指定段落(表格、图片、图表、文本框等)
///posOpt: 段落位置,0 DOCX文件开头;-1 文件尾;N 第N段;posOpt段落 ///posOpt: 段落位置,0 DOCX文件开头;-1 文件尾;N 第N段;posOpt段落
///返回:true ///返回:true
Function DelParagraph(posOpt); Function DelParagraph(posOpt);
@@ -309,8 +309,6 @@ Type TSDocxFile = Class
c := TOfficeObj('TDocComment'); c := TOfficeObj('TDocComment');
c.p.Run.SetText( txt ); c.p.Run.SetText( txt );
c.Author := author; c.Author := author;
if author and not class(TSXml).IsUtf8() then
c.Author := class(TSXml).CurCodePageToUtf8(author);
c.ID := id; c.ID := id;
xmlfile.FirstChildElement('w:comments').InsertEndChild(c.Marshal()); xmlfile.FirstChildElement('w:comments').InsertEndChild(c.Marshal());
return c; return c;
+1 -1
View File
@@ -1,4 +1,4 @@
// Version 1.0.7 // Version 1.0.8
Type TSExcelFile = Class Type TSExcelFile = Class
///Version: V1.0 2022-08-08 ///Version: V1.0 2022-08-08
+4 -3
View File
@@ -161,6 +161,7 @@ public
rootNode := p.Root(); rootNode := p.Root();
p := p.Parent; p := p.Parent;
End; End;
if not ifObj(rootNode) then return nil;
attrs := GetAttrsEx(); attrs := GetAttrsEx();
lName := lowerCase(name); lName := lowerCase(name);
@@ -187,9 +188,9 @@ public
key := r['attrName'] ? r['attrName'] : r['attrEx'] ? r['attrEx'] : 'val'; key := r['attrName'] ? r['attrName'] : r['attrEx'] ? r['attrEx'] : 'val';
if r['nodeType'] = 'empty_string' then if r['nodeType'] = 'empty_string' then
begin begin
value := node.GetAttribute(key); val := node.GetAttribute(key);
if not value then return true; if not val then return true;
return value; return val;
end end
return node.GetAttribute(key);//返回属性 return node.GetAttribute(key);//返回属性
End; End;
+1 -1
View File
@@ -191,4 +191,4 @@ private
End; End;
hash_; hash_;
End; End;
+7 -6
View File
@@ -20,18 +20,19 @@ Type TTableContent = class
Begin Begin
defultFont := impl_.stdPr.rPr; defultFont := impl_.stdPr.rPr;
defultFont.rFont.cstheme := 'minorBidi'; defultFont.rFont.cstheme := 'minorBidi';
defultFont.rFont.eastAsia := '宋体'; defultFont.rFont.XMLeastAsia := '宋体';
defultFont.rFont.hAnsi := '宋体'; defultFont.rFont.XMLhAnsi := '宋体';
defultFont.rFont.ascii := '宋体'; defultFont.rFont.XMLascii := '宋体';
//defultFont.kern := 2; //defultFont.kern := 2;
defultFont.Size := 21; defultFont.Size := 21;
defultFont.SzCs := 24; defultFont.SzCs := 24;
defultFont.Lang := 'en-US'; defultFont.Lang := 'en-US';
defultFont.bidi := 'ar-SA'; defultFont.bidi := 'ar-SA';
defultFont.eastAsia := 'zh-CN'; defultFont.eastAsia := 'zh-CN';
defultFont.Color := 'DBDBDB';
defultFormat := impl_.stdPr; defultFormat := impl_.stdPr;
defultFormat.ID := integer(time()*24*3600); defultFormat.ID := integer(time()*24*3600);
defultFormat.Color := 'DBDBDB'; //defultFormat.Color := 'DBDBDB';
defultFormat.docPartObj.docPartGallery := 'Table of Contents'; defultFormat.docPartObj.docPartGallery := 'Table of Contents';
defultFormat.docPartObj.docPartUnique := 1; defultFormat.docPartObj.docPartUnique := 1;
//impl_.stdEndPr.rPr.Size := 20; //impl_.stdEndPr.rPr.Size := 20;
@@ -68,7 +69,7 @@ Type TTableContent = class
mParagraph.pPr.LeftChars := 0; mParagraph.pPr.LeftChars := 0;
mParagraph.pPr.LeftIndent := 0; mParagraph.pPr.LeftIndent := 0;
mParagraph.Run.T := '目录'; mParagraph.Run.T := '目录';
mParagraph.Run.rPr.Name := '宋体'; mParagraph.Run.rPr.SetName('宋体', true);
mParagraph.Run.rPr.Size := 21; mParagraph.Run.rPr.Size := 21;
mParagraph.Run.rPr.Bold := true; mParagraph.Run.rPr.Bold := true;
_AddStdContent(mParagraph); _AddStdContent(mParagraph);
@@ -154,7 +155,7 @@ Type TTableContent = class
//目录条目文字内容 //目录条目文字内容
r7 := p.AddRun(); r7 := p.AddRun();
r7.Font.Name := '宋体'; r7.Font.SetName('宋体', true);
numStr := ''; //数字项目编号 numStr := ''; //数字项目编号
if r[i]['numId'] then Begin if r[i]['numId'] then Begin
style := docx_.NumberingObject().NumberStyle(r[i]['numId']);//支持数字、字符串StyleId style := docx_.NumberingObject().NumberStyle(r[i]['numId']);//支持数字、字符串StyleId
+8
View File
@@ -1,5 +1,13 @@
# 更新日志 # 更新日志
## 2023-1-11
### V1.0.8
#### word
1. 修复`copyFormat``AddTableContent`
## 2023-1-10 ## 2023-1-10
### V1.0.7 ### V1.0.7