diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2017-12-07 22:19:53 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-12-07 22:19:53 +0000 |
commit | ce6979f8d064507300fe0b3a856687fb958c9a5c (patch) | |
tree | ca2528c70c84954fd6c99faeb183be7ba08b7380 /fpdfsdk | |
parent | 67454716002f2f5eae85cef4d382ecfc0e9b266d (diff) | |
download | pdfium-ce6979f8d064507300fe0b3a856687fb958c9a5c.tar.xz |
Add WARN_UNUSED_RESULT to more static methods in (Byte|Wide)String.
Also fixes some usages that were not working as intended after the
conversion to static.
Change-Id: I18c18369754f6ca165f98999b5b80eecf6c76973
Reviewed-on: https://pdfium-review.googlesource.com/20590
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp index 90431243a4..70b0f1b514 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment.cpp @@ -642,8 +642,7 @@ bool CPDFXFA_DocEnvironment::OnBeforeNotifySubmit() { if (!pFormFillEnv) return false; - WideString ws; - ws.FromLocal(IDS_XFA_Validate_Input); + WideString ws = WideString::FromLocal(IDS_XFA_Validate_Input); ByteString bs = ws.UTF16LE_Encode(); int len = bs.GetLength(); pFormFillEnv->Alert((FPDF_WIDESTRING)bs.GetBuffer(len), @@ -902,8 +901,7 @@ bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc, WideString csURL = submitData.GetSubmitTarget(); if (csURL.IsEmpty()) { - WideString ws; - ws.FromLocal("Submit cancelled."); + WideString ws = WideString::FromLocal("Submit cancelled."); ByteString bs = ws.UTF16LE_Encode(); int len = bs.GetLength(); pFormFillEnv->Alert(reinterpret_cast<FPDF_WIDESTRING>(bs.GetBuffer(len)), @@ -919,8 +917,7 @@ bool CPDFXFA_DocEnvironment::SubmitDataInternal(CXFA_FFDoc* hDoc, WideString csContent = submitData.GetSubmitXDPContent(); csContent.Trim(); - WideString space; - space.FromLocal(" "); + WideString space = WideString::FromLocal(" "); csContent = space + csContent + space; FPDF_DWORD flag = 0; if (submitData.IsSubmitEmbedPDF()) |