summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/util.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-04-27 11:31:26 -0700
committerTom Sepez <tsepez@chromium.org>2015-04-27 11:31:26 -0700
commitf7a7d7e07396c3a0fae617ed8f15f29fd491bc3a (patch)
tree53e22c58375eb36abe97f5b8f2631b4eba111fbc /fpdfsdk/src/javascript/util.cpp
parent15a62973b9b89c3e229cc0ab501c45967f91b325 (diff)
downloadpdfium-f7a7d7e07396c3a0fae617ed8f15f29fd491bc3a.tar.xz
Revert "Kill operator LPCWSTR from CFX_WideString()."
This reverts commit 15a62973b9b89c3e229cc0ab501c45967f91b325. Reason for revert: broke build on windows, mac. I must have missed some platform-specific conversions. TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1108883002
Diffstat (limited to 'fpdfsdk/src/javascript/util.cpp')
-rw-r--r--fpdfsdk/src/javascript/util.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/fpdfsdk/src/javascript/util.cpp b/fpdfsdk/src/javascript/util.cpp
index 26c59a32ad..f7e97acb1f 100644
--- a/fpdfsdk/src/javascript/util.cpp
+++ b/fpdfsdk/src/javascript/util.cpp
@@ -265,7 +265,7 @@ FX_BOOL util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
return FALSE;
}
- vRet = swResult.c_str();
+ vRet = swResult;
return TRUE;
}
else if (p1.GetType() == VT_string)
@@ -288,9 +288,9 @@ FX_BOOL util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
{
int iStart = 0;
int iEnd;
- while((iEnd = cFormat.find(fcTable[iIndex].lpszJSMark, iStart)) != -1)
+ while((iEnd = cFormat.find((CFX_WideString)fcTable[iIndex].lpszJSMark, iStart)) != -1)
{
- cFormat.replace(iEnd, FXSYS_wcslen(fcTable[iIndex].lpszJSMark), fcTable[iIndex].lpszCppMark);
+ cFormat.replace(iEnd, FXSYS_wcslen(fcTable[iIndex].lpszJSMark), (CFX_WideString)fcTable[iIndex].lpszCppMark);
iStart = iEnd;
}
}
@@ -342,7 +342,7 @@ FX_BOOL util::printd(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Value&
//strFormat.Format(strFormat,cTableAd[iIndex].iValue);
int iStart = 0;
int iEnd;
- while((iEnd = cFormat.find(cTableAd[iIndex].lpszJSMark, iStart)) != -1)
+ while((iEnd = cFormat.find((CFX_WideString)cTableAd[iIndex].lpszJSMark,iStart)) != -1)
{
if (iEnd > 0)
{
@@ -384,9 +384,9 @@ void util::printd(const std::wstring &cFormat2, CJS_Date jsDate, bool bXFAPictur
{
int iStart = 0;
int iEnd;
- while((iEnd = cFormat.find(fcTable[iIndex].lpszJSMark, iStart)) != -1)
+ while((iEnd = cFormat.find((CFX_WideString)fcTable[iIndex].lpszJSMark,iStart)) != -1)
{
- cFormat.replace(iEnd,FXSYS_wcslen(fcTable[iIndex].lpszJSMark), fcTable[iIndex].lpszCppMark);
+ cFormat.replace(iEnd,FXSYS_wcslen(fcTable[iIndex].lpszJSMark), (CFX_WideString)fcTable[iIndex].lpszCppMark);
iStart = iEnd;
}
}
@@ -438,7 +438,7 @@ void util::printd(const std::wstring &cFormat2, CJS_Date jsDate, bool bXFAPictur
//strFormat.Format(strFormat,cTableAd[iIndex].iValue);
int iStart = 0;
int iEnd;
- while((iEnd = cFormat.find(cTableAd[iIndex].lpszJSMark, iStart)) != -1)
+ while((iEnd = cFormat.find((CFX_WideString)cTableAd[iIndex].lpszJSMark,iStart)) != -1)
{
if (iEnd > 0)
{
@@ -640,6 +640,6 @@ FX_BOOL util::byteToChar(IFXJS_Context* cc, const CJS_Parameters& params, CJS_Va
unsigned char cByte = (unsigned char)nByte;
CFX_WideString csValue;
csValue.Format(L"%c", cByte);
- vRet = csValue.c_str();
+ vRet = csValue;
return TRUE;
}