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.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp
index 5c722821cb..feafdcf38d 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp
@@ -26,6 +26,8 @@
#include "xfa/fxfa/fxfa.h"
#include "xfa/fxfa/parser/cxfa_document.h"
#include "xfa/fxfa/parser/cxfa_node.h"
+#include "xfa/fxfa/parser/cxfa_subform.h"
+#include "xfa/fxfa/parser/cxfa_template.h"
#include "xfa/fxfa/parser/xfa_basic_data.h"
#include "xfa/fxfa/parser/xfa_utils.h"
@@ -709,10 +711,11 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Form(
pNode->JSObject()->SetCData(XFA_Attribute::Name, packet->name, false, false);
pNode->JSObject()->SetAttribute(XFA_Attribute::Checksum,
wsChecksum.AsStringView(), false);
- CXFA_Node* pTemplateRoot =
- m_pRootNode->GetFirstChildByClass(XFA_Element::Template);
- CXFA_Node* pTemplateChosen =
- pTemplateRoot ? pTemplateRoot->GetFirstChildByClass(XFA_Element::Subform)
+ CXFA_Template* pTemplateRoot =
+ m_pRootNode->GetFirstChildByClass<CXFA_Template>(XFA_Element::Template);
+ CXFA_Subform* pTemplateChosen =
+ pTemplateRoot ? pTemplateRoot->GetFirstChildByClass<CXFA_Subform>(
+ XFA_Element::Subform)
: nullptr;
bool bUseAttribute = true;
if (pTemplateChosen &&