summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffdoc.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-12-14 20:51:03 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-14 20:51:03 +0000
commitdf4f30eaaa469c3703118f89579d506209a49237 (patch)
tree881eb4c93dadd3b07414cc950ed5cbbbb3c9693a /xfa/fxfa/cxfa_ffdoc.cpp
parent51ef4a6ca3b4ae9b618cb1c96f84697a2bf4a2b1 (diff)
downloadpdfium-df4f30eaaa469c3703118f89579d506209a49237.tar.xz
Add types to the CXFA_Node::Get*{Child|Sibling}* methods
This CL templates the various Get methods in CXFA_Node in order to return the correct node type. Change-Id: I4f50df6dd9213873deb8f8f262eaf579c6c4ca7d Reviewed-on: https://pdfium-review.googlesource.com/21230 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffdoc.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffdoc.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp
index 2d22fb8c68..bb05d66968 100644
--- a/xfa/fxfa/cxfa_ffdoc.cpp
+++ b/xfa/fxfa/cxfa_ffdoc.cpp
@@ -28,9 +28,12 @@
#include "xfa/fxfa/cxfa_ffnotify.h"
#include "xfa/fxfa/cxfa_ffwidget.h"
#include "xfa/fxfa/cxfa_fontmgr.h"
+#include "xfa/fxfa/parser/cxfa_acrobat.h"
+#include "xfa/fxfa/parser/cxfa_acrobat7.h"
#include "xfa/fxfa/parser/cxfa_dataexporter.h"
#include "xfa/fxfa/parser/cxfa_dataimporter.h"
#include "xfa/fxfa/parser/cxfa_document.h"
+#include "xfa/fxfa/parser/cxfa_dynamicrender.h"
#include "xfa/fxfa/parser/cxfa_node.h"
namespace {
@@ -245,16 +248,19 @@ void CXFA_FFDoc::StopLoad() {
if (!pConfig)
return;
- CXFA_Node* pAcrobat = pConfig->GetFirstChildByClass(XFA_Element::Acrobat);
+ CXFA_Acrobat* pAcrobat =
+ pConfig->GetFirstChildByClass<CXFA_Acrobat>(XFA_Element::Acrobat);
if (!pAcrobat)
return;
- CXFA_Node* pAcrobat7 = pAcrobat->GetFirstChildByClass(XFA_Element::Acrobat7);
+ CXFA_Acrobat7* pAcrobat7 =
+ pAcrobat->GetFirstChildByClass<CXFA_Acrobat7>(XFA_Element::Acrobat7);
if (!pAcrobat7)
return;
- CXFA_Node* pDynamicRender =
- pAcrobat7->GetFirstChildByClass(XFA_Element::DynamicRender);
+ CXFA_DynamicRender* pDynamicRender =
+ pAcrobat7->GetFirstChildByClass<CXFA_DynamicRender>(
+ XFA_Element::DynamicRender);
if (!pDynamicRender)
return;