summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-02 13:02:28 -0700
committerCommit bot <commit-bot@chromium.org>2016-11-02 13:02:28 -0700
commit521b7508dfe8ab93975eeb9f4ef8068012c4dbd8 (patch)
treed51fec17bafc8c4ac70a7f80932749551ee6e5ff /fpdfsdk/javascript
parent25ec646b2c128a6beaa961ec2b2eeb673ed034ca (diff)
downloadpdfium-521b7508dfe8ab93975eeb9f4ef8068012c4dbd8.tar.xz
Rename CPDFXFA_Document to CPDFXFA_Context
The CPDFXFA_Document class isn't a document, it contains documents. Renamed to make the purpose a bit clearer. Review-Url: https://codereview.chromium.org/2469813004
Diffstat (limited to 'fpdfsdk/javascript')
-rw-r--r--fpdfsdk/javascript/app.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/javascript/app.cpp b/fpdfsdk/javascript/app.cpp
index 394f49e143..4d79e41f7a 100644
--- a/fpdfsdk/javascript/app.cpp
+++ b/fpdfsdk/javascript/app.cpp
@@ -291,9 +291,9 @@ FX_BOOL app::viewerVersion(IJS_Context* cc,
if (!vp.IsGetting())
return FALSE;
#ifdef PDF_ENABLE_XFA
- CJS_Context* pContext = (CJS_Context*)cc;
- CPDFXFA_Document* pDoc = pContext->GetFormFillEnv()->GetXFADocument();
- if (pDoc->GetDocType() == 1 || pDoc->GetDocType() == 2) {
+ CJS_Context* pJSContext = static_cast<CJS_Context*>(cc);
+ CPDFXFA_Context* pXFAContext = pJSContext->GetFormFillEnv()->GetXFAContext();
+ if (pXFAContext->GetDocType() == 1 || pXFAContext->GetDocType() == 2) {
vp << JS_NUM_VIEWERVERSION_XFA;
return TRUE;
}