diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-22 22:01:57 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-22 22:01:57 +0000 |
commit | 1ca42167e5913eddf57f137fd7b4cc2110b6cd1f (patch) | |
tree | 33f018384bc7b974270cfcb19065815beb54a126 /fpdfsdk/cpdfsdk_widget.cpp | |
parent | 9ccf4047a6f36e9c0863541437af7734a04ca676 (diff) | |
download | pdfium-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.cpp | 19 |
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, ¶m) != + param.m_pTarget = node->GetWidgetAcc(); + if (pXFAWidgetHandler->ProcessEvent(node, ¶m) != 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, ¶m); + param.m_pTarget = node->GetWidgetAcc(); + nRet = pXFAWidgetHandler->ProcessEvent(node, ¶m); } 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, ¶m); + param.m_pTarget = node->GetWidgetAcc(); + nRet = pXFAWidgetHandler->ProcessEvent(node, ¶m); } if (CXFA_FFDocView* pDocView = pContext->GetXFADocView()) |