diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-27 18:10:47 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-27 18:10:47 +0000 |
commit | f473672fd6305fe97c749bde3b92e3c9c90e88d0 (patch) | |
tree | fe1ec0af4f66a801c7a08fd762e61b065b89d4ec /xfa/fxfa/parser/cxfa_nodehelper.cpp | |
parent | 3636a854af15219fd679ed54207abcdad3283b9b (diff) | |
download | pdfium-f473672fd6305fe97c749bde3b92e3c9c90e88d0.tar.xz |
Generate XFA node classes
This CL adds concrete classes for each of the XFA Node types.
Change-Id: Ieac8e2fcd5d13c61daa27fc63e3d80abb7aa7a29
Reviewed-on: https://pdfium-review.googlesource.com/18271
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_nodehelper.cpp')
-rw-r--r-- | xfa/fxfa/parser/cxfa_nodehelper.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/cxfa_nodehelper.cpp b/xfa/fxfa/parser/cxfa_nodehelper.cpp index e8e88d2fc1..6428a3ca4a 100644 --- a/xfa/fxfa/parser/cxfa_nodehelper.cpp +++ b/xfa/fxfa/parser/cxfa_nodehelper.cpp @@ -45,9 +45,8 @@ int32_t CXFA_NodeHelper::CountSiblings(CXFA_Node* pNode, CXFA_Node* parent = ResolveNodes_GetParent(pNode, XFA_LOGIC_NoTransparent); if (!parent) return 0; - const XFA_PROPERTY* pProperty = XFA_GetPropertyOfElement( - parent->GetElementType(), pNode->GetElementType(), XFA_XDPPACKET_UNKNOWN); - if (!pProperty && eLogicType == XFA_LOGIC_Transparent) { + if (!parent->HasProperty(pNode->GetElementType()) && + eLogicType == XFA_LOGIC_Transparent) { parent = ResolveNodes_GetParent(pNode, XFA_LOGIC_Transparent); if (!parent) return 0; @@ -340,7 +339,7 @@ bool CXFA_NodeHelper::ResolveNodes_CreateNode(WideString wsName, CreateNode_ForCondition(wsCondition); } if (bIsClassName) { - XFA_Element eType = XFA_GetElementTypeForName(wsName.AsStringView()); + XFA_Element eType = CXFA_Node::NameToElement(wsName); if (eType == XFA_Element::Unknown) return false; @@ -396,8 +395,5 @@ void CXFA_NodeHelper::SetCreateNodeType(CXFA_Node* refNode) { bool CXFA_NodeHelper::NodeIsProperty(CXFA_Node* refNode) { CXFA_Node* parent = ResolveNodes_GetParent(refNode, XFA_LOGIC_NoTransparent); - return parent && refNode && - XFA_GetPropertyOfElement(parent->GetElementType(), - refNode->GetElementType(), - XFA_XDPPACKET_UNKNOWN); + return parent && refNode && parent->HasProperty(refNode->GetElementType()); } |