summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-16 13:37:46 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-16 13:37:46 -0700
commitc6450bb06b69528406a2a261c70c4ea769965a8d (patch)
tree8647dafb8464c0ee22a64a4a8f100d40714af34a /xfa
parentcc4d6d85b58a7a1d9d7b798c63d3343f3dac06a9 (diff)
downloadpdfium-c6450bb06b69528406a2a261c70c4ea769965a8d.tar.xz
Remove XFA_WIDGETEVENT defines
The XFA_WIDGETEVENT defines were used to allow one method to handle the PostAdd and PreRemove calls. The calls only shared setup code. This CL splits the WidgetEvent method into two, one for PostAdd and one for PreRemove and updates the only two callers to call the correct variant. Review-Url: https://codereview.chromium.org/1982033002
Diffstat (limited to 'xfa')
-rw-r--r--xfa/fxfa/app/xfa_ffnotify.cpp6
-rw-r--r--xfa/fxfa/include/fxfa.h9
2 files changed, 6 insertions, 9 deletions
diff --git a/xfa/fxfa/app/xfa_ffnotify.cpp b/xfa/fxfa/app/xfa_ffnotify.cpp
index b6e64d04b7..a28888e7d8 100644
--- a/xfa/fxfa/app/xfa_ffnotify.cpp
+++ b/xfa/fxfa/app/xfa_ffnotify.cpp
@@ -481,8 +481,7 @@ void CXFA_FFNotify::OnLayoutItemAdded(CXFA_LayoutProcessor* pLayout,
(dwStatus & (XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable)) ==
(XFA_WIDGETSTATUS_Visible | XFA_WIDGETSTATUS_Viewable)) {
pWidget->SetPageView(pNewPageView);
- m_pDoc->GetDocProvider()->WidgetEvent(pWidget, pWidget->GetDataAcc(),
- XFA_WIDGETEVENT_PostAdded);
+ m_pDoc->GetDocProvider()->WidgetPostAdd(pWidget, pWidget->GetDataAcc());
}
if (pDocView->GetLayoutStatus() != XFA_DOCVIEW_LAYOUTSTATUS_End ||
!(dwStatus & XFA_WIDGETSTATUS_Visible)) {
@@ -510,7 +509,6 @@ void CXFA_FFNotify::OnLayoutItemRemoving(CXFA_LayoutProcessor* pLayout,
return;
pDocView->DeleteLayoutItem(pWidget);
- m_pDoc->GetDocProvider()->WidgetEvent(pWidget, pWidget->GetDataAcc(),
- XFA_WIDGETEVENT_PreRemoved);
+ m_pDoc->GetDocProvider()->WidgetPreRemove(pWidget, pWidget->GetDataAcc());
pWidget->AddInvalidateRect(nullptr);
}
diff --git a/xfa/fxfa/include/fxfa.h b/xfa/fxfa/include/fxfa.h
index a173a0e299..582702220f 100644
--- a/xfa/fxfa/include/fxfa.h
+++ b/xfa/fxfa/include/fxfa.h
@@ -164,8 +164,6 @@ class IXFA_WidgetIterator;
#define XFA_PAGEVIEWEVENT_PostAdded 1
#define XFA_PAGEVIEWEVENT_PostRemoved 3
#define XFA_PAGEVIEWEVENT_StopLayout 4
-#define XFA_WIDGETEVENT_PostAdded 2
-#define XFA_WIDGETEVENT_PreRemoved 3
#define XFA_EVENTERROR_Success 1
#define XFA_EVENTERROR_Error -1
@@ -404,9 +402,10 @@ class IXFA_DocProvider {
CFX_PointF ptPopup,
const CFX_RectF* pRectExclude = NULL) = 0;
virtual void PageViewEvent(CXFA_FFPageView* pPageView, uint32_t dwFlags) = 0;
- virtual void WidgetEvent(CXFA_FFWidget* hWidget,
- CXFA_WidgetAcc* pWidgetData,
- uint32_t dwEvent) = 0;
+ virtual void WidgetPostAdd(CXFA_FFWidget* hWidget,
+ CXFA_WidgetAcc* pWidgetData) = 0;
+ virtual void WidgetPreRemove(CXFA_FFWidget* hWidget,
+ CXFA_WidgetAcc* pWidgetData) = 0;
virtual FX_BOOL RenderCustomWidget(CXFA_FFWidget* hWidget,
CFX_Graphics* pGS,
CFX_Matrix* pMatrix,