diff options
Diffstat (limited to 'fpdfsdk/javascript/util.cpp')
-rw-r--r-- | fpdfsdk/javascript/util.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fpdfsdk/javascript/util.cpp b/fpdfsdk/javascript/util.cpp index e00f9e1560..04f1eb36cd 100644 --- a/fpdfsdk/javascript/util.cpp +++ b/fpdfsdk/javascript/util.cpp @@ -76,7 +76,7 @@ util::~util() {} bool util::printf(CJS_Runtime* pRuntime, const std::vector<CJS_Value>& params, CJS_Value& vRet, - CFX_WideString& sError) { + WideString& sError) { const size_t iSize = params.size(); if (iSize < 1) return false; @@ -111,7 +111,7 @@ bool util::printf(CJS_Runtime* pRuntime, continue; } - CFX_WideString strSegment; + WideString strSegment; switch (ParseDataType(&c_strFormat)) { case UTIL_INT: strSegment.Format(c_strFormat.c_str(), params[iIndex].ToInt(pRuntime)); @@ -139,7 +139,7 @@ bool util::printf(CJS_Runtime* pRuntime, bool util::printd(CJS_Runtime* pRuntime, const std::vector<CJS_Value>& params, CJS_Value& vRet, - CFX_WideString& sError) { + WideString& sError) { const size_t iSize = params.size(); if (iSize < 2) return false; @@ -158,7 +158,7 @@ bool util::printd(CJS_Runtime* pRuntime, } if (p1.GetType() == CJS_Value::VT_number) { - CFX_WideString swResult; + WideString swResult; switch (p1.ToInt(pRuntime)) { case 0: swResult.Format(L"D:%04d%02d%02d%02d%02d%02d", jsDate.GetYear(pRuntime), @@ -231,7 +231,7 @@ bool util::printd(CJS_Runtime* pRuntime, }; for (size_t i = 0; i < FX_ArraySize(cTableAd); ++i) { - CFX_WideString sValue; + WideString sValue; sValue.Format(L"%d", cTableAd[i].iValue); int iStart = 0; @@ -271,7 +271,7 @@ bool util::printd(CJS_Runtime* pRuntime, bool util::printx(CJS_Runtime* pRuntime, const std::vector<CJS_Value>& params, CJS_Value& vRet, - CFX_WideString& sError) { + WideString& sError) { if (params.size() < 2) { sError = JSGetStringFromID(IDS_STRING_JSPARAMERROR); return false; @@ -294,9 +294,9 @@ static wchar_t TranslateCase(wchar_t input, CaseMode eMode) { return input; } -CFX_WideString util::printx(const CFX_WideString& wsFormat, - const CFX_WideString& wsSource) { - CFX_WideString wsResult; +WideString util::printx(const WideString& wsFormat, + const WideString& wsSource) { + WideString wsResult; FX_STRSIZE iSourceIdx = 0; FX_STRSIZE iFormatIdx = 0; CaseMode eCaseMode = kPreserveCase; @@ -385,12 +385,12 @@ CFX_WideString util::printx(const CFX_WideString& wsFormat, bool util::scand(CJS_Runtime* pRuntime, const std::vector<CJS_Value>& params, CJS_Value& vRet, - CFX_WideString& sError) { + WideString& sError) { if (params.size() < 2) return false; - CFX_WideString sFormat = params[0].ToCFXWideString(pRuntime); - CFX_WideString sDate = params[1].ToCFXWideString(pRuntime); + WideString sFormat = params[0].ToCFXWideString(pRuntime); + WideString sDate = params[1].ToCFXWideString(pRuntime); double dDate = JS_GetDateTime(); if (sDate.GetLength() > 0) { dDate = CJS_PublicMethods::MakeRegularDate(sDate, sFormat, nullptr); @@ -408,7 +408,7 @@ bool util::scand(CJS_Runtime* pRuntime, bool util::byteToChar(CJS_Runtime* pRuntime, const std::vector<CJS_Value>& params, CJS_Value& vRet, - CFX_WideString& sError) { + WideString& sError) { if (params.size() < 1) { sError = JSGetStringFromID(IDS_STRING_JSPARAMERROR); return false; @@ -420,7 +420,7 @@ bool util::byteToChar(CJS_Runtime* pRuntime, return false; } - CFX_WideString wStr(static_cast<wchar_t>(arg)); + WideString wStr(static_cast<wchar_t>(arg)); vRet = CJS_Value(pRuntime, wStr.c_str()); return true; } |