summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_simple_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/cxfa_simple_parser.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp
index 579ca9e832..4ee9ca76b3 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp
@@ -871,20 +871,18 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode,
case FX_XMLNODE_Element: {
CFX_XMLElement* pXMLElement = static_cast<CFX_XMLElement*>(pXMLChild);
WideString wsTagName = pXMLElement->GetLocalTagName();
- XFA_Element eType = XFA_GetElementTypeForName(wsTagName.AsStringView());
+ XFA_Element eType = CXFA_Node::NameToElement(wsTagName);
if (eType == XFA_Element::Unknown)
continue;
- const XFA_PROPERTY* pPropertyInfo = XFA_GetPropertyOfElement(
- pXFANode->GetElementType(), eType, ePacketID);
- if (pPropertyInfo &&
- ((pPropertyInfo->uFlags &
- (XFA_PROPERTYFLAG_OneOf | XFA_PROPERTYFLAG_DefaultOneOf)) != 0)) {
+ if (pXFANode->HasPropertyFlags(
+ eType,
+ XFA_PROPERTYFLAG_OneOf | XFA_PROPERTYFLAG_DefaultOneOf)) {
if (bOneOfPropertyFound)
break;
-
bOneOfPropertyFound = true;
}
+
CXFA_Node* pXFAChild = m_pFactory->CreateNode(ePacketID, eType);
if (!pXFAChild)
return nullptr;