summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-18 14:23:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-18 18:40:16 +0000
commit275e260a6cd4a8e506ba974feb85ebcd926c1739 (patch)
tree2029b9158ec044764ceff122fe5fb5d0a3f123d1 /fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
parent450fbeaaabf1ab340c1018de2e58f1950657517e (diff)
downloadpdfium-275e260a6cd4a8e506ba974feb85ebcd926c1739.tar.xz
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 <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa/cpdfxfa_context.cpp')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.cpp48
1 files changed, 24 insertions, 24 deletions
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<uint8_t> 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<uint16_t*>(pBuff.data()),
- nLength / sizeof(uint16_t));
+ return WideString::FromUTF16LE(reinterpret_cast<uint16_t*>(pBuff.data()),
+ nLength / sizeof(uint16_t));
}
CFX_RetainPtr<IFX_SeekableReadStream> 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());