v1.4.9
This commit is contained in:
parent
8cd87118d5
commit
de0af521bc
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.4.8
|
// Version 1.4.9
|
||||||
|
|
||||||
Type TSDocxFile = Class
|
Type TSDocxFile = Class
|
||||||
///Version: V1.0 2022-09-20
|
///Version: V1.0 2022-09-20
|
||||||
|
|
@ -381,6 +381,25 @@ Type TSDocxFile = Class
|
||||||
return nil;
|
return nil;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
///复制Word内容
|
||||||
|
///alias: string,文件目录别名
|
||||||
|
///fileName: string,文件名
|
||||||
|
///posOpt: 段落位置,0 在DOCX文件开头;-1 文件尾;N 在第N段之后;XmlNode节点对象或DocObject对象 在posOpt之后新添加图片
|
||||||
|
///返回: [err, TDocxCopy对象]
|
||||||
|
///TDocxCopy.GetCopiedTable() 返回复制的对象表格数组
|
||||||
|
///TDocxCopy.GetCopiedParagraph() 返回复制对象的段落数组
|
||||||
|
///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组
|
||||||
|
Function InsertFile(alias, fileName, posOpt);overload;
|
||||||
|
Begin
|
||||||
|
docxObj := new TSDocxFile();
|
||||||
|
[err, msg] := docxObj.OpenFile(alias, fileName);
|
||||||
|
if err then return array(err, msg);
|
||||||
|
copy_obj := new TDocxCopy(self, docxObj);
|
||||||
|
copy_obj.Init();
|
||||||
|
copy_obj.Copy(posOpt);
|
||||||
|
return array(0, copy_obj);
|
||||||
|
End;
|
||||||
|
|
||||||
///复制Word内容
|
///复制Word内容
|
||||||
///docxObj: TSDocxFile对象
|
///docxObj: TSDocxFile对象
|
||||||
///posOpt: 段落位置,0 在DOCX文件开头;-1 文件尾;N 在第N段之后;XmlNode节点对象或DocObject对象 在posOpt之后新添加图片
|
///posOpt: 段落位置,0 在DOCX文件开头;-1 文件尾;N 在第N段之后;XmlNode节点对象或DocObject对象 在posOpt之后新添加图片
|
||||||
|
|
@ -388,11 +407,8 @@ Type TSDocxFile = Class
|
||||||
///TDocxCopy.GetCopiedTable() 返回复制的对象表格数组
|
///TDocxCopy.GetCopiedTable() 返回复制的对象表格数组
|
||||||
///TDocxCopy.GetCopiedParagraph() 返回复制对象的段落数组
|
///TDocxCopy.GetCopiedParagraph() 返回复制对象的段落数组
|
||||||
///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组
|
///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组
|
||||||
Function InsertFile(alias, fileName, posOpt);
|
Function InsertFile(docxObj, posOpt);overload;
|
||||||
Begin
|
Begin
|
||||||
docxObj := new TSDocxFile();
|
|
||||||
[err, msg] := docxObj.OpenFile(alias, fileName);
|
|
||||||
if err then return array(err, msg);
|
|
||||||
copy_obj := new TDocxCopy(self, docxObj);
|
copy_obj := new TDocxCopy(self, docxObj);
|
||||||
copy_obj.Init();
|
copy_obj.Init();
|
||||||
copy_obj.Copy(posOpt);
|
copy_obj.Copy(posOpt);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Version 1.4.8
|
// Version 1.4.9
|
||||||
|
|
||||||
Type TSExcelFile = Class
|
Type TSExcelFile = Class
|
||||||
///Version: V1.0 2022-08-08
|
///Version: V1.0 2022-08-08
|
||||||
|
|
|
||||||
|
|
@ -23,21 +23,13 @@ public
|
||||||
if ifObj(RootObj) then Begin
|
if ifObj(RootObj) then Begin
|
||||||
arr := Marshal();
|
arr := Marshal();
|
||||||
if length(arr['attributes']) or length(arr['children']) then Begin
|
if length(arr['attributes']) or length(arr['children']) then Begin
|
||||||
curNode := class(TSXml).GetNode(RootObj, NodeUri);
|
curNode := class(TSXml).GetNode(RootObj, NodeUri, 'end');
|
||||||
if ifObj(curNode) then
|
if ifObj(curNode) then
|
||||||
class(TSXml).UpdateNode(curNode, arr['attributes'], arr['children']);
|
class(TSXml).UpdateNode(curNode, arr['attributes'], arr['children']);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function HandleAttrs(); virtual;
|
|
||||||
Begin
|
|
||||||
End
|
|
||||||
|
|
||||||
Function HandleChildren(); virtual;
|
|
||||||
Begin
|
|
||||||
End
|
|
||||||
|
|
||||||
Function GetAttrs(); virtual;
|
Function GetAttrs(); virtual;
|
||||||
Begin
|
Begin
|
||||||
return ExtAttr;
|
return ExtAttr;
|
||||||
|
|
@ -258,7 +250,6 @@ public
|
||||||
NodeName;
|
NodeName;
|
||||||
ExtAttr;
|
ExtAttr;
|
||||||
ExtNodes;
|
ExtNodes;
|
||||||
//Parent;
|
|
||||||
ReplaceArr;
|
ReplaceArr;
|
||||||
RootObj; // xml node
|
RootObj; // xml node
|
||||||
NodeUri:string;
|
NodeUri:string;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue