summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffdocview.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-04 15:43:00 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-04 21:03:11 +0000
commitb7e315c203c2af29ae56c2a6287547bc702c4cd3 (patch)
tree4965b798ff7aa821ebd803458ba7f53bc0d5d039 /xfa/fxfa/cxfa_ffdocview.cpp
parent24d779283af803077d8377fbdc49d9d07da335e7 (diff)
downloadpdfium-b7e315c203c2af29ae56c2a6287547bc702c4cd3.tar.xz
Remove CXFA_FFDocView from CXFA_WidgetAcc.
This CL removes the CXFA_FFDocView parameter from CXFA_WidgetAcc and passes in the document to the methods which require a document. Change-Id: I7b264caf0ed89d0453ae0b74c27f2ee0f31f61af Reviewed-on: https://pdfium-review.googlesource.com/22260 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_ffdocview.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffdocview.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/xfa/fxfa/cxfa_ffdocview.cpp b/xfa/fxfa/cxfa_ffdocview.cpp
index 9468624780..a2f5ac4bb1 100644
--- a/xfa/fxfa/cxfa_ffdocview.cpp
+++ b/xfa/fxfa/cxfa_ffdocview.cpp
@@ -413,12 +413,11 @@ static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView,
switch (pParam->m_eType) {
case XFA_EVENT_Calculate:
- return pWidgetAcc->ProcessCalculate();
+ return pWidgetAcc->ProcessCalculate(pDocView);
case XFA_EVENT_Validate:
- if (((CXFA_FFDoc*)pDocView->GetDoc())
- ->GetDocEnvironment()
- ->IsValidationsEnabled(pDocView->GetDoc())) {
- return pWidgetAcc->ProcessValidate(0x01);
+ if (pDocView->GetDoc()->GetDocEnvironment()->IsValidationsEnabled(
+ pDocView->GetDoc())) {
+ return pWidgetAcc->ProcessValidate(pDocView, 0x01);
}
return XFA_EVENTERROR_Disabled;
case XFA_EVENT_InitCalculate: {
@@ -428,13 +427,14 @@ static int32_t XFA_ProcessEvent(CXFA_FFDocView* pDocView,
if (pWidgetAcc->GetNode()->IsUserInteractive())
return XFA_EVENTERROR_Disabled;
- return pWidgetAcc->ExecuteScript(calc->GetScript(), pParam);
+ return pWidgetAcc->ExecuteScript(pDocView, calc->GetScript(), pParam);
}
default:
break;
}
- return pWidgetAcc->ProcessEvent(gs_EventActivity[pParam->m_eType], pParam);
+ return pWidgetAcc->ProcessEvent(pDocView, gs_EventActivity[pParam->m_eType],
+ pParam);
}
int32_t CXFA_FFDocView::ExecEventActivityByDeepFirst(CXFA_Node* pFormNode,
@@ -587,7 +587,7 @@ void CXFA_FFDocView::RunSubformIndexChange() {
CXFA_EventParam eParam;
eParam.m_eType = XFA_EVENT_IndexChange;
eParam.m_pTarget = pWidgetAcc;
- pWidgetAcc->ProcessEvent(XFA_AttributeEnum::IndexChange, &eParam);
+ pWidgetAcc->ProcessEvent(this, XFA_AttributeEnum::IndexChange, &eParam);
}
m_IndexChangedSubforms.clear();
}
@@ -648,7 +648,7 @@ size_t CXFA_FFDocView::RunCalculateRecursive(size_t index) {
pCurAcc->GetNode()->JSObject()->SetCalcRecursionCount(recurse);
if (recurse > 11)
break;
- if (pCurAcc->ProcessCalculate() == XFA_EVENTERROR_Success)
+ if (pCurAcc->ProcessCalculate(this) == XFA_EVENTERROR_Success)
AddValidateWidget(pCurAcc);
index = RunCalculateRecursive(++index);
@@ -701,7 +701,7 @@ bool CXFA_FFDocView::RunValidate() {
for (CXFA_WidgetAcc* pAcc : m_ValidateAccs) {
if (!pAcc->GetNode()->HasRemovedChildren())
- pAcc->ProcessValidate(0);
+ pAcc->ProcessValidate(this, 0);
}
m_ValidateAccs.clear();
return true;