diff --git a/DocxFile使用帮助.docx b/DocxFile使用帮助.docx index be5fcef..47a36d6 100644 Binary files a/DocxFile使用帮助.docx and b/DocxFile使用帮助.docx differ diff --git a/funcext/TSOffice/TOfficeObj.tsf b/funcext/TSOffice/TOfficeObj.tsf index 744d1df..2e08770 100644 --- a/funcext/TSOffice/TOfficeObj.tsf +++ b/funcext/TSOffice/TOfficeObj.tsf @@ -1,4 +1,4 @@ -// Version 1.4.2 +// Version 1.4.3 Function TOfficeObj(n); Begin @@ -11078,6 +11078,25 @@ Type TParagraph = Class(DocObject, TParagraphImpl) markEnd.SetAttribute('w:id', bookMarkID); return name; End; + + ///判断是否为空段落 + ///返回: bool + Function Empty(); + Begin + if ifObj(node_) then + begin + sub_node := node_.FirstChildElement(); + if not ifObj(sub_node) then return true; + // 兼容wps + sub_node2 := sub_node.NextElement(); + if sub_node.GetName() = 'w:bookmarkStart' and ifObj(sub_node2) and sub_node2.GetName() = 'w:bookmarkEnd' then + return true; + // 兼容word + if sub_node.GetName() = 'w:pPr' and not ifObj(sub_node2) then + return true; + end + return false; + End; Function CopyRunFormat(del, toRunNode); Begin diff --git a/funcext/TSOffice/TSDocxFile.tsf b/funcext/TSOffice/TSDocxFile.tsf index 48cc169..5cd7506 100644 --- a/funcext/TSOffice/TSDocxFile.tsf +++ b/funcext/TSOffice/TSDocxFile.tsf @@ -1,4 +1,4 @@ -// Version 1.4.2 +// Version 1.4.3 Type TSDocxFile = Class ///Version: V1.0 2022-09-20 diff --git a/funcext/TSOffice/TSExcelFile.tsf b/funcext/TSOffice/TSExcelFile.tsf index 0542693..5102674 100644 --- a/funcext/TSOffice/TSExcelFile.tsf +++ b/funcext/TSOffice/TSExcelFile.tsf @@ -1,4 +1,4 @@ -// Version 1.4.2 +// Version 1.4.3 Type TSExcelFile = Class ///Version: V1.0 2022-08-08 diff --git a/更新日志.md b/更新日志.md index 8c5459a..98b7f91 100644 --- a/更新日志.md +++ b/更新日志.md @@ -1,5 +1,13 @@ # 更新日志 +## 2023-8-22 + +### V1.4.3 + +#### word + +支持段落判空`TParagraph.Empty()` + ## 2023-8-18 ### V1.4.2