summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_widgetacc.cpp12
-rw-r--r--xfa/fxfa/cxfa_widgetacc.h5
-rw-r--r--xfa/fxfa/parser/cxfa_eventdata.cpp (renamed from xfa/fxfa/parser/cxfa_event.cpp)16
-rw-r--r--xfa/fxfa/parser/cxfa_eventdata.h (renamed from xfa/fxfa/parser/cxfa_event.h)10
-rw-r--r--xfa/fxfa/parser/cxfa_widgetdata.cpp8
5 files changed, 26 insertions, 25 deletions
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp
index 9be0bdb203..ea262f874d 100644
--- a/xfa/fxfa/cxfa_widgetacc.cpp
+++ b/xfa/fxfa/cxfa_widgetacc.cpp
@@ -287,7 +287,7 @@ int32_t CXFA_WidgetAcc::ProcessEvent(int32_t iActivity,
bool first = true;
int32_t iRet = XFA_EVENTERROR_NotExist;
for (CXFA_Node* pNode : eventArray) {
- int32_t result = ProcessEvent(CXFA_Event(pNode), pEventParam);
+ int32_t result = ProcessEvent(CXFA_EventData(pNode), pEventParam);
if (first || result == XFA_EVENTERROR_Success)
iRet = result;
first = false;
@@ -295,21 +295,21 @@ int32_t CXFA_WidgetAcc::ProcessEvent(int32_t iActivity,
return iRet;
}
-int32_t CXFA_WidgetAcc::ProcessEvent(const CXFA_Event& event,
+int32_t CXFA_WidgetAcc::ProcessEvent(const CXFA_EventData& eventData,
CXFA_EventParam* pEventParam) {
- if (!event)
+ if (!eventData)
return XFA_EVENTERROR_NotExist;
- switch (event.GetEventType()) {
+ switch (eventData.GetEventType()) {
case XFA_Element::Execute:
break;
case XFA_Element::Script:
- return ExecuteScript(event.GetScript(), pEventParam);
+ return ExecuteScript(eventData.GetScript(), pEventParam);
case XFA_Element::SignData:
break;
case XFA_Element::Submit:
return GetDoc()->GetDocEnvironment()->SubmitData(GetDoc(),
- event.GetSubmit());
+ eventData.GetSubmit());
default:
break;
}
diff --git a/xfa/fxfa/cxfa_widgetacc.h b/xfa/fxfa/cxfa_widgetacc.h
index 718dcf3a63..4d66ff3b5a 100644
--- a/xfa/fxfa/cxfa_widgetacc.h
+++ b/xfa/fxfa/cxfa_widgetacc.h
@@ -15,7 +15,7 @@
#include "core/fxge/dib/cfx_dibitmap.h"
#include "core/fxge/fx_dib.h"
#include "xfa/fxfa/parser/cxfa_boxdata.h"
-#include "xfa/fxfa/parser/cxfa_event.h"
+#include "xfa/fxfa/parser/cxfa_eventdata.h"
#include "xfa/fxfa/parser/cxfa_image.h"
#include "xfa/fxfa/parser/cxfa_margin.h"
#include "xfa/fxfa/parser/cxfa_script.h"
@@ -45,7 +45,8 @@ class CXFA_WidgetAcc : public CXFA_WidgetData {
bool ProcessValueChanged();
int32_t ProcessEvent(int32_t iActivity, CXFA_EventParam* pEventParam);
- int32_t ProcessEvent(const CXFA_Event& event, CXFA_EventParam* pEventParam);
+ int32_t ProcessEvent(const CXFA_EventData& eventData,
+ CXFA_EventParam* pEventParam);
int32_t ProcessCalculate();
int32_t ProcessValidate(int32_t iFlags);
int32_t ExecuteScript(CXFA_Script script, CXFA_EventParam* pEventParam);
diff --git a/xfa/fxfa/parser/cxfa_event.cpp b/xfa/fxfa/parser/cxfa_eventdata.cpp
index 8ba68fb294..5b48df6d88 100644
--- a/xfa/fxfa/parser/cxfa_event.cpp
+++ b/xfa/fxfa/parser/cxfa_eventdata.cpp
@@ -4,17 +4,17 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/fxfa/parser/cxfa_event.h"
+#include "xfa/fxfa/parser/cxfa_eventdata.h"
#include "xfa/fxfa/parser/cxfa_node.h"
-CXFA_Event::CXFA_Event(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+CXFA_EventData::CXFA_EventData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-int32_t CXFA_Event::GetActivity() {
+int32_t CXFA_EventData::GetActivity() {
return m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Activity);
}
-XFA_Element CXFA_Event::GetEventType() const {
+XFA_Element CXFA_EventData::GetEventType() const {
CXFA_Node* pChild = m_pNode->GetNodeItem(XFA_NODEITEM_FirstChild);
while (pChild) {
XFA_Element eType = pChild->GetElementType();
@@ -26,19 +26,19 @@ XFA_Element CXFA_Event::GetEventType() const {
return XFA_Element::Unknown;
}
-void CXFA_Event::GetRef(WideStringView& wsRef) {
+void CXFA_EventData::GetRef(WideStringView& wsRef) {
m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Ref, wsRef, true);
}
-CXFA_Script CXFA_Event::GetScript() const {
+CXFA_Script CXFA_EventData::GetScript() const {
return CXFA_Script(m_pNode->GetChild(0, XFA_Element::Script, false));
}
-CXFA_Submit CXFA_Event::GetSubmit() const {
+CXFA_Submit CXFA_EventData::GetSubmit() const {
return CXFA_Submit(m_pNode->GetChild(0, XFA_Element::Submit, false));
}
-void CXFA_Event::GetSignDataTarget(WideString& wsTarget) {
+void CXFA_EventData::GetSignDataTarget(WideString& wsTarget) {
CXFA_Node* pNode =
m_pNode->JSNode()->GetProperty(0, XFA_Element::SignData, true);
if (!pNode)
diff --git a/xfa/fxfa/parser/cxfa_event.h b/xfa/fxfa/parser/cxfa_eventdata.h
index 3835454c28..b6fdc48e99 100644
--- a/xfa/fxfa/parser/cxfa_event.h
+++ b/xfa/fxfa/parser/cxfa_eventdata.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef XFA_FXFA_PARSER_CXFA_EVENT_H_
-#define XFA_FXFA_PARSER_CXFA_EVENT_H_
+#ifndef XFA_FXFA_PARSER_CXFA_EVENTDATA_H_
+#define XFA_FXFA_PARSER_CXFA_EVENTDATA_H_
#include <stdint.h>
@@ -16,9 +16,9 @@
class CXFA_Node;
-class CXFA_Event : public CXFA_Data {
+class CXFA_EventData : public CXFA_Data {
public:
- explicit CXFA_Event(CXFA_Node* pNode);
+ explicit CXFA_EventData(CXFA_Node* pNode);
int32_t GetActivity();
XFA_Element GetEventType() const;
@@ -28,4 +28,4 @@ class CXFA_Event : public CXFA_Data {
void GetSignDataTarget(WideString& wsTarget);
};
-#endif // XFA_FXFA_PARSER_CXFA_EVENT_H_
+#endif // XFA_FXFA_PARSER_CXFA_EVENTDATA_H_
diff --git a/xfa/fxfa/parser/cxfa_widgetdata.cpp b/xfa/fxfa/parser/cxfa_widgetdata.cpp
index ccce8cf501..362f0b5e54 100644
--- a/xfa/fxfa/parser/cxfa_widgetdata.cpp
+++ b/xfa/fxfa/parser/cxfa_widgetdata.cpp
@@ -12,7 +12,7 @@
#include "third_party/base/stl_util.h"
#include "xfa/fxfa/cxfa_ffnotify.h"
#include "xfa/fxfa/parser/cxfa_document.h"
-#include "xfa/fxfa/parser/cxfa_event.h"
+#include "xfa/fxfa/parser/cxfa_eventdata.h"
#include "xfa/fxfa/parser/cxfa_localevalue.h"
#include "xfa/fxfa/parser/cxfa_measurement.h"
#include "xfa/fxfa/parser/cxfa_node.h"
@@ -311,11 +311,11 @@ std::vector<CXFA_Node*> CXFA_WidgetData::GetEventByActivity(int32_t iActivity,
bool bIsFormReady) {
std::vector<CXFA_Node*> events;
for (CXFA_Node* pNode : GetEventList()) {
- CXFA_Event event(pNode);
- if (event.GetActivity() == iActivity) {
+ CXFA_EventData eventData(pNode);
+ if (eventData.GetActivity() == iActivity) {
if (iActivity == XFA_ATTRIBUTEENUM_Ready) {
WideStringView wsRef;
- event.GetRef(wsRef);
+ eventData.GetRef(wsRef);
if (bIsFormReady) {
if (wsRef == WideStringView(L"$form"))
events.push_back(pNode);