This commit is contained in:
csh 2024-12-23 11:07:05 +08:00
parent 2d423ca1fb
commit fdd2bd0fef
5 changed files with 18 additions and 3 deletions

View File

@ -1,4 +1,4 @@
// Version 1.7.3
// Version 1.7.4
Function TOfficeObj(n);
Begin
case lowercase(n) of

View File

@ -1,4 +1,4 @@
// Version 1.7.3
// Version 1.7.4
Type TSDocxFile = Class
///Version: V1.0 2022-09-20
///适用于 Microsoft Word docx格式文件
@ -390,6 +390,7 @@ Type TSDocxFile = Class
///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组
Function InsertFile(alias, fileName, posOpt);overload;
Begin
document_.AddNameSpace('w16du', 'http://schemas.microsoft.com/office/word/2023/wordml/word16du');
docxObj := new TSDocxFile();
[err, msg] := docxObj.OpenFile(alias, fileName);
if err then return array(err, msg);
@ -408,6 +409,7 @@ Type TSDocxFile = Class
///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组
Function InsertFile(docxObj, posOpt);overload;
Begin
document_.AddNameSpace('w16du', 'http://schemas.microsoft.com/office/word/2023/wordml/word16du');
copy_obj := new TDocxCopy(self, docxObj);
copy_obj.Init();
copy_obj.Copy(posOpt);

View File

@ -1,4 +1,4 @@
// Version 1.7.3
// Version 1.7.4
Type TSXlsxFile = Class
///Version: V1.0 2022-08-08
///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。

View File

@ -21,6 +21,11 @@ Type docxDocument = Class
return body_;
End;
Function AddNameSpace(prefix, uri);
Begin
root_.SetAttribute('xmlns:' + prefix, uri);
End;
Function GetBookMarkID();
Begin
if bookmarkid_ < 0 then Begin

View File

@ -1,5 +1,13 @@
# 更新日志
## 2024-12-23
### V1.7.4
### word
1. `insertfile`时候默认添加`w16du`命名空间
## 2024-12-05
### V1.7.3