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