diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-04 15:43:00 -0500 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-04 21:03:11 +0000 |
commit | b7e315c203c2af29ae56c2a6287547bc702c4cd3 (patch) | |
tree | 4965b798ff7aa821ebd803458ba7f53bc0d5d039 /fpdfsdk/fpdfxfa | |
parent | 24d779283af803077d8377fbdc49d9d07da335e7 (diff) | |
download | pdfium-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 'fpdfsdk/fpdfxfa')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp index fd385aa4ae..4bcab5c690 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp @@ -613,16 +613,16 @@ bool CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() { if (!m_pContext->ContainsXFAForm()) return true; - if (!m_pContext->GetXFADocView()) + CXFA_FFDocView* docView = m_pContext->GetXFADocView(); + if (!docView) return true; - CXFA_FFWidgetHandler* pWidgetHandler = - m_pContext->GetXFADocView()->GetWidgetHandler(); + CXFA_FFWidgetHandler* pWidgetHandler = docView->GetWidgetHandler(); if (!pWidgetHandler) return true; std::unique_ptr<CXFA_WidgetAccIterator> pWidgetAccIterator = - m_pContext->GetXFADocView()->CreateWidgetAccIterator(); + docView->CreateWidgetAccIterator(); if (pWidgetAccIterator) { CXFA_EventParam Param; Param.m_eType = XFA_EVENT_PreSubmit; @@ -630,14 +630,14 @@ bool CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() { pWidgetHandler->ProcessEvent(pWidgetAcc, &Param); } - pWidgetAccIterator = m_pContext->GetXFADocView()->CreateWidgetAccIterator(); + pWidgetAccIterator = docView->CreateWidgetAccIterator(); if (!pWidgetAccIterator) return true; CXFA_WidgetAcc* pWidgetAcc = pWidgetAccIterator->MoveToNext(); pWidgetAcc = pWidgetAccIterator->MoveToNext(); while (pWidgetAcc) { - int fRet = pWidgetAcc->ProcessValidate(-1); + int fRet = pWidgetAcc->ProcessValidate(docView, -1); if (fRet == XFA_EVENTERROR_Error) { CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv(); if (!pFormFillEnv) @@ -653,7 +653,7 @@ bool CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() { } pWidgetAcc = pWidgetAccIterator->MoveToNext(); } - m_pContext->GetXFADocView()->UpdateDocView(); + docView->UpdateDocView(); return true; } |