summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_document.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-12-14 20:43:53 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-14 20:43:53 +0000
commit51ef4a6ca3b4ae9b618cb1c96f84697a2bf4a2b1 (patch)
treea365a0c3f25fff2f6511fbc23fd0e4d6b8d4eada /xfa/fxfa/parser/cxfa_document.cpp
parent8489e901fb16fe508e23a36cd3eff93d8332c2a2 (diff)
downloadpdfium-51ef4a6ca3b4ae9b618cb1c96f84697a2bf4a2b1.tar.xz
Change CXFA_Node::GetChild to return proper types
Currently CXFA_Node::GetChild always returns a CXFA_Node* object. We know the type we want when we call GetChild, so this CL changes the code to add a template parameter to GetChild and return the correct CXFA_Node subtype for the desired element. Change-Id: I5aecf2e840504235dc246483abee48e0564841fe Reviewed-on: https://pdfium-review.googlesource.com/21210 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_document.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_document.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp
index e418c839c6..3ba5a44cf9 100644
--- a/xfa/fxfa/parser/cxfa_document.cpp
+++ b/xfa/fxfa/parser/cxfa_document.cpp
@@ -16,6 +16,7 @@
#include "xfa/fxfa/parser/cscript_logpseudomodel.h"
#include "xfa/fxfa/parser/cscript_signaturepseudomodel.h"
#include "xfa/fxfa/parser/cxfa_document_parser.h"
+#include "xfa/fxfa/parser/cxfa_interactive.h"
#include "xfa/fxfa/parser/cxfa_layoutprocessor.h"
#include "xfa/fxfa/parser/cxfa_localemgr.h"
#include "xfa/fxfa/parser/cxfa_node.h"
@@ -261,7 +262,8 @@ bool CXFA_Document::IsInteractive() {
if (!pPDF)
return false;
- CXFA_Node* pFormFiller = pPDF->GetChild(0, XFA_Element::Interactive, false);
+ CXFA_Interactive* pFormFiller =
+ pPDF->GetChild<CXFA_Interactive>(0, XFA_Element::Interactive, false);
if (pFormFiller) {
m_dwDocFlags |= XFA_DOCFLAG_HasInteractive;