summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_widgetdata.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-01-03 17:25:02 -0500
committerChromium commit bot <commit-bot@chromium.org>2018-01-04 16:02:33 +0000
commita0af75cc4d1e50bb2832dc58636043afe565b02b (patch)
tree7474018a95fbefc318e3316074cc982910e9036f /xfa/fxfa/parser/cxfa_widgetdata.cpp
parent4cf0589c4bc388781cbfc8459c4904bb2bd947bf (diff)
downloadpdfium-a0af75cc4d1e50bb2832dc58636043afe565b02b.tar.xz
Fold CXFA_EventData into CXFA_Event
This CL removes the CXFA_EventData wrapper and puts the code into CXFA_Event. Change-Id: I799a641c434ff926f3ddade1f47845b5666dbbec Reviewed-on: https://pdfium-review.googlesource.com/21991 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_widgetdata.cpp')
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index 4a8817812f..5833655156 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -17,7 +17,7 @@
#include "xfa/fxfa/parser/cxfa_comb.h"
#include "xfa/fxfa/parser/cxfa_decimal.h"
#include "xfa/fxfa/parser/cxfa_document.h"
-#include "xfa/fxfa/parser/cxfa_eventdata.h"
+#include "xfa/fxfa/parser/cxfa_event.h"
#include "xfa/fxfa/parser/cxfa_font.h"
#include "xfa/fxfa/parser/cxfa_format.h"
#include "xfa/fxfa/parser/cxfa_items.h"
@@ -287,28 +287,24 @@ CXFA_Para* CXFA_WidgetData::GetPara() {
false);
}
-std::vector<CXFA_Node*> CXFA_WidgetData::GetEventList() {
- return m_pNode->GetNodeList(0, XFA_Element::Event);
-}
-
-std::vector<CXFA_Node*> CXFA_WidgetData::GetEventByActivity(
+std::vector<CXFA_Event*> CXFA_WidgetData::GetEventByActivity(
XFA_AttributeEnum iActivity,
bool bIsFormReady) {
- std::vector<CXFA_Node*> events;
- for (CXFA_Node* pNode : GetEventList()) {
- CXFA_EventData eventData(pNode);
- if (eventData.GetActivity() == iActivity) {
+ std::vector<CXFA_Event*> events;
+ for (CXFA_Node* node : m_pNode->GetNodeList(0, XFA_Element::Event)) {
+ auto* event = static_cast<CXFA_Event*>(node);
+ if (event->GetActivity() == iActivity) {
if (iActivity == XFA_AttributeEnum::Ready) {
- WideString wsRef = eventData.GetRef();
+ WideString wsRef = event->GetRef();
if (bIsFormReady) {
if (wsRef == WideStringView(L"$form"))
- events.push_back(pNode);
+ events.push_back(event);
} else {
if (wsRef == WideStringView(L"$layout"))
- events.push_back(pNode);
+ events.push_back(event);
}
} else {
- events.push_back(pNode);
+ events.push_back(event);
}
}
}