summaryrefslogtreecommitdiff
path: root/fxjs/cjx_eventpseudomodel.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-01 20:51:27 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-01 20:51:27 +0000
commit14fe518ae67eac22cc169517e69092f62a195913 (patch)
tree5dc56f72eb362ece77e24d01cb58c8536a42c2c2 /fxjs/cjx_eventpseudomodel.cpp
parent1bc5e494b675aeb5e73cae1d0d3cfad341a05a60 (diff)
downloadpdfium-14fe518ae67eac22cc169517e69092f62a195913.tar.xz
Add GetDocument() helper to CJX_Object
Change-Id: I710ea0baa1befb093d7174d4fc61a5ab28e9f92a Reviewed-on: https://pdfium-review.googlesource.com/17315 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/cjx_eventpseudomodel.cpp')
-rw-r--r--fxjs/cjx_eventpseudomodel.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/fxjs/cjx_eventpseudomodel.cpp b/fxjs/cjx_eventpseudomodel.cpp
index 62b4ec848a..04d09d7350 100644
--- a/fxjs/cjx_eventpseudomodel.cpp
+++ b/fxjs/cjx_eventpseudomodel.cpp
@@ -47,10 +47,6 @@ CJX_EventPseudoModel::CJX_EventPseudoModel(CScript_EventPseudoModel* model)
CJX_EventPseudoModel::~CJX_EventPseudoModel() {}
-CScript_EventPseudoModel* CJX_EventPseudoModel::GetXFAEventPseudoModel() {
- return static_cast<CScript_EventPseudoModel*>(GetXFAObject());
-}
-
void CJX_EventPseudoModel::Change(CFXJSE_Value* pValue,
bool bSetting,
XFA_ATTRIBUTE eAttribute) {
@@ -148,8 +144,7 @@ void CJX_EventPseudoModel::Target(CFXJSE_Value* pValue,
}
void CJX_EventPseudoModel::Emit(CFXJSE_Arguments* pArguments) {
- CFXJSE_Engine* pScriptContext =
- GetXFAEventPseudoModel()->GetDocument()->GetScriptContext();
+ CFXJSE_Engine* pScriptContext = GetDocument()->GetScriptContext();
if (!pScriptContext)
return;
@@ -157,7 +152,7 @@ void CJX_EventPseudoModel::Emit(CFXJSE_Arguments* pArguments) {
if (!pEventParam)
return;
- CXFA_FFNotify* pNotify = GetXFAEventPseudoModel()->GetDocument()->GetNotify();
+ CXFA_FFNotify* pNotify = GetDocument()->GetNotify();
if (!pNotify)
return;
@@ -169,8 +164,7 @@ void CJX_EventPseudoModel::Emit(CFXJSE_Arguments* pArguments) {
}
void CJX_EventPseudoModel::Reset(CFXJSE_Arguments* pArguments) {
- CFXJSE_Engine* pScriptContext =
- GetXFAEventPseudoModel()->GetDocument()->GetScriptContext();
+ CFXJSE_Engine* pScriptContext = GetDocument()->GetScriptContext();
if (!pScriptContext)
return;
@@ -184,8 +178,7 @@ void CJX_EventPseudoModel::Reset(CFXJSE_Arguments* pArguments) {
void CJX_EventPseudoModel::Property(CFXJSE_Value* pValue,
XFA_Event dwFlag,
bool bSetting) {
- CFXJSE_Engine* pScriptContext =
- GetXFAEventPseudoModel()->GetDocument()->GetScriptContext();
+ CFXJSE_Engine* pScriptContext = GetDocument()->GetScriptContext();
if (!pScriptContext)
return;