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

Unified Diff: fpdfsdk/javascript/app.cpp

Issue 2400473002: Start proxying CPDFSDK_Document methods through 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
« no previous file with comments | « fpdfsdk/javascript/PublicMethods.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/javascript/app.cpp
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index d4f06af144054797c72dd7359709267b99bb8bfd..c0db4f6e8b8ca8cab1788c2e9744e570f9ca3af4 100644
--- a/fpdfsdk/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -257,7 +257,7 @@ FX_BOOL app::calculate(IJS_Context* cc,
CJS_Context* pContext = (CJS_Context*)cc;
CPDFSDK_FormFillEnvironment* pEnv = pContext->GetReaderEnv();
if (CPDFSDK_Document* pDoc = pEnv->GetSDKDocument())
- pDoc->GetInterForm()->EnableCalculate((FX_BOOL)m_bCalculate);
+ pDoc->GetEnv()->GetInterForm()->EnableCalculate((FX_BOOL)m_bCalculate);
} else {
vp << (bool)m_bCalculate;
}
@@ -305,7 +305,7 @@ FX_BOOL app::viewerVersion(IJS_Context* cc,
#ifdef PDF_ENABLE_XFA
CJS_Context* pContext = (CJS_Context*)cc;
CPDFSDK_Document* pCurDoc = pContext->GetReaderDocument();
- CPDFXFA_Document* pDoc = pCurDoc->GetXFADocument();
+ CPDFXFA_Document* pDoc = pCurDoc->GetEnv()->GetXFADocument();
if (pDoc->GetDocType() == 1 || pDoc->GetDocType() == 2) {
vp << JS_NUM_VIEWERVERSION_XFA;
return TRUE;
« no previous file with comments | « fpdfsdk/javascript/PublicMethods.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698