diff options
author | Bo Xu <bo_xu@foxitsoftware.com> | 2014-11-17 10:46:25 -0800 |
---|---|---|
committer | Bo Xu <bo_xu@foxitsoftware.com> | 2014-11-17 10:52:50 -0800 |
commit | 0ed3b28a70c64e06340b892e6b5e753f80b0fa4e (patch) | |
tree | 4242bbd769b19621e9131cff0fb3b5d837913051 /fpdfsdk/src/javascript/util.cpp | |
parent | 2b7a49dabdac7c31975f2662f6513c0930617231 (diff) | |
download | pdfium-0ed3b28a70c64e06340b892e6b5e753f80b0fa4e.tar.xz |
Merge to XFA: patch from CL 730993002
Diffstat (limited to 'fpdfsdk/src/javascript/util.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/util.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp index 1e5c75188a..d2813f5083 100644 --- a/fpdfsdk/src/javascript/util.cpp +++ b/fpdfsdk/src/javascript/util.cpp @@ -182,23 +182,23 @@ FX_BOOL util::printf(OBJ_METHOD_PARAMS) switch (ParstDataType(&c_strFormat)) { case UTIL_INT: - strSegment.Format((FX_LPCWSTR)c_strFormat.c_str(),(int)params[iIndex]); + strSegment.Format(c_strFormat.c_str(),(int)params[iIndex]); break; case UTIL_DOUBLE: - strSegment.Format((FX_LPCWSTR)c_strFormat.c_str(),(double)params[iIndex]); + strSegment.Format(c_strFormat.c_str(),(double)params[iIndex]); break; case UTIL_STRING: - strSegment.Format((FX_LPCWSTR)c_strFormat.c_str(),(FX_LPCWSTR)params[iIndex].operator CFX_WideString()); + strSegment.Format(c_strFormat.c_str(),(FX_LPCWSTR)params[iIndex].operator CFX_WideString()); break; default: - strSegment.Format(L"%S", (FX_LPCWSTR)c_strFormat.c_str()); + strSegment.Format(L"%S", c_strFormat.c_str()); break; } - c_strResult += (wchar_t*)strSegment.GetBuffer(strSegment.GetLength()+1); + c_strResult += strSegment.GetBuffer(strSegment.GetLength()+1); } c_strResult.erase(c_strResult.begin()); - vRet = (FX_LPCWSTR)c_strResult.c_str(); + vRet = c_strResult.c_str(); return TRUE; } @@ -271,7 +271,7 @@ FX_BOOL util::printd(OBJ_METHOD_PARAMS) } else if (p1.GetType() == VT_string) { - std::basic_string<wchar_t> cFormat = (wchar_t*)(FX_LPCWSTR)p1.operator CFX_WideString(); + std::basic_string<wchar_t> cFormat = (FX_LPCWSTR)p1.operator CFX_WideString(); bool bXFAPicture = false; if (iSize > 2) @@ -365,7 +365,7 @@ FX_BOOL util::printd(OBJ_METHOD_PARAMS) wchar_t buf[64] = {0}; strFormat = wcsftime(buf, 64, cFormat.c_str(), &time); cFormat = buf; - vRet = (FX_LPCWSTR)cFormat.c_str(); + vRet = cFormat.c_str(); //rtRet = strFormat.GetBuffer(strFormat.GetLength()+1); return TRUE; } |