summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/app.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-12 11:56:23 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-12 11:56:23 -0700
commit7cbe68e34257b460bfa3baf0ea68fd6d50e1bc77 (patch)
treecc439488801d7a3e72a56ecd88df600e12b8a948 /fpdfsdk/javascript/app.cpp
parent7cc6a32693a07210e036a8d7131232231ec0fdb3 (diff)
downloadpdfium-7cbe68e34257b460bfa3baf0ea68fd6d50e1bc77.tar.xz
Merge CPDFSDK_Document into CPDFSDK_FormFillEnvironment
This CL merges the CPDFSDK_Document and CPDFSDK_FormFillEnvironment classes as they always existed and always pointed at each other. Review-Url: https://codereview.chromium.org/2410893002
Diffstat (limited to 'fpdfsdk/javascript/app.cpp')
-rw-r--r--fpdfsdk/javascript/app.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index b41b8727ab..325a84b1f8 100644
--- a/fpdfsdk/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -9,7 +9,6 @@
#include <memory>
#include <vector>
-#include "fpdfsdk/cpdfsdk_document.h"
#include "fpdfsdk/cpdfsdk_formfillenvironment.h"
#include "fpdfsdk/cpdfsdk_interform.h"
#include "fpdfsdk/javascript/Document.h"
@@ -245,7 +244,6 @@ FX_BOOL app::calculate(IJS_Context* cc,
CJS_Context* pContext = (CJS_Context*)cc;
pContext->GetFormFillEnv()
- ->GetSDKDocument()
->GetInterForm()
->EnableCalculate((FX_BOOL)m_bCalculate);
} else {
@@ -294,8 +292,7 @@ FX_BOOL app::viewerVersion(IJS_Context* cc,
return FALSE;
#ifdef PDF_ENABLE_XFA
CJS_Context* pContext = (CJS_Context*)cc;
- CPDFXFA_Document* pDoc =
- pContext->GetFormFillEnv()->GetSDKDocument()->GetXFADocument();
+ CPDFXFA_Document* pDoc = pContext->GetFormFillEnv()->GetXFADocument();
if (pDoc->GetDocType() == 1 || pDoc->GetDocType() == 2) {
vp << JS_NUM_VIEWERVERSION_XFA;
return TRUE;
@@ -423,7 +420,7 @@ FX_BOOL app::alert(IJS_Context* cc,
swTitle = JSGetStringFromID(IDS_STRING_JSALERT);
pRuntime->BeginBlock();
- pFormFillEnv->GetSDKDocument()->KillFocusAnnot(0);
+ pFormFillEnv->KillFocusAnnot(0);
vRet = CJS_Value(pRuntime, pFormFillEnv->JS_appAlert(
swMsg.c_str(), swTitle.c_str(), iType, iIcon));