summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript/PublicMethods.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-05 12:22:15 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-05 12:22:15 -0700
commitfc58ad18b7ab32e7b0bb3959b07dbe7538a7cebd (patch)
tree8662b886d373b149fbdd6f5db9570c233cb23ce7 /fpdfsdk/javascript/PublicMethods.cpp
parentc7a7349cf316af37d4ad4b71c5742159deccbf33 (diff)
downloadpdfium-fc58ad18b7ab32e7b0bb3959b07dbe7538a7cebd.tar.xz
Make down-conversion explicit from CFX_Widetring to CFX_WideStringC.
Companion to https://codereview.chromium.org/1853233002 BUG= Review URL: https://codereview.chromium.org/1857073002
Diffstat (limited to 'fpdfsdk/javascript/PublicMethods.cpp')
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index b928aab31d..308163d454 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -1219,11 +1219,11 @@ double CJS_PublicMethods::MakeInterDate(CFX_WideString strValue) {
else if (sTemp.Compare(L"Dec") == 0)
nMonth = 12;
- int nDay = FX_atof(wsArray[2]);
- int nHour = FX_atof(wsArray[3]);
- int nMin = FX_atof(wsArray[4]);
- int nSec = FX_atof(wsArray[5]);
- int nYear = FX_atof(wsArray[7]);
+ int nDay = FX_atof(wsArray[2].AsWideStringC());
+ int nHour = FX_atof(wsArray[3].AsWideStringC());
+ int nMin = FX_atof(wsArray[4].AsWideStringC());
+ int nSec = FX_atof(wsArray[5].AsWideStringC());
+ int nYear = FX_atof(wsArray[7].AsWideStringC());
double dRet = JS_MakeDate(JS_MakeDay(nYear, nMonth - 1, nDay),
JS_MakeTime(nHour, nMin, nSec, 0));
if (JS_PortIsNan(dRet))
@@ -1726,7 +1726,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormField->GetValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed);
+ dTemp = FX_atof(trimmed.AsWideStringC());
} break;
case FIELDTYPE_PUSHBUTTON: {
dTemp = 0.0;
@@ -1740,7 +1740,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormCtrl->GetExportValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed);
+ dTemp = FX_atof(trimmed.AsWideStringC());
break;
}
}
@@ -1751,7 +1751,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormField->GetValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed);
+ dTemp = FX_atof(trimmed.AsWideStringC());
}
} break;
default: