From df4bc596c64fb848647c670be66a29ea0861b4f4 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 31 Mar 2016 20:34:43 -0700 Subject: Remove IXFA_* interfaces. This CL removes the IXFA_* interfaces which are: - Implemented once. - Not implemented by an fpdfsdk class. This requires making a few classes visible to fpdfsdk so we can have the correct instances available instead of the IXFA types. Review URL: https://codereview.chromium.org/1846993002 --- xfa/fxfa/parser/xfa_document_imp.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'xfa/fxfa/parser/xfa_document_imp.cpp') diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp index 6f08489c17..d56e57c99d 100644 --- a/xfa/fxfa/parser/xfa_document_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_imp.cpp @@ -5,6 +5,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxcrt/include/fx_ext.h" +#include "xfa/fxfa/app/xfa_ffnotify.h" #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" #include "xfa/fxfa/parser/xfa_basic_imp.h" #include "xfa/fxfa/parser/xfa_docdata.h" @@ -14,16 +15,18 @@ #include "xfa/fxfa/parser/xfa_localemgr.h" #include "xfa/fxfa/parser/xfa_object.h" #include "xfa/fxfa/parser/xfa_parser.h" +#include "xfa/fxfa/parser/xfa_parser_imp.h" #include "xfa/fxfa/parser/xfa_script.h" #include "xfa/fxfa/parser/xfa_script_datawindow.h" #include "xfa/fxfa/parser/xfa_script_eventpseudomodel.h" #include "xfa/fxfa/parser/xfa_script_hostpseudomodel.h" +#include "xfa/fxfa/parser/xfa_script_imp.h" #include "xfa/fxfa/parser/xfa_script_layoutpseudomodel.h" #include "xfa/fxfa/parser/xfa_script_logpseudomodel.h" #include "xfa/fxfa/parser/xfa_script_signaturepseudomodel.h" #include "xfa/fxfa/parser/xfa_utils.h" -CXFA_Document::CXFA_Document(IXFA_DocParser* pParser) +CXFA_Document::CXFA_Document(CXFA_DocumentParser* pParser) : m_pParser(pParser), m_pScriptContext(nullptr), m_pLayoutProcessor(nullptr), @@ -88,7 +91,7 @@ void CXFA_Document::SetRoot(CXFA_Node* pNewRoot) { m_pRootNode = pNewRoot; RemovePurgeNode(pNewRoot); } -IXFA_Notify* CXFA_Document::GetNotify() const { +CXFA_FFNotify* CXFA_Document::GetNotify() const { return m_pParser->GetNotify(); } CXFA_Object* CXFA_Document::GetXFAObject(const CFX_WideStringC& wsNodeName) { @@ -245,17 +248,15 @@ CXFA_LocaleMgr* CXFA_Document::GetLocalMgr() { } return m_pLocalMgr; } -IXFA_ScriptContext* CXFA_Document::InitScriptContext(FXJSE_HRUNTIME hRuntime) { - if (!m_pScriptContext) { - m_pScriptContext = XFA_ScriptContext_Create(this); - } +CXFA_ScriptContext* CXFA_Document::InitScriptContext(FXJSE_HRUNTIME hRuntime) { + if (!m_pScriptContext) + m_pScriptContext = new CXFA_ScriptContext(this); m_pScriptContext->Initialize(hRuntime); return m_pScriptContext; } -IXFA_ScriptContext* CXFA_Document::GetScriptContext() { - if (!m_pScriptContext) { - m_pScriptContext = XFA_ScriptContext_Create(this); - } +CXFA_ScriptContext* CXFA_Document::GetScriptContext() { + if (!m_pScriptContext) + m_pScriptContext = new CXFA_ScriptContext(this); return m_pScriptContext; } XFA_VERSION CXFA_Document::RecognizeXFAVersionNumber( -- cgit v1.2.3