summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_ffapp.cpp7
-rw-r--r--xfa/fxfa/cxfa_ffapp.h3
-rw-r--r--xfa/fxfa/cxfa_ffdochandler.cpp61
-rw-r--r--xfa/fxfa/cxfa_ffdochandler.h29
4 files changed, 0 insertions, 100 deletions
diff --git a/xfa/fxfa/cxfa_ffapp.cpp b/xfa/fxfa/cxfa_ffapp.cpp
index e3ca42c129..4cb9deb466 100644
--- a/xfa/fxfa/cxfa_ffapp.cpp
+++ b/xfa/fxfa/cxfa_ffapp.cpp
@@ -17,7 +17,6 @@
#include "xfa/fwl/cfwl_notedriver.h"
#include "xfa/fwl/cfwl_widgetmgr.h"
#include "xfa/fxfa/cxfa_ffdoc.h"
-#include "xfa/fxfa/cxfa_ffdochandler.h"
#include "xfa/fxfa/cxfa_ffwidgethandler.h"
#include "xfa/fxfa/cxfa_fontmgr.h"
#include "xfa/fxfa/cxfa_fwladapterwidgetmgr.h"
@@ -30,12 +29,6 @@ CXFA_FFApp::CXFA_FFApp(IXFA_AppProvider* pProvider) : m_pProvider(pProvider) {
CXFA_FFApp::~CXFA_FFApp() {}
-CXFA_FFDocHandler* CXFA_FFApp::GetDocHandler() {
- if (!m_pDocHandler)
- m_pDocHandler = pdfium::MakeUnique<CXFA_FFDocHandler>();
- return m_pDocHandler.get();
-}
-
std::unique_ptr<CXFA_FFDoc> CXFA_FFApp::CreateDoc(
IXFA_DocEnvironment* pDocEnvironment,
CPDF_Document* pPDFDoc) {
diff --git a/xfa/fxfa/cxfa_ffapp.h b/xfa/fxfa/cxfa_ffapp.h
index 2ce718a36a..f4bd9eb7a8 100644
--- a/xfa/fxfa/cxfa_ffapp.h
+++ b/xfa/fxfa/cxfa_ffapp.h
@@ -35,8 +35,6 @@ class CXFA_FFApp {
CPDF_Document* pPDFDoc);
void SetDefaultFontMgr(std::unique_ptr<CFGAS_DefaultFontManager> pFontMgr);
- CXFA_FFDocHandler* GetDocHandler();
-
CXFA_FWLAdapterWidgetMgr* GetFWLAdapterWidgetMgr();
CFWL_WidgetMgr* GetFWLWidgetMgr() const { return m_pFWLApp->GetWidgetMgr(); }
@@ -51,7 +49,6 @@ class CXFA_FFApp {
void ClearEventTargets();
private:
- std::unique_ptr<CXFA_FFDocHandler> m_pDocHandler;
UnownedPtr<IXFA_AppProvider> const m_pProvider;
// The fonts stored in the font manager may have been created by the default
diff --git a/xfa/fxfa/cxfa_ffdochandler.cpp b/xfa/fxfa/cxfa_ffdochandler.cpp
deleted file mode 100644
index 86e493084b..0000000000
--- a/xfa/fxfa/cxfa_ffdochandler.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "xfa/fxfa/cxfa_ffdochandler.h"
-
-#include "core/fxcrt/cfx_checksumcontext.h"
-#include "fxjs/cfxjse_engine.h"
-#include "xfa/fxfa/cxfa_ffdoc.h"
-#include "xfa/fxfa/parser/cxfa_node.h"
-#include "xfa/fxfa/parser/xfa_resolvenode_rs.h"
-
-CXFA_FFDocHandler::CXFA_FFDocHandler() {}
-
-CXFA_FFDocHandler::~CXFA_FFDocHandler() {}
-
-CFXJSE_Value* CXFA_FFDocHandler::GetXFAScriptObject(CXFA_FFDoc* hDoc) {
- CXFA_Document* pXFADoc = hDoc->GetXFADoc();
- if (!pXFADoc)
- return nullptr;
-
- CFXJSE_Engine* pScriptContext = pXFADoc->GetScriptContext();
- if (!pScriptContext)
- return nullptr;
- return pScriptContext->GetJSValueFromMap(pXFADoc->GetRoot());
-}
-
-XFA_ATTRIBUTEENUM CXFA_FFDocHandler::GetRestoreState(CXFA_FFDoc* hDoc) {
- CXFA_Document* pXFADoc = hDoc->GetXFADoc();
- if (!pXFADoc)
- return XFA_ATTRIBUTEENUM_Unknown;
-
- CXFA_Node* pForm = ToNode(pXFADoc->GetXFAObject(XFA_HASHCODE_Form));
- if (!pForm)
- return XFA_ATTRIBUTEENUM_Unknown;
-
- CXFA_Node* pSubForm = pForm->GetFirstChildByClass(XFA_Element::Subform);
- if (!pSubForm)
- return XFA_ATTRIBUTEENUM_Unknown;
- return pSubForm->JSNode()->GetEnum(XFA_ATTRIBUTE_RestoreState);
-}
-
-bool CXFA_FFDocHandler::RunDocScript(CXFA_FFDoc* hDoc,
- XFA_SCRIPTTYPE eScriptType,
- const WideStringView& wsScript,
- CFXJSE_Value* pRetValue,
- CFXJSE_Value* pThisValue) {
- CXFA_Document* pXFADoc = hDoc->GetXFADoc();
- if (!pXFADoc)
- return false;
-
- CFXJSE_Engine* pScriptContext = pXFADoc->GetScriptContext();
- if (!pScriptContext)
- return false;
-
- return pScriptContext->RunScript(
- (XFA_SCRIPTLANGTYPE)eScriptType, wsScript, pRetValue,
- pThisValue ? CFXJSE_Engine::ToObject(pThisValue, nullptr) : nullptr);
-}
diff --git a/xfa/fxfa/cxfa_ffdochandler.h b/xfa/fxfa/cxfa_ffdochandler.h
deleted file mode 100644
index 7da03b0148..0000000000
--- a/xfa/fxfa/cxfa_ffdochandler.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2014 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef XFA_FXFA_CXFA_FFDOCHANDLER_H_
-#define XFA_FXFA_CXFA_FFDOCHANDLER_H_
-
-#include "xfa/fxfa/fxfa.h"
-
-class CFX_ChecksumContext;
-
-class CXFA_FFDocHandler {
- public:
- CXFA_FFDocHandler();
- ~CXFA_FFDocHandler();
-
- CFXJSE_Value* GetXFAScriptObject(CXFA_FFDoc* hDoc);
- XFA_ATTRIBUTEENUM GetRestoreState(CXFA_FFDoc* hDoc);
-
- bool RunDocScript(CXFA_FFDoc* hDoc,
- XFA_SCRIPTTYPE eScriptType,
- const WideStringView& wsScript,
- CFXJSE_Value* pRetValue,
- CFXJSE_Value* pThisObject);
-};
-
-#endif // XFA_FXFA_CXFA_FFDOCHANDLER_H_