From 070fcdfeafb17a9d3ada1418f48fd7f19aa4cf83 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 22 Jun 2016 22:04:54 -0700 Subject: Update GetClassID to GetElementType The GetClassID method actually returns the XFA_Element, change the name of the method to be more suggestive of the return value. The GetClassID was sort-of polymorphich and would call down to subclasses. This CL changes the data to be stored on the CXFA_Object class and just returns what is set. The values are set in the constructor as needed. Review-Url: https://codereview.chromium.org/2082573007 --- xfa/fxfa/parser/xfa_parser_imp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xfa/fxfa/parser/xfa_parser_imp.cpp') diff --git a/xfa/fxfa/parser/xfa_parser_imp.cpp b/xfa/fxfa/parser/xfa_parser_imp.cpp index daf5b473e2..38fdbbb662 100644 --- a/xfa/fxfa/parser/xfa_parser_imp.cpp +++ b/xfa/fxfa/parser/xfa_parser_imp.cpp @@ -152,7 +152,7 @@ void CXFA_SimpleParser::ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) { XFA_XDPPACKET ePacketID = (XFA_XDPPACKET)pXFANode->GetPacketID(); if (ePacketID == XFA_XDPPACKET_Datasets) { - if (pXFANode->GetClassID() == XFA_Element::DataValue) { + if (pXFANode->GetElementType() == XFA_Element::DataValue) { for (CFDE_XMLNode* pXMLChild = pXMLNode->GetNodeItem(CFDE_XMLNode::FirstChild); pXMLChild; @@ -839,7 +839,7 @@ CXFA_Node* CXFA_SimpleParser::NormalLoader(CXFA_Node* pXFANode, continue; } const XFA_PROPERTY* pPropertyInfo = XFA_GetPropertyOfElement( - pXFANode->GetClassID(), pElemInfo->eName, ePacketID); + pXFANode->GetElementType(), pElemInfo->eName, ePacketID); if (pPropertyInfo && ((pPropertyInfo->uFlags & (XFA_PROPERTYFLAG_OneOf | XFA_PROPERTYFLAG_DefaultOneOf)) != 0)) { @@ -980,7 +980,7 @@ void CXFA_SimpleParser::ParseContentNode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode, XFA_XDPPACKET ePacketID) { XFA_Element element = XFA_Element::Sharptext; - if (pXFANode->GetClassID() == XFA_Element::ExData) { + if (pXFANode->GetElementType() == XFA_Element::ExData) { CFX_WideStringC wsContentType = pXFANode->GetCData(XFA_ATTRIBUTE_ContentType); if (wsContentType == FX_WSTRC(L"text/html")) -- cgit v1.2.3