summaryrefslogtreecommitdiff
path: root/fpdfsdk/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/javascript')
-rw-r--r--fpdfsdk/javascript/Document.cpp2
-rw-r--r--fpdfsdk/javascript/PublicMethods.cpp20
2 files changed, 11 insertions, 11 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp
index 75cd2ec251..4c361b197e 100644
--- a/fpdfsdk/javascript/Document.cpp
+++ b/fpdfsdk/javascript/Document.cpp
@@ -784,7 +784,7 @@ FX_BOOL Document::info(IJS_Context* cc,
for (const auto& it : *pDictionary) {
const CFX_ByteString& bsKey = it.first;
CPDF_Object* pValueObj = it.second;
- CFX_WideString wsKey = CFX_WideString::FromUTF8(bsKey.AsByteStringC());
+ CFX_WideString wsKey = CFX_WideString::FromUTF8(bsKey.AsStringC());
if (pValueObj->IsString() || pValueObj->IsName()) {
FXJS_PutObjectString(isolate, pObj, wsKey.c_str(),
pValueObj->GetUnicodeText().c_str());
diff --git a/fpdfsdk/javascript/PublicMethods.cpp b/fpdfsdk/javascript/PublicMethods.cpp
index d5b961d61d..eb0bd1b306 100644
--- a/fpdfsdk/javascript/PublicMethods.cpp
+++ b/fpdfsdk/javascript/PublicMethods.cpp
@@ -837,7 +837,7 @@ FX_BOOL CJS_PublicMethods::AFNumber_Format(IJS_Context* cc,
}
// for processing currency string
- Value = CFX_WideString::FromLocal(strValue.AsByteStringC());
+ Value = CFX_WideString::FromLocal(strValue.AsStringC());
std::wstring strValue2 = Value.c_str();
if (bCurrencyPrepend)
@@ -1120,7 +1120,7 @@ FX_BOOL CJS_PublicMethods::AFPercent_Format(
if (iNegative)
strValue = "-" + strValue;
strValue += "%";
- Value = CFX_WideString::FromLocal(strValue.AsByteStringC());
+ Value = CFX_WideString::FromLocal(strValue.AsStringC());
#endif
return TRUE;
}
@@ -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].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());
+ int nDay = FX_atof(wsArray[2].AsStringC());
+ int nHour = FX_atof(wsArray[3].AsStringC());
+ int nMin = FX_atof(wsArray[4].AsStringC());
+ int nSec = FX_atof(wsArray[5].AsStringC());
+ int nYear = FX_atof(wsArray[7].AsStringC());
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.AsWideStringC());
+ dTemp = FX_atof(trimmed.AsStringC());
} 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.AsWideStringC());
+ dTemp = FX_atof(trimmed.AsStringC());
break;
}
}
@@ -1751,7 +1751,7 @@ FX_BOOL CJS_PublicMethods::AFSimple_Calculate(
CFX_WideString trimmed = pFormField->GetValue();
trimmed.TrimRight();
trimmed.TrimLeft();
- dTemp = FX_atof(trimmed.AsWideStringC());
+ dTemp = FX_atof(trimmed.AsStringC());
}
} break;
default: