summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r--xfa/fxfa/parser/cxfa_eventdata.cpp6
-rw-r--r--xfa/fxfa/parser/cxfa_eventdata.h4
-rw-r--r--xfa/fxfa/parser/cxfa_submit.cpp16
-rw-r--r--xfa/fxfa/parser/cxfa_submit.h6
-rw-r--r--xfa/fxfa/parser/cxfa_submitdata.cpp27
-rw-r--r--xfa/fxfa/parser/cxfa_submitdata.h26
6 files changed, 28 insertions, 57 deletions
diff --git a/xfa/fxfa/parser/cxfa_eventdata.cpp b/xfa/fxfa/parser/cxfa_eventdata.cpp
index 0250346d85..062d881cda 100644
--- a/xfa/fxfa/parser/cxfa_eventdata.cpp
+++ b/xfa/fxfa/parser/cxfa_eventdata.cpp
@@ -7,6 +7,7 @@
#include "xfa/fxfa/parser/cxfa_eventdata.h"
#include "xfa/fxfa/parser/cxfa_node.h"
+#include "xfa/fxfa/parser/cxfa_submit.h"
CXFA_EventData::CXFA_EventData(CXFA_Node* pNode) : CXFA_DataData(pNode) {}
@@ -34,6 +35,7 @@ CXFA_ScriptData CXFA_EventData::GetScriptData() const {
return CXFA_ScriptData(m_pNode->GetChild(0, XFA_Element::Script, false));
}
-CXFA_SubmitData CXFA_EventData::GetSubmitData() const {
- return CXFA_SubmitData(m_pNode->GetChild(0, XFA_Element::Submit, false));
+CXFA_Submit* CXFA_EventData::GetSubmit() const {
+ return static_cast<CXFA_Submit*>(
+ m_pNode->GetChild(0, XFA_Element::Submit, false));
}
diff --git a/xfa/fxfa/parser/cxfa_eventdata.h b/xfa/fxfa/parser/cxfa_eventdata.h
index 4e386430dc..63349690ab 100644
--- a/xfa/fxfa/parser/cxfa_eventdata.h
+++ b/xfa/fxfa/parser/cxfa_eventdata.h
@@ -12,9 +12,9 @@
#include "core/fxcrt/fx_string.h"
#include "xfa/fxfa/parser/cxfa_datadata.h"
#include "xfa/fxfa/parser/cxfa_scriptdata.h"
-#include "xfa/fxfa/parser/cxfa_submitdata.h"
class CXFA_Node;
+class CXFA_Submit;
class CXFA_EventData : public CXFA_DataData {
public:
@@ -23,7 +23,7 @@ class CXFA_EventData : public CXFA_DataData {
XFA_AttributeEnum GetActivity();
XFA_Element GetEventType() const;
CXFA_ScriptData GetScriptData() const;
- CXFA_SubmitData GetSubmitData() const;
+ CXFA_Submit* GetSubmit() const;
WideString GetRef() const;
};
diff --git a/xfa/fxfa/parser/cxfa_submit.cpp b/xfa/fxfa/parser/cxfa_submit.cpp
index 04255f8dc5..e4558e865a 100644
--- a/xfa/fxfa/parser/cxfa_submit.cpp
+++ b/xfa/fxfa/parser/cxfa_submit.cpp
@@ -41,3 +41,19 @@ CXFA_Submit::CXFA_Submit(CXFA_Document* doc, XFA_PacketType packet)
pdfium::MakeUnique<CJX_Submit>(this)) {}
CXFA_Submit::~CXFA_Submit() {}
+
+bool CXFA_Submit::IsSubmitEmbedPDF() {
+ return JSObject()->GetBoolean(XFA_Attribute::EmbedPDF);
+}
+
+XFA_AttributeEnum CXFA_Submit::GetSubmitFormat() {
+ return JSObject()->GetEnum(XFA_Attribute::Format);
+}
+
+WideString CXFA_Submit::GetSubmitTarget() {
+ return JSObject()->GetCData(XFA_Attribute::Target);
+}
+
+WideString CXFA_Submit::GetSubmitXDPContent() {
+ return JSObject()->GetCData(XFA_Attribute::XdpContent);
+}
diff --git a/xfa/fxfa/parser/cxfa_submit.h b/xfa/fxfa/parser/cxfa_submit.h
index 2b9b5e8c69..24d5f11796 100644
--- a/xfa/fxfa/parser/cxfa_submit.h
+++ b/xfa/fxfa/parser/cxfa_submit.h
@@ -7,12 +7,18 @@
#ifndef XFA_FXFA_PARSER_CXFA_SUBMIT_H_
#define XFA_FXFA_PARSER_CXFA_SUBMIT_H_
+#include "core/fxcrt/widestring.h"
#include "xfa/fxfa/parser/cxfa_node.h"
class CXFA_Submit : public CXFA_Node {
public:
CXFA_Submit(CXFA_Document* doc, XFA_PacketType packet);
~CXFA_Submit() override;
+
+ bool IsSubmitEmbedPDF();
+ XFA_AttributeEnum GetSubmitFormat();
+ WideString GetSubmitTarget();
+ WideString GetSubmitXDPContent();
};
#endif // XFA_FXFA_PARSER_CXFA_SUBMIT_H_
diff --git a/xfa/fxfa/parser/cxfa_submitdata.cpp b/xfa/fxfa/parser/cxfa_submitdata.cpp
deleted file mode 100644
index 20dce38652..0000000000
--- a/xfa/fxfa/parser/cxfa_submitdata.cpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2016 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#include "xfa/fxfa/parser/cxfa_submitdata.h"
-
-#include "xfa/fxfa/parser/cxfa_node.h"
-
-CXFA_SubmitData::CXFA_SubmitData(CXFA_Node* pNode) : CXFA_DataData(pNode) {}
-
-bool CXFA_SubmitData::IsSubmitEmbedPDF() const {
- return m_pNode->JSObject()->GetBoolean(XFA_Attribute::EmbedPDF);
-}
-
-XFA_AttributeEnum CXFA_SubmitData::GetSubmitFormat() const {
- return m_pNode->JSObject()->GetEnum(XFA_Attribute::Format);
-}
-
-WideString CXFA_SubmitData::GetSubmitTarget() const {
- return m_pNode->JSObject()->GetCData(XFA_Attribute::Target);
-}
-
-WideString CXFA_SubmitData::GetSubmitXDPContent() const {
- return m_pNode->JSObject()->GetCData(XFA_Attribute::XdpContent);
-}
diff --git a/xfa/fxfa/parser/cxfa_submitdata.h b/xfa/fxfa/parser/cxfa_submitdata.h
deleted file mode 100644
index 55f06f945a..0000000000
--- a/xfa/fxfa/parser/cxfa_submitdata.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2016 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef XFA_FXFA_PARSER_CXFA_SUBMITDATA_H_
-#define XFA_FXFA_PARSER_CXFA_SUBMITDATA_H_
-
-#include "core/fxcrt/fx_string.h"
-#include "core/fxcrt/fx_system.h"
-#include "xfa/fxfa/parser/cxfa_datadata.h"
-
-class CXFA_Node;
-
-class CXFA_SubmitData : public CXFA_DataData {
- public:
- explicit CXFA_SubmitData(CXFA_Node* pNode);
-
- bool IsSubmitEmbedPDF() const;
- XFA_AttributeEnum GetSubmitFormat() const;
- WideString GetSubmitTarget() const;
- WideString GetSubmitXDPContent() const;
-};
-
-#endif // XFA_FXFA_PARSER_CXFA_SUBMITDATA_H_