From ea528f3094706cb681ad0d4f93dd7b4bab42d46d Mon Sep 17 00:00:00 2001 From: csh Date: Fri, 7 Nov 2025 14:24:12 +0800 Subject: [PATCH] v1.8.4 --- funcext/TSOffice/TOfficeObj.tsf | 16 +++++++++++----- funcext/TSOffice/TSDocxFile.tsf | 2 +- funcext/TSOffice/TSXlsxFile.tsf | 2 +- 更新日志.md | 8 ++++++++ 4 files changed, 21 insertions(+), 7 deletions(-) diff --git a/funcext/TSOffice/TOfficeObj.tsf b/funcext/TSOffice/TOfficeObj.tsf index 34ef80e..c182692 100644 --- a/funcext/TSOffice/TOfficeObj.tsf +++ b/funcext/TSOffice/TOfficeObj.tsf @@ -1,4 +1,4 @@ -// Version 1.8.3 +// Version 1.8.4 Function TOfficeObj(n); Begin case lowercase(n) of @@ -15093,10 +15093,16 @@ Type TTable = Class(DocObject, TTableImpl) for row:=top2 to bottom2 do Begin c := Cell(row, left2); c.mergeSpan_ := val; - gridSpan := class(TSXml).GetNode(c.node_, 'w:tcPr/w:gridSpan', true); - gridSpan.SetAttribute('w:val', val); - node := class(TSXml).GetNode(c.node_, 'w:tcPr/w:vMerge', true); - node.SetAttribute('w:val', row=top2 ? 'restart' : 'continue'); + if left2 <> right2 then + begin + gridSpan := class(TSXml).GetNode(c.node_, 'w:tcPr/w:gridSpan', true); + gridSpan.SetAttribute('w:val', val); + end + if top2 <> bottom2 then + begin + node := class(TSXml).GetNode(c.node_, 'w:tcPr/w:vMerge', true); + node.SetAttribute('w:val', row=top2 ? 'restart' : 'continue'); + end if row <> top2 then Begin if not del then theCell.Append(c); diff --git a/funcext/TSOffice/TSDocxFile.tsf b/funcext/TSOffice/TSDocxFile.tsf index 6c144df..2d41adf 100644 --- a/funcext/TSOffice/TSDocxFile.tsf +++ b/funcext/TSOffice/TSDocxFile.tsf @@ -1,4 +1,4 @@ -// Version 1.8.3 +// Version 1.8.4 Type TSDocxFile = Class ///Version: V1.0 2022-09-20 ///适用于 Microsoft Word docx格式文件 diff --git a/funcext/TSOffice/TSXlsxFile.tsf b/funcext/TSOffice/TSXlsxFile.tsf index f5efeb8..713b8a8 100644 --- a/funcext/TSOffice/TSXlsxFile.tsf +++ b/funcext/TSOffice/TSXlsxFile.tsf @@ -1,4 +1,4 @@ -// Version 1.8.3 +// Version 1.8.4 Type TSXlsxFile = Class ///Version: V1.0 2022-08-08 ///适用于 Microsoft Excel? 2007 及以上版本创建的电子表格文档。支持 XLSX / XLSM / XLTM / XLTX 等多种文档格式。 diff --git a/更新日志.md b/更新日志.md index 608cb4d..34336d0 100644 --- a/更新日志.md +++ b/更新日志.md @@ -1,5 +1,13 @@ # 更新日志 +## 2025-11-07 + +### V1.8.4 + +#### word + +1. 修复合并单元格时候设置属性不规范 + ## 2025-10-30 ### V1.8.3