summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-14 21:19:44 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-14 21:19:44 +0000
commitaee28693976cc246eea8230a999906802e52cab7 (patch)
tree612e6dbc9b79c978208a623138f70f881acb539f /fpdfsdk
parent5a423ef8708e61d43f1556ab09c2e09f496d700d (diff)
downloadpdfium-aee28693976cc246eea8230a999906802e52cab7.tar.xz
Cleanup XFA default value code
This CL adds helper methods to CXFA_Node to retrieve the default values for attributes with the correct data types. Change-Id: I644435b4b430819f1060a95fa4fffe4ba2826cfe Reviewed-on: https://pdfium-review.googlesource.com/18450 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
index 72b8970022..374fe566fc 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp
@@ -904,16 +904,15 @@ bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
if (!pFormFillEnv)
return false;
- WideStringView csURLC;
- submitData.GetSubmitTarget(csURLC);
- WideString csURL(csURLC);
+ WideString csURL;
+ submitData.GetSubmitTarget(csURL);
if (csURL.IsEmpty()) {
WideString ws;
ws.FromLocal("Submit cancelled.");
ByteString bs = ws.UTF16LE_Encode();
int len = bs.GetLength();
- pFormFillEnv->Alert((FPDF_WIDESTRING)bs.GetBuffer(len),
- (FPDF_WIDESTRING)L"", 0, 4);
+ pFormFillEnv->Alert(reinterpret_cast<FPDF_WIDESTRING>(bs.GetBuffer(len)),
+ reinterpret_cast<FPDF_WIDESTRING>(L""), 0, 4);
bs.ReleaseBuffer(len);
return false;
}
@@ -922,10 +921,8 @@ bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc,
int fileFlag = -1;
switch (submitData.GetSubmitFormat()) {
case XFA_ATTRIBUTEENUM_Xdp: {
- WideStringView csContentC;
- submitData.GetSubmitXDPContent(csContentC);
WideString csContent;
- csContent = csContentC;
+ submitData.GetSubmitXDPContent(csContent);
csContent.TrimLeft();
csContent.TrimRight();
WideString space;