summaryrefslogtreecommitdiff
path: root/xfa/fwl/cfwl_edit.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 /xfa/fwl/cfwl_edit.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 'xfa/fwl/cfwl_edit.cpp')
-rw-r--r--xfa/fwl/cfwl_edit.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp
index ffe324cefd..1bec1503fc 100644
--- a/xfa/fwl/cfwl_edit.cpp
+++ b/xfa/fwl/cfwl_edit.cpp
@@ -189,12 +189,12 @@ void CFWL_Edit::DrawSpellCheck(CXFA_Graphics* pGraphics,
pGraphics->ConcatMatrix(pMatrix);
CFWL_EventCheckWord checkWordEvent(this);
- CFX_ByteString sLatinWord;
+ ByteString sLatinWord;
CXFA_Path pathSpell;
int32_t nStart = 0;
float fOffSetX = m_rtEngine.left - m_fScrollOffsetX;
float fOffSetY = m_rtEngine.top - m_fScrollOffsetY + m_fVAlignOffset;
- CFX_WideString wsSpell = GetText();
+ WideString wsSpell = GetText();
int32_t nContentLen = wsSpell.GetLength();
for (int i = 0; i < nContentLen; i++) {
if (FxEditIsLatinWord(wsSpell[i])) {
@@ -270,7 +270,7 @@ void CFWL_Edit::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
m_pProperties->m_pThemeProvider = pThemeProvider;
}
-void CFWL_Edit::SetText(const CFX_WideString& wsText) {
+void CFWL_Edit::SetText(const WideString& wsText) {
m_EdtEngine.Clear();
m_EdtEngine.Insert(0, wsText);
}
@@ -279,7 +279,7 @@ int32_t CFWL_Edit::GetTextLength() const {
return m_EdtEngine.GetLength();
}
-CFX_WideString CFWL_Edit::GetText() const {
+WideString CFWL_Edit::GetText() const {
return m_EdtEngine.GetText();
}
@@ -322,7 +322,7 @@ void CFWL_Edit::SetAliasChar(wchar_t wAlias) {
m_EdtEngine.SetAliasChar(wAlias);
}
-bool CFWL_Edit::Copy(CFX_WideString& wsCopy) {
+bool CFWL_Edit::Copy(WideString& wsCopy) {
if (!m_EdtEngine.HasSelection())
return false;
@@ -330,7 +330,7 @@ bool CFWL_Edit::Copy(CFX_WideString& wsCopy) {
return true;
}
-bool CFWL_Edit::Cut(CFX_WideString& wsCut) {
+bool CFWL_Edit::Cut(WideString& wsCut) {
if (!m_EdtEngine.HasSelection())
return false;
@@ -338,7 +338,7 @@ bool CFWL_Edit::Cut(CFX_WideString& wsCut) {
return true;
}
-bool CFWL_Edit::Paste(const CFX_WideString& wsPaste) {
+bool CFWL_Edit::Paste(const WideString& wsPaste) {
if (m_EdtEngine.HasSelection())
m_EdtEngine.ReplaceSelectedText(wsPaste);
else
@@ -396,7 +396,7 @@ void CFWL_Edit::OnCaretChanged() {
}
}
-void CFWL_Edit::OnTextChanged(const CFX_WideString& prevText) {
+void CFWL_Edit::OnTextChanged(const WideString& prevText) {
if (m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_VAlignMask)
UpdateVAlignment();
@@ -412,7 +412,7 @@ void CFWL_Edit::OnSelChanged() {
RepaintRect(GetClientRect());
}
-bool CFWL_Edit::OnValidate(const CFX_WideString& wsText) {
+bool CFWL_Edit::OnValidate(const WideString& wsText) {
CFWL_Widget* pDst = GetOuter();
if (!pDst)
pDst = this;
@@ -1050,7 +1050,7 @@ bool CFWL_Edit::ValidateNumberChar(wchar_t cNum) {
if (!m_bSetRange)
return true;
- CFX_WideString wsText = m_EdtEngine.GetText();
+ WideString wsText = m_EdtEngine.GetText();
if (wsText.IsEmpty())
return cNum != L'0';
@@ -1060,9 +1060,9 @@ bool CFWL_Edit::ValidateNumberChar(wchar_t cNum) {
return false;
int32_t nLen = wsText.GetLength();
- CFX_WideString l = wsText.Left(m_CursorPosition);
- CFX_WideString r = wsText.Right(nLen - m_CursorPosition);
- CFX_WideString wsNew = l + cNum + r;
+ WideString l = wsText.Left(m_CursorPosition);
+ WideString r = wsText.Right(nLen - m_CursorPosition);
+ WideString wsNew = l + cNum + r;
return wsNew.GetInteger() <= m_iMax;
}
@@ -1369,7 +1369,7 @@ void CFWL_Edit::OnChar(CFWL_MessageKey* pMsg) {
if (pMsg->m_dwFlags & kEditingModifier)
break;
- m_EdtEngine.Insert(m_CursorPosition, CFX_WideString(c));
+ m_EdtEngine.Insert(m_CursorPosition, WideString(c));
SetCursorPosition(m_CursorPosition + 1);
break;
}