v1.8.5
This commit is contained in:
parent
ea528f3094
commit
bbe0821f68
|
|
@ -1,4 +1,4 @@
|
|||
// Version 1.8.4
|
||||
// Version 1.8.5
|
||||
Function TOfficeObj(n);
|
||||
Begin
|
||||
case lowercase(n) of
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Version 1.8.4
|
||||
// Version 1.8.5
|
||||
Type TSDocxFile = Class
|
||||
///Version: V1.0 2022-09-20
|
||||
///适用于 Microsoft Word docx格式文件
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Version 1.8.4
|
||||
// Version 1.8.5
|
||||
Type TSXlsxFile = Class
|
||||
///Version: V1.0 2022-08-08
|
||||
///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。
|
||||
|
|
|
|||
|
|
@ -341,27 +341,32 @@ private
|
|||
begin
|
||||
cell := table.Cell(r, c);
|
||||
if not cell then continue;
|
||||
node := cell.node_;
|
||||
if (tbl := node.FirstChildElement('w:tbl')) then
|
||||
node := cell.node_.FirstChildElement();
|
||||
while ifObj(node) do
|
||||
begin
|
||||
obj := TOfficeObj('TTable');
|
||||
obj.Init(tbl);
|
||||
SetTableInfo(obj);
|
||||
end
|
||||
else if (p := node.FirstChildElement('w:p')) then
|
||||
begin
|
||||
draw := class(TSXml).GetNode(p, 'w:r/w:drawing');
|
||||
if ifObj(draw) then
|
||||
name := node.GetName();
|
||||
if name = 'w:tbl' then
|
||||
begin
|
||||
obj := TOfficeObj('TPicture');
|
||||
obj.Init(p);
|
||||
SetDrawingInfo(obj);
|
||||
obj := TOfficeObj('TTable');
|
||||
obj.Init(node);
|
||||
SetTableInfo(obj);
|
||||
end
|
||||
else begin
|
||||
obj := TOfficeObj('TParagraph');
|
||||
obj.Init(p);
|
||||
SetParagraphInfo(obj);
|
||||
else if name = "w:p" then
|
||||
begin
|
||||
draw := class(TSXml).GetNode(node, 'w:r/w:drawing');
|
||||
if ifObj(draw) then
|
||||
begin
|
||||
obj := TOfficeObj('TPicture');
|
||||
obj.Init(node);
|
||||
SetDrawingInfo(obj);
|
||||
end
|
||||
else begin
|
||||
obj := TOfficeObj('TParagraph');
|
||||
obj.Init(node);
|
||||
SetParagraphInfo(obj);
|
||||
end
|
||||
end
|
||||
node := node.NextElement();
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -994,7 +994,7 @@ Type xlsxWorkBook = Class
|
|||
col_node := work_node.FirstChildElement('cols');
|
||||
default_width := work_node.FirstChildElement('sheetFormatPr').GetAttribute('defaultColWidth');
|
||||
default_width := trystrtofloat(default_width, r) ? r: -1;
|
||||
if not ifObj(col_node) then return array(0, default_width);
|
||||
if not ifObj(col_node) then return nil;
|
||||
|
||||
col_number := ColumnNameToNumber(col)[1];
|
||||
node := col_node.FirstChildElement('col');
|
||||
|
|
|
|||
Loading…
Reference in New Issue