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
|
||||
///Version: V1.0 2022-09-20
|
||||
|
|
@ -381,6 +381,25 @@ Type TSDocxFile = Class
|
|||
return nil;
|
||||
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内容
|
||||
///docxObj: TSDocxFile对象
|
||||
///posOpt: 段落位置,0 在DOCX文件开头;-1 文件尾;N 在第N段之后;XmlNode节点对象或DocObject对象 在posOpt之后新添加图片
|
||||
|
|
@ -388,11 +407,8 @@ Type TSDocxFile = Class
|
|||
///TDocxCopy.GetCopiedTable() 返回复制的对象表格数组
|
||||
///TDocxCopy.GetCopiedParagraph() 返回复制对象的段落数组
|
||||
///TDocxCopy.GetCopiedDrawing() 返回复制对象的图表数组
|
||||
Function InsertFile(alias, fileName, posOpt);
|
||||
Function InsertFile(docxObj, 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);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Version 1.4.8
|
||||
// Version 1.4.9
|
||||
|
||||
Type TSExcelFile = Class
|
||||
///Version: V1.0 2022-08-08
|
||||
|
|
|
|||
|
|
@ -17,27 +17,19 @@ public
|
|||
Begin
|
||||
return RootObj;
|
||||
End
|
||||
|
||||
|
||||
Function Update();
|
||||
Begin
|
||||
if ifObj(RootObj) then Begin
|
||||
arr := Marshal();
|
||||
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
|
||||
class(TSXml).UpdateNode(curNode, arr['attributes'], arr['children']);
|
||||
End;
|
||||
End;
|
||||
End;
|
||||
|
||||
Function HandleAttrs(); virtual;
|
||||
Begin
|
||||
End
|
||||
|
||||
Function HandleChildren(); virtual;
|
||||
Begin
|
||||
End
|
||||
|
||||
|
||||
Function GetAttrs(); virtual;
|
||||
Begin
|
||||
return ExtAttr;
|
||||
|
|
@ -258,7 +250,6 @@ public
|
|||
NodeName;
|
||||
ExtAttr;
|
||||
ExtNodes;
|
||||
//Parent;
|
||||
ReplaceArr;
|
||||
RootObj; // xml node
|
||||
NodeUri:string;
|
||||
|
|
|
|||
Loading…
Reference in New Issue