From 660956f58af305d72c64bb87c05f694469846df2 Mon Sep 17 00:00:00 2001 From: tsepez Date: Wed, 6 Apr 2016 06:27:29 -0700 Subject: Rename CFX_WideStringC::raw_str() to c_str() No functional change intended. This difference in naming is standing in the way of consolidating some of the string code between Wide and Byte strings. The Wide code wants to call raw_str() in exactly the same spots that the Byte code calls c_str(). This makes sense, because in both places we get a character type back, and not a uint*_t type. If WideStringC had a raw_str() method, it would have to return uint32_t or similar. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1863593004 --- fpdfsdk/fpdfxfa/fpdfxfa_app.cpp | 20 ++++++++++---------- fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'fpdfsdk/fpdfxfa') diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp index 46a3d53b30..0d3011e659 100644 --- a/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp +++ b/fpdfsdk/fpdfxfa/fpdfxfa_app.cpp @@ -169,7 +169,7 @@ int32_t CPDFXFA_App::MsgBox(const CFX_WideStringC& wsMessage, iButtonType |= 3; break; } - int32_t iRet = pEnv->JS_appAlert(wsMessage.raw_str(), wsTitle.raw_str(), + int32_t iRet = pEnv->JS_appAlert(wsMessage.c_str(), wsTitle.c_str(), iButtonType, iconType); switch (iRet) { case 1: @@ -193,9 +193,9 @@ void CPDFXFA_App::Response(CFX_WideString& wsAnswer, if (pEnv) { int nLength = 2048; char* pBuff = new char[nLength]; - nLength = pEnv->JS_appResponse(wsQuestion.raw_str(), wsTitle.raw_str(), - wsDefaultAnswer.raw_str(), NULL, bMark, - pBuff, nLength); + nLength = pEnv->JS_appResponse(wsQuestion.c_str(), wsTitle.c_str(), + wsDefaultAnswer.c_str(), NULL, bMark, pBuff, + nLength); if (nLength > 0) { nLength = nLength > 2046 ? 2046 : nLength; pBuff[nLength] = 0; @@ -228,7 +228,7 @@ int32_t CPDFXFA_App::GetDocumentCountInBatch() { IFX_FileRead* CPDFXFA_App::DownloadURL(const CFX_WideStringC& wsURL) { CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); if (pEnv) { - return pEnv->FFI_DownloadFromURL(wsURL.raw_str()); + return pEnv->FFI_DownloadFromURL(wsURL.c_str()); } return NULL; } @@ -241,9 +241,9 @@ FX_BOOL CPDFXFA_App::PostRequestURL(const CFX_WideStringC& wsURL, CFX_WideString& wsResponse) { CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); if (pEnv) { - wsResponse = pEnv->FFI_PostRequestURL( - wsURL.raw_str(), wsData.raw_str(), wsContentType.raw_str(), - wsEncode.raw_str(), wsHeader.raw_str()); + wsResponse = pEnv->FFI_PostRequestURL(wsURL.c_str(), wsData.c_str(), + wsContentType.c_str(), + wsEncode.c_str(), wsHeader.c_str()); return TRUE; } return FALSE; @@ -254,8 +254,8 @@ FX_BOOL CPDFXFA_App::PutRequestURL(const CFX_WideStringC& wsURL, const CFX_WideStringC& wsEncode) { CPDFDoc_Environment* pEnv = m_pEnvList.GetAt(0); if (pEnv) { - return pEnv->FFI_PutRequestURL(wsURL.raw_str(), wsData.raw_str(), - wsEncode.raw_str()); + return pEnv->FFI_PutRequestURL(wsURL.c_str(), wsData.c_str(), + wsEncode.c_str()); } return FALSE; } diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp index bb8793f1a7..7ef369a04b 100644 --- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp +++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp @@ -738,7 +738,7 @@ void CPDFXFA_Document::GotoURL(CXFA_FFDoc* hDoc, if (pEnv == NULL) return; - CFX_WideStringC str(bsURL.raw_str()); + CFX_WideStringC str(bsURL.c_str()); pEnv->FFI_GotoURL(this, str, bAppend); } -- cgit v1.2.3