summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/javascript')
-rw-r--r--fpdfsdk/src/javascript/JS_Value.cpp2
-rw-r--r--fpdfsdk/src/javascript/PublicMethods.cpp8
-rw-r--r--fpdfsdk/src/javascript/util.cpp4
3 files changed, 7 insertions, 7 deletions
diff --git a/fpdfsdk/src/javascript/JS_Value.cpp b/fpdfsdk/src/javascript/JS_Value.cpp
index 93da9bea2e..9279ff5db4 100644
--- a/fpdfsdk/src/javascript/JS_Value.cpp
+++ b/fpdfsdk/src/javascript/JS_Value.cpp
@@ -400,7 +400,7 @@ void CJS_PropValue::StartGetting()
void CJS_PropValue::operator <<(CFX_ByteString string)
{
ASSERT(!m_bIsSetting);
- CJS_Value::operator =((FX_LPCSTR)string);
+ CJS_Value::operator = (string.c_str());
}
void CJS_PropValue::operator >>(CFX_ByteString &string) const
diff --git a/fpdfsdk/src/javascript/PublicMethods.cpp b/fpdfsdk/src/javascript/PublicMethods.cpp
index 82bffe67bf..7d652496af 100644
--- a/fpdfsdk/src/javascript/PublicMethods.cpp
+++ b/fpdfsdk/src/javascript/PublicMethods.cpp
@@ -443,7 +443,7 @@ CJS_Array CJS_PublicMethods::AF_MakeArrayFromList(v8::Isolate* isolate, CJS_Valu
const char * pTemp = strchr(p, ch);
if (pTemp == NULL)
{
- StrArray.SetElement(nIndex, CJS_Value(isolate,(FX_LPCSTR)StrTrim(p)));
+ StrArray.SetElement(nIndex, CJS_Value(isolate, StrTrim(p).c_str()));
break;
}
else
@@ -452,7 +452,7 @@ CJS_Array CJS_PublicMethods::AF_MakeArrayFromList(v8::Isolate* isolate, CJS_Valu
strncpy(pSub, p, pTemp - p);
*(pSub + (pTemp - p)) = '\0';
- StrArray.SetElement(nIndex, CJS_Value(isolate,(FX_LPCSTR)StrTrim(pSub)));
+ StrArray.SetElement(nIndex, CJS_Value(isolate, StrTrim(pSub).c_str()));
delete []pSub;
nIndex ++;
@@ -1807,7 +1807,7 @@ FX_BOOL CJS_PublicMethods::AFSpecial_Format(OBJ_METHOD_PARAMS)
if(!pEvent->m_pValue)
return FALSE;
CFX_WideString& Value = pEvent->Value();
- std::string strSrc = (FX_LPCSTR)CFX_ByteString::FromUnicode(Value);
+ std::string strSrc = CFX_ByteString::FromUnicode(Value).c_str();
switch (iIndex)
{
@@ -1962,7 +1962,7 @@ FX_BOOL CJS_PublicMethods::AFSpecial_Keystroke(OBJ_METHOD_PARAMS)
return FALSE;
//CJS_Value val = pEvent->Value();
CFX_WideString& val = pEvent->Value();
- std::string strSrc = (FX_LPCSTR)CFX_ByteString::FromUnicode(val);
+ std::string strSrc = CFX_ByteString::FromUnicode(val).c_str();
std::wstring wstrChange(pEvent->Change());
switch (iIndex)
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index d2813f5083..83fb32cb82 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -471,8 +471,8 @@ FX_BOOL util::printx(OBJ_METHOD_PARAMS)
return FALSE;
CFX_WideString sFormat = params[0].operator CFX_WideString();
CFX_WideString sSource = params[1].operator CFX_WideString();
- std::string cFormat = (FX_LPCSTR)CFX_ByteString::FromUnicode(sFormat);
- std::string cSource = (FX_LPCSTR)CFX_ByteString::FromUnicode(sSource);
+ std::string cFormat = CFX_ByteString::FromUnicode(sFormat).c_str();
+ std::string cSource = CFX_ByteString::FromUnicode(sSource).c_str();
std::string cDest;
printx(cFormat,cSource,cDest);
vRet = cDest.c_str();