summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-21 22:05:40 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-21 22:05:40 +0000
commitebe865db548f768038186054fc0f1eb024565c43 (patch)
tree582743c8c367a39a2471aa238787e91c26bc4e92 /fpdfsdk/fpdfxfa
parent559f974dbb92e35a1bfb739032d82a2536fcf59c (diff)
downloadpdfium-ebe865db548f768038186054fc0f1eb024565c43.tar.xz
Cleanup CXFA_SubmitData
This CL cleans up the CXFA_SubmitData methods by using returns instead of out-params, sets the correct return types and makes the methods const. Change-Id: I41fe8f59e450ca444b64c291ac4a0a199c7ad0cf Reviewed-on: https://pdfium-review.googlesource.com/19111 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 2c13b92d4e..000e1a904e 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -900,8 +900,7 @@ bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
if (!pFormFillEnv)
return false;
- WideString csURL;
- submitData.GetSubmitTarget(csURL);
+ WideString csURL = submitData.GetSubmitTarget();
if (csURL.IsEmpty()) {
WideString ws;
ws.FromLocal("Submit cancelled.");
@@ -917,9 +916,9 @@ bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
int fileFlag = -1;
switch (submitData.GetSubmitFormat()) {
case XFA_ATTRIBUTEENUM_Xdp: {
- WideString csContent;
- submitData.GetSubmitXDPContent(csContent);
+ WideString csContent = submitData.GetSubmitXDPContent();
csContent.Trim();
+
WideString space;
space.FromLocal(" ");
csContent = space + csContent + space;
@@ -950,6 +949,7 @@ bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
}
if (!pFileHandler)
return false;
+
if (csURL.Left(7).CompareNoCase(L"mailto:") == 0) {
WideString csToAddress;
WideString csCCAddress;