diff options
Diffstat (limited to 'xfa/fxfa/parser/xfa_document_datadescription_imp.cpp')
-rw-r--r-- | xfa/fxfa/parser/xfa_document_datadescription_imp.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp index 5c7fdfe83a..97ea8dd54b 100644 --- a/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datadescription_imp.cpp @@ -31,18 +31,17 @@ void XFA_DataDescription_UpdateDataRelation(CXFA_Node* pDataNode, pDataChild; pDataChild = pDataChild->GetNodeItem(XFA_NODEITEM_NextSibling)) { uint32_t dwNameHash = pDataChild->GetNameHash(); - XFA_Element eType = pDataChild->GetElementType(); - if (!dwNameHash) { + if (!dwNameHash) continue; - } + CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_DDGroup> sIterator(pDataDescriptionNode); for (CXFA_Node* pDDGroupNode = sIterator.GetCurrent(); pDDGroupNode; pDDGroupNode = sIterator.MoveToNext()) { if (pDDGroupNode != pDataDescriptionNode) { - if (pDDGroupNode->GetElementType() != XFA_Element::DataGroup) { + if (pDDGroupNode->GetElementType() != XFA_Element::DataGroup) continue; - } + CFX_WideString wsNamespace; if (!pDDGroupNode->TryNamespace(wsNamespace) || wsNamespace != FX_WSTRC(L"http://ns.adobe.com/data-description/")) { @@ -50,12 +49,11 @@ void XFA_DataDescription_UpdateDataRelation(CXFA_Node* pDataNode, } } CXFA_Node* pDDNode = pDDGroupNode->GetFirstChildByName(dwNameHash); - if (!pDDNode) { + if (!pDDNode) continue; - } - if (pDDNode->GetElementType() != eType) { + if (pDDNode->GetElementType() != pDataChild->GetElementType()) break; - } + pDataChild->SetDataDescriptionNode(pDDNode); XFA_DataDescription_UpdateDataRelation(pDataChild, pDDNode); break; |