summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/PublicMethods.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-11 10:54:49 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-11 10:54:49 -0700
commit4526faf9d62b64729a232c20ada67690f590abd2 (patch)
tree76dfeaac09b49fcff44a57da0aa51ead16c515c2 /fpdfsdk/javascript/PublicMethods.cpp
parent3a7741a2d9391fdbc54900695a980344dddf1692 (diff)
downloadpdfium-4526faf9d62b64729a232c20ada67690f590abd2.tar.xz
Remove CPDFSDK_Document from IJS_Context
This CL converts the IJS_Context and implementations over to use CPDFSDK_FormFillEnvironment instead of CPDFSDK_Document. Review-Url: https://codereview.chromium.org/2399943002
Diffstat (limited to 'fpdfsdk/javascript/PublicMethods.cpp')
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index 3e2bc06f23..d4f17a8b2e 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -80,7 +80,7 @@ CFX_WideString StrTrim(const CFX_WideString& pStr) {
}
void AlertIfPossible(CJS_Context* pContext, const FX_WCHAR* swMsg) {
- CPDFSDK_FormFillEnvironment* pEnv = pContext->GetReaderEnv();
+ CPDFSDK_FormFillEnvironment* pEnv = pContext->GetFormFillEnv();
if (pEnv)
pEnv->JS_appAlert(swMsg, nullptr, 0, 3);
}
@@ -1659,8 +1659,8 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CJS_Context* pContext = static_cast<CJS_Context*>(cc);
CJS_Runtime* pRuntime = CJS_Runtime::FromContext(cc);
- CPDFSDK_Document* pReaderDoc = pContext->GetReaderDocument();
- CPDFSDK_InterForm* pReaderInterForm = pReaderDoc->GetInterForm();
+ CPDFSDK_InterForm* pReaderInterForm =
+ pContext->GetFormFillEnv()->GetSDKDocument()->GetInterForm();
CPDF_InterForm* pInterForm = pReaderInterForm->GetInterForm();
CFX_WideString sFunction = params[0].ToCFXWideString(pRuntime);