summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_ffdocview.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-04-14 18:29:56 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-14 18:29:56 -0700
commitb1a59597db4b8ce3ffc34dbfda2fb1ecb80c2397 (patch)
tree4bef693fc2b5722a86d75ee6110da8c9d5530f6d /xfa/fxfa/app/xfa_ffdocview.cpp
parentb1c80fb8b843a2a345b2cd6005e591dc731355f4 (diff)
downloadpdfium-b1a59597db4b8ce3ffc34dbfda2fb1ecb80c2397.tar.xz
Simplify XFA event handling.
- Avoid casting to void* - Don't bother firing events that no one listens for Review URL: https://codereview.chromium.org/1890563003
Diffstat (limited to 'xfa/fxfa/app/xfa_ffdocview.cpp')
-rw-r--r--xfa/fxfa/app/xfa_ffdocview.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/xfa/fxfa/app/xfa_ffdocview.cpp b/xfa/fxfa/app/xfa_ffdocview.cpp
index 4f818e0dd7..9bc1be0a04 100644
--- a/xfa/fxfa/app/xfa_ffdocview.cpp
+++ b/xfa/fxfa/app/xfa_ffdocview.cpp
@@ -215,16 +215,11 @@ FX_BOOL CXFA_FFDocView::ResetSingleWidgetAccData(CXFA_WidgetAcc* pWidgetAcc) {
if (eType != XFA_ELEMENT_Field && eType != XFA_ELEMENT_ExclGroup) {
return FALSE;
}
- FX_BOOL bNotify = IsStaticNotify();
pWidgetAcc->ResetData();
pWidgetAcc->UpdateUIDisplay();
- if (bNotify) {
- pWidgetAcc->NotifyEvent(XFA_WIDGETEVENT_PostContentChanged, NULL, NULL,
- NULL);
- }
if (CXFA_Validate validate = pWidgetAcc->GetValidate()) {
AddValidateWidget(pWidgetAcc);
- validate.GetNode()->SetFlag(XFA_NODEFLAG_NeedsInitApp, TRUE, FALSE);
+ validate.GetNode()->SetFlag(XFA_NODEFLAG_NeedsInitApp, false);
}
return TRUE;
}
@@ -532,16 +527,9 @@ CXFA_WidgetAcc* CXFA_FFDocView::GetWidgetAccByName(
}
void CXFA_FFDocView::OnPageEvent(CXFA_ContainerLayoutItem* pSender,
- XFA_PAGEEVENT eEvent,
- int32_t iPageIndex) {
+ uint32_t dwEvent) {
CXFA_FFPageView* pFFPageView = static_cast<CXFA_FFPageView*>(pSender);
- if (eEvent == XFA_PAGEEVENT_PageRemoved) {
- m_pDoc->GetDocProvider()->PageViewEvent(pFFPageView,
- XFA_PAGEVIEWEVENT_PostRemoved);
- return;
- }
- m_pDoc->GetDocProvider()->PageViewEvent(pFFPageView,
- XFA_PAGEVIEWEVENT_PostAdded);
+ m_pDoc->GetDocProvider()->PageViewEvent(pFFPageView, dwEvent);
}
void CXFA_FFDocView::LockUpdate() {