summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_fftextedit.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/fxfa/cxfa_fftextedit.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/fxfa/cxfa_fftextedit.cpp')
-rw-r--r--xfa/fxfa/cxfa_fftextedit.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/xfa/fxfa/cxfa_fftextedit.cpp b/xfa/fxfa/cxfa_fftextedit.cpp
index 35c20fab6f..e27971d5df 100644
--- a/xfa/fxfa/cxfa_fftextedit.cpp
+++ b/xfa/fxfa/cxfa_fftextedit.cpp
@@ -47,7 +47,7 @@ bool CXFA_FFTextEdit::LoadWidget() {
m_pNormalWidget->LockUpdate();
UpdateWidgetProperty();
- CFX_WideString wsText;
+ WideString wsText;
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Display);
pFWLEdit->SetText(wsText);
m_pNormalWidget->UnlockUpdate();
@@ -173,8 +173,7 @@ bool CXFA_FFTextEdit::OnKillFocus(CXFA_FFWidget* pNewWidget) {
}
bool CXFA_FFTextEdit::CommitData() {
- CFX_WideString wsText =
- static_cast<CFWL_Edit*>(m_pNormalWidget.get())->GetText();
+ WideString wsText = static_cast<CFWL_Edit*>(m_pNormalWidget.get())->GetText();
if (m_pDataAcc->SetValue(wsText, XFA_VALUEPICTURE_Edit)) {
m_pDataAcc->UpdateUIDisplay(this);
return true;
@@ -183,7 +182,7 @@ bool CXFA_FFTextEdit::CommitData() {
return false;
}
-void CXFA_FFTextEdit::ValidateNumberField(const CFX_WideString& wsText) {
+void CXFA_FFTextEdit::ValidateNumberField(const WideString& wsText) {
CXFA_WidgetAcc* pAcc = GetDataAcc();
if (!pAcc || pAcc->GetUIType() != XFA_Element::NumericEdit)
return;
@@ -192,10 +191,10 @@ void CXFA_FFTextEdit::ValidateNumberField(const CFX_WideString& wsText) {
if (!pAppProvider)
return;
- CFX_WideString wsSomField;
+ WideString wsSomField;
pAcc->GetNode()->GetSOMExpression(wsSomField);
- CFX_WideString wsMessage;
+ WideString wsMessage;
wsMessage.Format(L"%s can not contain %s", wsText.c_str(),
wsSomField.c_str());
pAppProvider->MsgBox(wsMessage, pAppProvider->GetAppTitle(), XFA_MBICON_Error,
@@ -272,10 +271,10 @@ bool CXFA_FFTextEdit::UpdateFWLData() {
bUpdate = true;
}
- CFX_WideString wsText;
+ WideString wsText;
m_pDataAcc->GetValue(wsText, eType);
- CFX_WideString wsOldText = pEdit->GetText();
+ WideString wsOldText = pEdit->GetText();
if (wsText != wsOldText || (eType == XFA_VALUEPICTURE_Edit && bUpdate)) {
pEdit->SetText(wsText);
bUpdate = true;
@@ -287,8 +286,8 @@ bool CXFA_FFTextEdit::UpdateFWLData() {
}
void CXFA_FFTextEdit::OnTextChanged(CFWL_Widget* pWidget,
- const CFX_WideString& wsChanged,
- const CFX_WideString& wsPrevText) {
+ const WideString& wsChanged,
+ const WideString& wsPrevText) {
m_dwStatus |= XFA_WidgetStatus_TextEditValueChanged;
CXFA_EventParam eParam;
eParam.m_eType = XFA_EVENT_Change;
@@ -318,7 +317,7 @@ void CXFA_FFTextEdit::OnTextFull(CFWL_Widget* pWidget) {
m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Full, &eParam);
}
-bool CXFA_FFTextEdit::CheckWord(const CFX_ByteStringC& sWord) {
+bool CXFA_FFTextEdit::CheckWord(const ByteStringView& sWord) {
return sWord.IsEmpty() || m_pDataAcc->GetUIType() != XFA_Element::TextEdit;
}
@@ -332,7 +331,7 @@ void CXFA_FFTextEdit::OnProcessEvent(CFWL_Event* pEvent) {
case CFWL_Event::Type::TextChanged: {
CFWL_EventTextChanged* event =
static_cast<CFWL_EventTextChanged*>(pEvent);
- CFX_WideString wsChange;
+ WideString wsChange;
OnTextChanged(m_pNormalWidget.get(), wsChange, event->wsPrevText);
break;
}
@@ -341,9 +340,9 @@ void CXFA_FFTextEdit::OnProcessEvent(CFWL_Event* pEvent) {
break;
}
case CFWL_Event::Type::CheckWord: {
- CFX_WideString wstr(L"FWL_EVENT_DTP_SelectChanged");
+ WideString wstr(L"FWL_EVENT_DTP_SelectChanged");
CFWL_EventCheckWord* event = static_cast<CFWL_EventCheckWord*>(pEvent);
- event->bCheckWord = CheckWord(event->bsWord.AsStringC());
+ event->bCheckWord = CheckWord(event->bsWord.AsStringView());
break;
}
default: