summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xfa/fxfa/parser/xfa_document_imp.cpp3
-rw-r--r--xfa/fxfa/parser/xfa_object.h5
-rw-r--r--xfa/fxfa/parser/xfa_object_imp.cpp11
3 files changed, 11 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp
index bcc37d9f65..7ba85bb35c 100644
--- a/xfa/fxfa/parser/xfa_document_imp.cpp
+++ b/xfa/fxfa/parser/xfa_document_imp.cpp
@@ -157,7 +157,8 @@ CXFA_Node* CXFA_Document::CreateNode(const XFA_PACKETINFO* pPacket,
const XFA_ELEMENTINFO* pElement = XFA_GetElementByID(eElement);
if (pElement && (pElement->dwPackets & pPacket->eName)) {
- CXFA_Node* pNode = new CXFA_Node(this, pPacket->eName, pElement->eName);
+ CXFA_Node* pNode = new CXFA_Node(this, pPacket->eName,
+ pElement->eObjectType, pElement->eName);
AddPurgeNode(pNode);
return pNode;
}
diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h
index e402c1826f..fd73d8bb2e 100644
--- a/xfa/fxfa/parser/xfa_object.h
+++ b/xfa/fxfa/parser/xfa_object.h
@@ -616,7 +616,10 @@ class CXFA_Node : public CXFA_Object {
protected:
friend class CXFA_Document;
- CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_Element eType);
+ CXFA_Node(CXFA_Document* pDoc,
+ uint16_t ePacket,
+ XFA_ObjectType oType,
+ XFA_Element eType);
~CXFA_Node() override;
bool HasFlag(XFA_NodeFlag dwFlag) const;
diff --git a/xfa/fxfa/parser/xfa_object_imp.cpp b/xfa/fxfa/parser/xfa_object_imp.cpp
index 28c56ce0f3..04b33b47c9 100644
--- a/xfa/fxfa/parser/xfa_object_imp.cpp
+++ b/xfa/fxfa/parser/xfa_object_imp.cpp
@@ -43,10 +43,6 @@ void XFA_CopyWideString(void*& pData) {
XFA_MAPDATABLOCKCALLBACKINFO deleteWideStringCallBack = {XFA_DeleteWideString,
XFA_CopyWideString};
-XFA_ObjectType XFA_GetElementObjectType(XFA_Element eType) {
- return XFA_GetElementByID(eType)->eObjectType;
-}
-
void XFA_DataNodeDeleteBindItem(void* pData) {
delete static_cast<CXFA_NodeArray*>(pData);
}
@@ -108,8 +104,11 @@ XFA_MAPMODULEDATA::XFA_MAPMODULEDATA() {}
XFA_MAPMODULEDATA::~XFA_MAPMODULEDATA() {}
-CXFA_Node::CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_Element eType)
- : CXFA_Object(pDoc, XFA_GetElementObjectType(eType), eType),
+CXFA_Node::CXFA_Node(CXFA_Document* pDoc,
+ uint16_t ePacket,
+ XFA_ObjectType oType,
+ XFA_Element eType)
+ : CXFA_Object(pDoc, oType, eType),
m_pNext(nullptr),
m_pChild(nullptr),
m_pLastChild(nullptr),