Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: fpdfsdk/javascript/app.cpp

Issue 2410893002: Merge CPDFSDK_Document into CPDFSDK_FormFillEnvironment (Closed)
Patch Set: Rebase to master Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/javascript/app.cpp
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index b41b8727ab789692f7a636437935e1809d2931a4..325a84b1f877647b38f95e5222efe7b6e7b0b72b 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));
« fpdfsdk/cpdfsdk_formfillenvironment.cpp ('K') | « fpdfsdk/javascript/PublicMethods.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698