summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp18
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h16
2 files changed, 11 insertions, 23 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index fdf0d31ea2..071fe34bdd 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -22,6 +22,7 @@
#include "xfa/fxfa/cxfa_ffwidget.h"
#include "xfa/fxfa/cxfa_ffwidgethandler.h"
#include "xfa/fxfa/cxfa_widgetacciterator.h"
+#include "xfa/fxfa/parser/cxfa_submit.h"
#define IDS_XFA_Validate_Input \
"At least one required field was empty. Please fill in the required " \
@@ -684,13 +685,12 @@ void CPDFXFA_DocEnvironment::OnAfterNotifySubmit() {
m_pContext->GetXFADocView()->UpdateDocView();
}
-bool CPDFXFA_DocEnvironment::SubmitData(CXFA_FFDoc* hDoc,
- CXFA_SubmitData submitData) {
+bool CPDFXFA_DocEnvironment::Submit(CXFA_FFDoc* hDoc, CXFA_Submit* submit) {
if (!NotifySubmit(true) || !m_pContext->GetXFADocView())
return false;
m_pContext->GetXFADocView()->UpdateDocView();
- bool ret = SubmitDataInternal(hDoc, submitData);
+ bool ret = SubmitInternal(hDoc, submit);
NotifySubmit(false);
return ret;
}
@@ -893,13 +893,13 @@ bool CPDFXFA_DocEnvironment::MailToInfo(WideString& csURL,
return true;
}
-bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
- CXFA_SubmitData submitData) {
+bool CPDFXFA_DocEnvironment::SubmitInternal(CXFA_FFDoc* hDoc,
+ CXFA_Submit* submit) {
CPDFSDK_FormFillEnvironment* pFormFillEnv = m_pContext->GetFormFillEnv();
if (!pFormFillEnv)
return false;
- WideString csURL = submitData.GetSubmitTarget();
+ WideString csURL = submit->GetSubmitTarget();
if (csURL.IsEmpty()) {
WideString ws = WideString::FromLocal("Submit cancelled.");
ByteString bs = ws.UTF16LE_Encode();
@@ -912,15 +912,15 @@ bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
FPDF_FILEHANDLER* pFileHandler = nullptr;
int fileFlag = -1;
- switch (submitData.GetSubmitFormat()) {
+ switch (submit->GetSubmitFormat()) {
case XFA_AttributeEnum::Xdp: {
- WideString csContent = submitData.GetSubmitXDPContent();
+ WideString csContent = submit->GetSubmitXDPContent();
csContent.Trim();
WideString space = WideString::FromLocal(" ");
csContent = space + csContent + space;
FPDF_DWORD flag = 0;
- if (submitData.IsSubmitEmbedPDF())
+ if (submit->IsSubmitEmbedPDF())
flag |= FXFA_PDF;
ToXFAContentFlags(csContent, flag);
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
index f487c46bd9..7933da33e4 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.h
@@ -64,19 +64,7 @@ class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment {
uint32_t dwOptions) override;
FX_ARGB GetHighlightColor(CXFA_FFDoc* hDoc) override;
- /**
- *Submit data to email, http, ftp.
- * @param[in] hDoc The document handler.
- * @param[in] eFormat Determines the format in which the data will be
- *submitted. XFA_AttributeEnum::Xdp, XFA_AttributeEnum::Xml...
- * @param[in] wsTarget The URL to which the data will be submitted.
- * @param[in] eEncoding The encoding of text content.
- * @param[in] pXDPContent Controls what subset of the data is submitted, used
- *only when the format property is xdp.
- * @param[in] bEmbedPDF, specifies whether PDF is embedded in the submitted
- *content or not.
- */
- bool SubmitData(CXFA_FFDoc* hDoc, CXFA_SubmitData submitData) override;
+ bool Submit(CXFA_FFDoc* hDoc, CXFA_Submit* submit) override;
bool GetGlobalProperty(CXFA_FFDoc* hDoc,
const ByteStringView& szPropName,
@@ -93,7 +81,7 @@ class CPDFXFA_DocEnvironment : public IXFA_DocEnvironment {
bool OnBeforeNotifySubmit();
void OnAfterNotifySubmit();
bool NotifySubmit(bool bPrevOrPost);
- bool SubmitDataInternal(CXFA_FFDoc* hDoc, CXFA_SubmitData submitData);
+ bool SubmitInternal(CXFA_FFDoc* hDoc, CXFA_Submit* submit);
bool MailToInfo(WideString& csURL,
WideString& csToAddress,
WideString& csCCAddress,