v1.6.6
This commit is contained in:
parent
a3df0d5df9
commit
fb22cf9b0a
|
|
@ -73,7 +73,7 @@ content := docx.AddTableContent(paragraphTitle, 1, 3);
|
|||
docx.AddPageBreak(content.node_);
|
||||
|
||||
|
||||
v := docx.SaveAs('', TOfficeApi().CurCodePageToGBK('DocxFile使用帮助.docx'));
|
||||
v := docx.SaveAs('', 'DocxFile使用帮助.docx');
|
||||
println('Test Over!\n Save {}: {},time={}秒', file, v, mtoc);
|
||||
|
||||
//info := GetProfilerInfo(true);
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
path := ExtractFileDir(ExtractFileDir(PluginPath()));
|
||||
{$IFNDEF Win32}
|
||||
path := path + '\\funcext\\TSOffice\\TSXlsxFile.tsf';
|
||||
{$ELSE}
|
||||
path := path + '/funcext/TSOffice/TSXlsxFile.tsf';
|
||||
{$ELSE}
|
||||
path := path + '\\funcext\\TSOffice\\TSXlsxFile.tsf';
|
||||
{$ENDIF}
|
||||
funcs := LoadClassInfo(path);
|
||||
|
||||
|
|
@ -43,6 +43,7 @@ PrintSuccess("GetCellRichText", testing++);
|
|||
|
||||
file.MergeCell('XlsxFile', 'A1', 'C1');
|
||||
PrintSuccess("MergeCell", testing++);
|
||||
file.SetRowHeight('XlsxFile', 1, 60);
|
||||
|
||||
|
||||
style := TOfficeObj('TStyle');
|
||||
|
|
@ -138,7 +139,7 @@ End
|
|||
file.SetColWidth('Functions', 'A', 'A', 120);
|
||||
PrintSuccess('SetColWidth', testing++);
|
||||
|
||||
saveName := utf8toansi("XlsxFile使用帮助.xlsx");
|
||||
saveName := "XlsxFile使用帮助.xlsx";
|
||||
[err, errinfo] := file.SaveAs('', saveName);
|
||||
if err then
|
||||
return PrintError("SaveAs", err, errinfo);
|
||||
|
|
@ -320,6 +321,7 @@ Begin
|
|||
excel.SetCellValue(sheet_name, cell_1, name);
|
||||
excel.MergeCell(sheet_name, cell_1, cell_2);
|
||||
excel.SetCellStyle(sheet_name, cell_1, cell_2, styleid1);
|
||||
excel.SetRowHeight(sheet_name, row, 25);
|
||||
row++;
|
||||
|
||||
desc_arr := obj_info[i]['Desc'];
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
|||
Subproject commit a68cfb01d7f8f722987e7c74a78edc7371c810e5
|
||||
Subproject commit 0aa9639ae0ebb09286bcf6525bafb51e2a0239e9
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
// Version 1.6.5
|
||||
// Version 1.6.6
|
||||
Function TOfficeObj(n);
|
||||
Begin
|
||||
case lowercase(n) of
|
||||
|
|
@ -5996,6 +5996,7 @@ type TwpPr=class(NodeInfo)
|
|||
cnfStyle := new TwCnfStyle(self, 'w:cnfStyle');
|
||||
Bdr := new TpBdr(self, 'w:pBdr');
|
||||
Shading := new TwShading(self, 'w:shd');
|
||||
SectPr := new TDocSectionImpl(self, 'w:sectPr');
|
||||
//TODO...
|
||||
End;
|
||||
|
||||
|
|
@ -6008,6 +6009,7 @@ type TwpPr=class(NodeInfo)
|
|||
cnfStyle.InitRootNode(node);
|
||||
Bdr.InitRootNode(node);
|
||||
Shading.InitRootNode(node);
|
||||
SectPr.InitRootNode(node);
|
||||
End;
|
||||
|
||||
Function GetAttrs(); override;
|
||||
|
|
@ -6064,6 +6066,7 @@ type TwpPr=class(NodeInfo)
|
|||
,('field':'Shading','name':Shading.NodeName,'obj':Shading,'attrEx':'','nodeType':'','attrName':'', 'desc':'表头底纹', 'class':'TwShading')
|
||||
,('field':'TextboxTightWrap','name':'w:textboxTightWrap','obj':TextboxTightWrap,'attrEx':'w:val','nodeType':'','attrName':'', 'desc':'文本环绕形状或文本框的紧密程度', 'class':'')
|
||||
,('field':'WordWrap','name':'w:wordWrap','obj':WordWrap,'attrEx':'w:val','nodeType':'','attrName':'', 'desc':'是否在指定段落或文本框架的西文单词中间断字换行', 'class':'')
|
||||
,('field':'SectPr','name':SectPr.NodeName,'obj':SectPr,'attrEx':'','nodeType':'','attrName':'', 'desc':'文字边框', 'class':'TDocSectionImpl')
|
||||
) union ExtNodes;
|
||||
End;
|
||||
|
||||
|
|
@ -6117,6 +6120,7 @@ type TwpPr=class(NodeInfo)
|
|||
Shading;
|
||||
TextboxTightWrap;
|
||||
WordWrap;
|
||||
SectPr;
|
||||
End;
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
|
@ -7638,9 +7642,9 @@ type TCol=class(NodeInfo)
|
|||
End;
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
/// TCols
|
||||
/// TColsImpl
|
||||
///////////////////////////////////////////////////////////////
|
||||
type TCols=class(NodeInfo)
|
||||
type TColsImpl=class(NodeInfo)
|
||||
Function Create(); overload;
|
||||
Begin
|
||||
Create(nil, 'w:cols');
|
||||
|
|
@ -13359,7 +13363,7 @@ Type TDocumentBody = Class(DocObject)
|
|||
p := new TParagraph();
|
||||
p.pPr.NewChildNode( array("field":"", "name":"w:sectPr", "obj":section, "attrEx":"", "nodeType":"") );
|
||||
p := AddParagraph(p, posOpt, '');//段落对象
|
||||
return new TDocSection(p.node_.FirstChildElement('w:sectPr'), -2, zipfile_);
|
||||
return new TDocSection(p.node_.FirstChildElement('w:pPr').FirstChildElement('w:sectPr'), -2, zipfile_);
|
||||
End;
|
||||
|
||||
Function ExecInnerTSL(docx);
|
||||
|
|
@ -14173,6 +14177,16 @@ Type TDocHeaderFooter = Class(TDocumentBody)
|
|||
xmlObj_;
|
||||
End;
|
||||
|
||||
Type TCols = Class(TColsImpl)
|
||||
Function AddCol();
|
||||
Begin
|
||||
o := new TCol();
|
||||
NewChildNode( array("field":"", "name":"w:col", "obj":o, "attrEx":"", "nodeType":"") );
|
||||
return o;
|
||||
End;
|
||||
|
||||
End;
|
||||
|
||||
Type TDocSection = Class(DocObject, TDocSectionImpl)
|
||||
Function Create();overload;
|
||||
Begin
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Version 1.6.5
|
||||
// Version 1.6.6
|
||||
Type TSDocxFile = Class
|
||||
///Version: V1.0 2022-09-20
|
||||
///适用于 Microsoft Word docx格式文件
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Version 1.6.5
|
||||
// Version 1.6.6
|
||||
Type TSXlsxFile = Class
|
||||
///Version: V1.0 2022-08-08
|
||||
///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。
|
||||
|
|
|
|||
Loading…
Reference in New Issue