summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/javascript')
-rw-r--r--fpdfsdk/src/javascript/Field.cpp4
-rw-r--r--fpdfsdk/src/javascript/global.cpp2
-rw-r--r--fpdfsdk/src/javascript/util.cpp16
3 files changed, 11 insertions, 11 deletions
diff --git a/fpdfsdk/src/javascript/Field.cpp b/fpdfsdk/src/javascript/Field.cpp
index fc03c05626..4b1f20ac16 100644
--- a/fpdfsdk/src/javascript/Field.cpp
+++ b/fpdfsdk/src/javascript/Field.cpp
@@ -149,7 +149,7 @@ void Field::ParseFieldName(const std::wstring &strFieldNameParsed,std::wstring &
return;
}
std::wstring suffixal = strFieldNameParsed.substr(iStart+1);
- iControlNo = FXSYS_wtoi((FX_LPCWSTR)suffixal.c_str());
+ iControlNo = FXSYS_wtoi(suffixal.c_str());
if (iControlNo == 0)
{
int iStart;
@@ -194,7 +194,7 @@ FX_BOOL Field::AttachField(Document* pDocument, const CFX_WideString& csFieldNam
{
std::wstring strFieldName;
int iControlNo = -1;
- ParseFieldName((wchar_t*)(FX_LPCWSTR)swFieldNameTemp, strFieldName, iControlNo);
+ ParseFieldName((FX_LPCWSTR)swFieldNameTemp, strFieldName, iControlNo);
if (iControlNo == -1) return FALSE;
m_FieldName = strFieldName.c_str();
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp
index 6bf0861e1a..783ad8b0cd 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/src/javascript/global.cpp
@@ -342,7 +342,7 @@ void global_alternate::ObjectToArray(v8::Handle<v8::Object> pObj, CJS_GlobalVari
CFX_WideString ws = JS_ToString(JS_GetArrayElemnet(pKeyList, i));
CFX_ByteString sKey = ws.UTF8Encode();
- v8::Handle<v8::Value> v = JS_GetObjectElement(isolate, pObj, (const wchar_t*)(FX_LPCWSTR)ws);
+ v8::Handle<v8::Value> v = JS_GetObjectElement(isolate, pObj, (FX_LPCWSTR)ws);
FXJSVALUETYPE vt = GET_VALUE_TYPE(v);
switch (vt)
{
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;
}