diff --git a/funcext/TSOffice/TOfficeObj.tsf b/funcext/TSOffice/TOfficeObj.tsf index 77b0df2..5b7219d 100644 --- a/funcext/TSOffice/TOfficeObj.tsf +++ b/funcext/TSOffice/TOfficeObj.tsf @@ -13944,7 +13944,7 @@ Type TDocumentBody = Class(DocObject) End; End; if bHeadList then Begin //统计大纲显示(目录) - styleId := p.Format.Value('StyleId'); + styleId := p.Format.Value('StyleId', 1); if styleId <> '' then Begin obj := docx.StyleObject().GetStyleById(styleId); if ifObj(obj) then Begin diff --git a/funcext/TSOffice/TSUtils/NodeInfo.tsf b/funcext/TSOffice/TSUtils/NodeInfo.tsf index 964fc29..ad6f00e 100644 --- a/funcext/TSOffice/TSUtils/NodeInfo.tsf +++ b/funcext/TSOffice/TSUtils/NodeInfo.tsf @@ -154,7 +154,7 @@ public return 1; End - Function Value(name); + Function Value(name, nottransferable); Begin if not ifObj(RootObj) then return nil; if NodeUri <> '' then @@ -169,7 +169,7 @@ public if istable(r) then begin value := node.GetAttribute(r[1]); - return trystrtofloat(value, r) ? r : value; + return nottransferable ? value : trystrtofloat(value, r) ? r : value; end children := GetChildren(); @@ -186,7 +186,7 @@ public key := r['attrName'] ? r['attrName'] : r['attrEx'] ? r['attrEx'] : 'val'; value := node.GetAttribute(key); if r['nodeType'] = 'empty' and value = '' then return true; - return trystrtofloat(value, r) ? r : value; + return nottransferable ? value : trystrtofloat(value, r) ? r : value; End; return nil; End; diff --git a/funcext/TSOffice/document/docxDocument.tsf b/funcext/TSOffice/document/docxDocument.tsf index e662001..31550c0 100644 --- a/funcext/TSOffice/document/docxDocument.tsf +++ b/funcext/TSOffice/document/docxDocument.tsf @@ -29,7 +29,7 @@ Type docxDocument = Class markStart := p.FirstChildElement('w:bookmarkStart'); if ifObj(markStart) then Begin id := markStart.GetAttribute('w:id'); - if ifstring(id) then Begin + if ifstring(id) and id <> '' then Begin iVal := strtoint(id); if bookmarkid_ <= iVal then bookmarkid_ := iVal + 1; @@ -48,4 +48,4 @@ private body_; document_; bookmarkid_; -End; \ No newline at end of file +End;