summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--BUILD.gn4
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp15
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h4
-rw-r--r--xfa/fxfa/cxfa_widgetacc.cpp4
-rw-r--r--xfa/fxfa/fxfa.h2
-rw-r--r--xfa/fxfa/parser/cxfa_eventdata.cpp4
-rw-r--r--xfa/fxfa/parser/cxfa_eventdata.h4
-rw-r--r--xfa/fxfa/parser/cxfa_submitdata.cpp (renamed from xfa/fxfa/parser/cxfa_submit.cpp)12
-rw-r--r--xfa/fxfa/parser/cxfa_submitdata.h (renamed from xfa/fxfa/parser/cxfa_submit.h)10
9 files changed, 30 insertions, 29 deletions
diff --git a/BUILD.gn b/BUILD.gn
index bb724d50d5..29d83a5fed 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1869,8 +1869,8 @@ if (pdf_enable_xfa) {
"xfa/fxfa/parser/cxfa_simple_parser.h",
"xfa/fxfa/parser/cxfa_strokedata.cpp",
"xfa/fxfa/parser/cxfa_strokedata.h",
- "xfa/fxfa/parser/cxfa_submit.cpp",
- "xfa/fxfa/parser/cxfa_submit.h",
+ "xfa/fxfa/parser/cxfa_submitdata.cpp",
+ "xfa/fxfa/parser/cxfa_submitdata.h",
"xfa/fxfa/parser/cxfa_text.cpp",
"xfa/fxfa/parser/cxfa_text.h",
"xfa/fxfa/parser/cxfa_thisproxy.cpp",
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 6040517d93..a49b25fc57 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -680,12 +680,13 @@ void CPDFXFA_DocEnvironment::OnAfterNotifySubmit() {
m_pContext->GetXFADocView()->UpdateDocView();
}
-bool CPDFXFA_DocEnvironment::SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) {
+bool CPDFXFA_DocEnvironment::SubmitData(CXFA_FFDoc* hDoc,
+ CXFA_SubmitData submitData) {
if (!NotifySubmit(true) || !m_pContext->GetXFADocView())
return false;
m_pContext->GetXFADocView()->UpdateDocView();
- bool ret = SubmitDataInternal(hDoc, submit);
+ bool ret = SubmitDataInternal(hDoc, submitData);
NotifySubmit(false);
return ret;
}
@@ -889,13 +890,13 @@ bool CPDFXFA_DocEnvironment::MailToInfo(WideString& csURL,
}
bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
- CXFA_Submit submit) {
+ CXFA_SubmitData submitData) {
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv();
if (!pFormFillEnv)
return false;
WideStringView csURLC;
- submit.GetSubmitTarget(csURLC);
+ submitData.GetSubmitTarget(csURLC);
WideString csURL(csURLC);
if (csURL.IsEmpty()) {
WideString ws;
@@ -910,10 +911,10 @@ bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
FPDF_FILEHANDLER* pFileHandler = nullptr;
int fileFlag = -1;
- switch (submit.GetSubmitFormat()) {
+ switch (submitData.GetSubmitFormat()) {
case XFA_ATTRIBUTEENUM_Xdp: {
WideStringView csContentC;
- submit.GetSubmitXDPContent(csContentC);
+ submitData.GetSubmitXDPContent(csContentC);
WideString csContent;
csContent = csContentC;
csContent.TrimLeft();
@@ -922,7 +923,7 @@ bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
space.FromLocal(" ");
csContent = space + csContent + space;
FPDF_DWORD flag = 0;
- if (submit.IsSubmitEmbedPDF())
+ if (submitData.IsSubmitEmbedPDF())
flag |= FXFA_PDF;
ToXFAContentFlags(csContent, flag);
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
index 62830b0804..24a61dd773 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
@@ -76,7 +76,7 @@ class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment {
* @param[in] bEmbedPDF, specifies whether PDF is embedded in the submitted
*content or not.
*/
- bool SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) override;
+ bool SubmitData(CXFA_FFDoc* hDoc, CXFA_SubmitData submitData) override;
bool GetGlobalProperty(CXFA_FFDoc* hDoc,
const ByteStringView& szPropName,
@@ -93,7 +93,7 @@ class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment {
bool OnBeforeNotifySubmit();
void OnAfterNotifySubmit();
bool NotifySubmit(bool bPrevOrPost);
- bool SubmitDataInternal(CXFA_FFDoc* hDoc, CXFA_Submit submit);
+ bool SubmitDataInternal(CXFA_FFDoc* hDoc, CXFA_SubmitData submitData);
bool MailToInfo(WideString& csURL,
WideString& csToAddress,
WideString& csCCAddress,
diff --git a/xfa/fxfa/cxfa_widgetacc.cpp b/xfa/fxfa/cxfa_widgetacc.cpp
index 59df6c9f4d..04733934a8 100644
--- a/xfa/fxfa/cxfa_widgetacc.cpp
+++ b/xfa/fxfa/cxfa_widgetacc.cpp
@@ -310,8 +310,8 @@ int32_t CXFA_WidgetAcc::ProcessEvent(const CXFA_EventData& eventData,
case XFA_Element::SignData:
break;
case XFA_Element::Submit:
- return GetDoc()->GetDocEnvironment()->SubmitData(GetDoc(),
- eventData.GetSubmit());
+ return GetDoc()->GetDocEnvironment()->SubmitData(
+ GetDoc(), eventData.GetSubmitData());
default:
break;
}
diff --git a/xfa/fxfa/fxfa.h b/xfa/fxfa/fxfa.h
index bb6864a6a4..b0f70f1fd7 100644
--- a/xfa/fxfa/fxfa.h
+++ b/xfa/fxfa/fxfa.h
@@ -257,7 +257,7 @@ class IXFA_DocEnvironment {
uint32_t dwOptions) = 0;
virtual FX_ARGB GetHighlightColor(CXFA_FFDoc* hDoc) = 0;
- virtual bool SubmitData(CXFA_FFDoc* hDoc, CXFA_Submit submit) = 0;
+ virtual bool SubmitData(CXFA_FFDoc* hDoc, CXFA_SubmitData submitData) = 0;
virtual bool GetGlobalProperty(CXFA_FFDoc* hDoc,
const ByteStringView& szPropName,
CFXJSE_Value* pValue) = 0;
diff --git a/xfa/fxfa/parser/cxfa_eventdata.cpp b/xfa/fxfa/parser/cxfa_eventdata.cpp
index 22943216c4..5d20e35718 100644
--- a/xfa/fxfa/parser/cxfa_eventdata.cpp
+++ b/xfa/fxfa/parser/cxfa_eventdata.cpp
@@ -34,8 +34,8 @@ CXFA_ScriptData CXFA_EventData::GetScriptData() const {
return CXFA_ScriptData(m_pNode->GetChild(0, XFA_Element::Script, false));
}
-CXFA_Submit CXFA_EventData::GetSubmit() const {
- return CXFA_Submit(m_pNode->GetChild(0, XFA_Element::Submit, false));
+CXFA_SubmitData CXFA_EventData::GetSubmitData() const {
+ return CXFA_SubmitData(m_pNode->GetChild(0, XFA_Element::Submit, false));
}
void CXFA_EventData::GetSignDataTarget(WideString& wsTarget) {
diff --git a/xfa/fxfa/parser/cxfa_eventdata.h b/xfa/fxfa/parser/cxfa_eventdata.h
index e9a79f008f..5c96b07148 100644
--- a/xfa/fxfa/parser/cxfa_eventdata.h
+++ b/xfa/fxfa/parser/cxfa_eventdata.h
@@ -12,7 +12,7 @@
#include "core/fxcrt/fx_string.h"
#include "xfa/fxfa/parser/cxfa_data.h"
#include "xfa/fxfa/parser/cxfa_scriptdata.h"
-#include "xfa/fxfa/parser/cxfa_submit.h"
+#include "xfa/fxfa/parser/cxfa_submitdata.h"
class CXFA_Node;
@@ -23,7 +23,7 @@ class CXFA_EventData : public CXFA_Data {
int32_t GetActivity();
XFA_Element GetEventType() const;
CXFA_ScriptData GetScriptData() const;
- CXFA_Submit GetSubmit() const;
+ CXFA_SubmitData GetSubmitData() const;
void GetRef(WideStringView& wsRef);
void GetSignDataTarget(WideString& wsTarget);
};
diff --git a/xfa/fxfa/parser/cxfa_submit.cpp b/xfa/fxfa/parser/cxfa_submitdata.cpp
index b7802c0248..d0f7d8f8ad 100644
--- a/xfa/fxfa/parser/cxfa_submit.cpp
+++ b/xfa/fxfa/parser/cxfa_submitdata.cpp
@@ -4,24 +4,24 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#include "xfa/fxfa/parser/cxfa_submit.h"
+#include "xfa/fxfa/parser/cxfa_submitdata.h"
#include "xfa/fxfa/parser/cxfa_node.h"
-CXFA_Submit::CXFA_Submit(CXFA_Node* pNode) : CXFA_Data(pNode) {}
+CXFA_SubmitData::CXFA_SubmitData(CXFA_Node* pNode) : CXFA_Data(pNode) {}
-bool CXFA_Submit::IsSubmitEmbedPDF() {
+bool CXFA_SubmitData::IsSubmitEmbedPDF() {
return m_pNode->JSNode()->GetBoolean(XFA_ATTRIBUTE_EmbedPDF);
}
-int32_t CXFA_Submit::GetSubmitFormat() {
+int32_t CXFA_SubmitData::GetSubmitFormat() {
return m_pNode->JSNode()->GetEnum(XFA_ATTRIBUTE_Format);
}
-void CXFA_Submit::GetSubmitTarget(WideStringView& wsTarget) {
+void CXFA_SubmitData::GetSubmitTarget(WideStringView& wsTarget) {
m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_Target, wsTarget, true);
}
-void CXFA_Submit::GetSubmitXDPContent(WideStringView& wsContent) {
+void CXFA_SubmitData::GetSubmitXDPContent(WideStringView& wsContent) {
m_pNode->JSNode()->TryCData(XFA_ATTRIBUTE_XdpContent, wsContent, true);
}
diff --git a/xfa/fxfa/parser/cxfa_submit.h b/xfa/fxfa/parser/cxfa_submitdata.h
index 9d4d7fe281..b5005f34a8 100644
--- a/xfa/fxfa/parser/cxfa_submit.h
+++ b/xfa/fxfa/parser/cxfa_submitdata.h
@@ -4,8 +4,8 @@
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-#ifndef XFA_FXFA_PARSER_CXFA_SUBMIT_H_
-#define XFA_FXFA_PARSER_CXFA_SUBMIT_H_
+#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"
@@ -13,9 +13,9 @@
class CXFA_Node;
-class CXFA_Submit : public CXFA_Data {
+class CXFA_SubmitData : public CXFA_Data {
public:
- explicit CXFA_Submit(CXFA_Node* pNode);
+ explicit CXFA_SubmitData(CXFA_Node* pNode);
bool IsSubmitEmbedPDF();
int32_t GetSubmitFormat();
@@ -23,4 +23,4 @@ class CXFA_Submit : public CXFA_Data {
void GetSubmitXDPContent(WideStringView& wsContent);
};
-#endif // XFA_FXFA_PARSER_CXFA_SUBMIT_H_
+#endif // XFA_FXFA_PARSER_CXFA_SUBMITDATA_H_