diff --git a/funcext/TSOffice/TOfficeObj.tsf b/funcext/TSOffice/TOfficeObj.tsf index 567b9a0..f99f196 100644 --- a/funcext/TSOffice/TOfficeObj.tsf +++ b/funcext/TSOffice/TOfficeObj.tsf @@ -1,4 +1,4 @@ -// Version 1.2.3 +// Version 1.2.4 Function TOfficeObj(n); Begin @@ -3704,7 +3704,7 @@ type TBorders=class(NodeInfo) Function GetAttrs(); override; Begin HandleAttrs(); - return ExtAttr; + return array(("DiagonalDown", "diagonalDown", XMLDiagonalDown, ""),("DiagonalUp", "diagonalUp", XMLDiagonalUp, "")) union ExtAttr; End; Function GetChildren(); override; @@ -3715,12 +3715,12 @@ type TBorders=class(NodeInfo) ,("field":"Top","name":Top.NodeName,"obj":Top,"attrEx":"","nodeType":"","attrName":"", "desc":"", "class":"TBorder") ,("field":"Bottom","name":Bottom.NodeName,"obj":Bottom,"attrEx":"","nodeType":"","attrName":"", "desc":"", "class":"TBorder") ,("field":"Diagonal","name":Diagonal.NodeName,"obj":Diagonal,"attrEx":"","nodeType":"","attrName":"", "desc":"", "class":"TBorder") - ,("field":"DiagonalDown","name":"diagonalDown","obj":XMLDiagonalDown,"attrEx":"","nodeType":"","attrName":"", "desc":"", "class":"") - ,("field":"DiagonalUp","name":"diagonalUp","obj":XMLDiagonalUp,"attrEx":"","nodeType":"","attrName":"", "desc":"", "class":"") ) union ExtNodes; End; //Attributes + XMLDiagonalDown; + XMLDiagonalUp; //Nodes Left; @@ -3728,8 +3728,6 @@ type TBorders=class(NodeInfo) Top; Bottom; Diagonal; - XMLDiagonalDown; - XMLDiagonalUp; End; /////////////////////////////////////////////////////////////// diff --git a/funcext/TSOffice/TSDocxFile.tsf b/funcext/TSOffice/TSDocxFile.tsf index 6026209..7186130 100644 --- a/funcext/TSOffice/TSDocxFile.tsf +++ b/funcext/TSOffice/TSDocxFile.tsf @@ -1,4 +1,4 @@ -// Version 1.2.3 +// Version 1.2.4 Type TSDocxFile = Class ///Version: V1.0 2022-09-20 diff --git a/funcext/TSOffice/TSExcelFile.tsf b/funcext/TSOffice/TSExcelFile.tsf index 85c8e0b..d1e1512 100644 --- a/funcext/TSOffice/TSExcelFile.tsf +++ b/funcext/TSOffice/TSExcelFile.tsf @@ -1,4 +1,4 @@ -// Version 1.2.3 +// Version 1.2.4 Type TSExcelFile = Class ///Version: V1.0 2022-08-08 diff --git a/funcext/TSOffice/TSUtils/NodeInfo.tsf b/funcext/TSOffice/TSUtils/NodeInfo.tsf index 9f533f5..5846c73 100644 --- a/funcext/TSOffice/TSUtils/NodeInfo.tsf +++ b/funcext/TSOffice/TSUtils/NodeInfo.tsf @@ -99,6 +99,7 @@ public if node_type = 'empty' then // begin if obj = 0 then arr['attributes'] := array('val': 0); + else if obj = 1 then arr['attributes'] := array('val': 1) end else if node_type = 'pcdata' then begin @@ -175,13 +176,7 @@ public if istable(r) then Begin r := r[0]; node := node.FirstChildElement(r['name']); - if not ifObj(node) then - begin - if r['nodeType'] = 'empty' then return false; - return nil; - end - if r['nodeType'] = 'empty' then - return true; + if not ifObj(node) then return nil; if r['nodeType'] = 'pcdata' then //返回文本串 return node.GetText(); if ifObj(r['obj']) then //对象,返回XML串 diff --git a/funcext/TSOffice/worksheet/xlsxStyles.tsf b/funcext/TSOffice/worksheet/xlsxStyles.tsf index c87e6fd..de906d8 100644 --- a/funcext/TSOffice/worksheet/xlsxStyles.tsf +++ b/funcext/TSOffice/worksheet/xlsxStyles.tsf @@ -202,7 +202,7 @@ private Function getNodeNumFmts(rootNode, id); Begin if not ifObj(rootNode) then return nil; - node := rootNode.FirstChildElement('numFmts'); + node := rootNode.FirstChildElement('numFmt'); num_id := inttostr(id); while ifObj(node) do begin diff --git a/更新日志.md b/更新日志.md index 404ac94..1b7ccd9 100644 --- a/更新日志.md +++ b/更新日志.md @@ -1,5 +1,15 @@ # 更新日志 +## 2023-3-16 + +### V1.2.4 + +#### excel + +1. 修复样式获取数字样式失败问题 +2. 修复边框样式对角线未生效问题 +3. 修复获取属性未正确返回属性值问题 + ## 2023-3-9 ### V1.2.3