summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_widget.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-22 22:01:57 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-01-22 22:01:57 +0000
commit1ca42167e5913eddf57f137fd7b4cc2110b6cd1f (patch)
tree33f018384bc7b974270cfcb19065815beb54a126 /fpdfsdk/cpdfsdk_widget.cpp
parent9ccf4047a6f36e9c0863541437af7734a04ca676 (diff)
downloadpdfium-1ca42167e5913eddf57f137fd7b4cc2110b6cd1f.tar.xz
Convert CXFA_FFWidgetHandler to use CXFA_Node
This CL removes CXFA_WidgetAcc from CXFA_FFWidgetHandler and uses CXFA_Node directly. Change-Id: I88cf1edc53f4489aeac018a95e9d5936d85106db Reviewed-on: https://pdfium-review.googlesource.com/23450 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_widget.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_widget.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/fpdfsdk/cpdfsdk_widget.cpp b/fpdfsdk/cpdfsdk_widget.cpp
index 184c223736..ffb4dde286 100644
--- a/fpdfsdk/cpdfsdk_widget.cpp
+++ b/fpdfsdk/cpdfsdk_widget.cpp
@@ -210,7 +210,7 @@ bool CPDFSDK_Widget::HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT) {
if (CXFA_FFWidget* hGroupWidget = GetGroupMixXFAWidget()) {
CXFA_Node* node = hGroupWidget->GetNode();
if (node->IsWidgetReady()) {
- if (pXFAWidgetHandler->HasEvent(node->GetWidgetAcc(), eEventType))
+ if (pXFAWidgetHandler->HasEvent(node, eEventType))
return true;
}
}
@@ -218,7 +218,7 @@ bool CPDFSDK_Widget::HasXFAAAction(PDFSDK_XFAAActionType eXFAAAT) {
CXFA_Node* node = hWidget->GetNode();
if (!node->IsWidgetReady())
return false;
- return pXFAWidgetHandler->HasEvent(node->GetWidgetAcc(), eEventType);
+ return pXFAWidgetHandler->HasEvent(node, eEventType);
}
bool CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT,
@@ -263,9 +263,8 @@ bool CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT,
if (!node->IsWidgetReady())
return false;
- CXFA_WidgetAcc* pAcc = node->GetWidgetAcc();
- param.m_pTarget = pAcc;
- if (pXFAWidgetHandler->ProcessEvent(pAcc, &param) !=
+ param.m_pTarget = node->GetWidgetAcc();
+ if (pXFAWidgetHandler->ProcessEvent(node, &param) !=
XFA_EVENTERROR_Success) {
return false;
}
@@ -275,9 +274,8 @@ bool CPDFSDK_Widget::OnXFAAAction(PDFSDK_XFAAActionType eXFAAAT,
int32_t nRet = XFA_EVENTERROR_NotExist;
CXFA_Node* node = hWidget->GetNode();
if (node->IsWidgetReady()) {
- CXFA_WidgetAcc* pAcc = node->GetWidgetAcc();
- param.m_pTarget = pAcc;
- nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
+ param.m_pTarget = node->GetWidgetAcc();
+ nRet = pXFAWidgetHandler->ProcessEvent(node, &param);
}
if (CXFA_FFDocView* pDocView = pContext->GetXFADocView())
pDocView->UpdateDocView();
@@ -1018,9 +1016,8 @@ bool CPDFSDK_Widget::OnAAction(CPDF_AAction::AActionType type,
int32_t nRet = XFA_EVENTERROR_NotExist;
CXFA_Node* node = hWidget->GetNode();
if (node->IsWidgetReady()) {
- CXFA_WidgetAcc* pAcc = node->GetWidgetAcc();
- param.m_pTarget = pAcc;
- nRet = pXFAWidgetHandler->ProcessEvent(pAcc, &param);
+ param.m_pTarget = node->GetWidgetAcc();
+ nRet = pXFAWidgetHandler->ProcessEvent(node, &param);
}
if (CXFA_FFDocView* pDocView = pContext->GetXFADocView())