From 275e260a6cd4a8e506ba974feb85ebcd926c1739 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Mon, 18 Sep 2017 14:23:18 -0400 Subject: Convert string class names Automated using git grep & sed. Replace StringC classes with StringView classes. Remove the CFX_ prefix and put string classes in fxcrt namespace. Change AsStringC() to AsStringView(). Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*, Foo). Couple of tests needed to have their names regularlized. BUG=pdfium:894 Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d Reviewed-on: https://pdfium-review.googlesource.com/14151 Reviewed-by: Tom Sepez Commit-Queue: Ryan Harrison --- fpdfsdk/fpdfxfa/cpdfxfa_context.cpp | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_context.cpp') diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp index 1032d49edc..8779c44186 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp @@ -219,19 +219,19 @@ v8::Isolate* CPDFXFA_Context::GetJSERuntime() const { return runtime->GetIsolate(); } -CFX_WideString CPDFXFA_Context::GetAppTitle() const { +WideString CPDFXFA_Context::GetAppTitle() const { return L"PDFium"; } -CFX_WideString CPDFXFA_Context::GetAppName() { +WideString CPDFXFA_Context::GetAppName() { return m_pFormFillEnv ? m_pFormFillEnv->FFI_GetAppName() : L""; } -CFX_WideString CPDFXFA_Context::GetLanguage() { +WideString CPDFXFA_Context::GetLanguage() { return m_pFormFillEnv ? m_pFormFillEnv->GetLanguage() : L""; } -CFX_WideString CPDFXFA_Context::GetPlatform() { +WideString CPDFXFA_Context::GetPlatform() { return m_pFormFillEnv ? m_pFormFillEnv->GetPlatform() : L""; } @@ -240,8 +240,8 @@ void CPDFXFA_Context::Beep(uint32_t dwType) { m_pFormFillEnv->JS_appBeep(dwType); } -int32_t CPDFXFA_Context::MsgBox(const CFX_WideString& wsMessage, - const CFX_WideString& wsTitle, +int32_t CPDFXFA_Context::MsgBox(const WideString& wsMessage, + const WideString& wsTitle, uint32_t dwIconType, uint32_t dwButtonType) { if (!m_pFormFillEnv) @@ -292,12 +292,12 @@ int32_t CPDFXFA_Context::MsgBox(const CFX_WideString& wsMessage, return XFA_IDYes; } -CFX_WideString CPDFXFA_Context::Response(const CFX_WideString& wsQuestion, - const CFX_WideString& wsTitle, - const CFX_WideString& wsDefaultAnswer, - bool bMark) { +WideString CPDFXFA_Context::Response(const WideString& wsQuestion, + const WideString& wsTitle, + const WideString& wsDefaultAnswer, + bool bMark) { if (!m_pFormFillEnv) - return CFX_WideString(); + return WideString(); int nLength = 2048; std::vector pBuff(nLength); @@ -305,27 +305,27 @@ CFX_WideString CPDFXFA_Context::Response(const CFX_WideString& wsQuestion, wsDefaultAnswer.c_str(), nullptr, bMark, pBuff.data(), nLength); if (nLength <= 0) - return CFX_WideString(); + return WideString(); nLength = std::min(2046, nLength); pBuff[nLength] = 0; pBuff[nLength + 1] = 0; - return CFX_WideString::FromUTF16LE(reinterpret_cast(pBuff.data()), - nLength / sizeof(uint16_t)); + return WideString::FromUTF16LE(reinterpret_cast(pBuff.data()), + nLength / sizeof(uint16_t)); } CFX_RetainPtr CPDFXFA_Context::DownloadURL( - const CFX_WideString& wsURL) { + const WideString& wsURL) { return m_pFormFillEnv ? m_pFormFillEnv->DownloadFromURL(wsURL.c_str()) : nullptr; } -bool CPDFXFA_Context::PostRequestURL(const CFX_WideString& wsURL, - const CFX_WideString& wsData, - const CFX_WideString& wsContentType, - const CFX_WideString& wsEncode, - const CFX_WideString& wsHeader, - CFX_WideString& wsResponse) { +bool CPDFXFA_Context::PostRequestURL(const WideString& wsURL, + const WideString& wsData, + const WideString& wsContentType, + const WideString& wsEncode, + const WideString& wsHeader, + WideString& wsResponse) { if (!m_pFormFillEnv) return false; @@ -335,9 +335,9 @@ bool CPDFXFA_Context::PostRequestURL(const CFX_WideString& wsURL, return true; } -bool CPDFXFA_Context::PutRequestURL(const CFX_WideString& wsURL, - const CFX_WideString& wsData, - const CFX_WideString& wsEncode) { +bool CPDFXFA_Context::PutRequestURL(const WideString& wsURL, + const WideString& wsData, + const WideString& wsEncode) { return m_pFormFillEnv && m_pFormFillEnv->PutRequestURL(wsURL.c_str(), wsData.c_str(), wsEncode.c_str()); -- cgit v1.2.3