summaryrefslogtreecommitdiff
path: root/xfa/fxfa/cxfa_ffcombobox.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_ffcombobox.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_ffcombobox.cpp')
-rw-r--r--xfa/fxfa/cxfa_ffcombobox.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/xfa/fxfa/cxfa_ffcombobox.cpp b/xfa/fxfa/cxfa_ffcombobox.cpp
index 950cab5daf..ca5645f8e2 100644
--- a/xfa/fxfa/cxfa_ffcombobox.cpp
+++ b/xfa/fxfa/cxfa_ffcombobox.cpp
@@ -52,13 +52,13 @@ bool CXFA_FFComboBox::LoadWidget() {
m_pNormalWidget->LockUpdate();
for (const auto& label : m_pDataAcc->GetChoiceListItems(false))
- pComboBox->AddString(label.AsStringC());
+ pComboBox->AddString(label.AsStringView());
std::vector<int32_t> iSelArray = m_pDataAcc->GetSelectedItems();
if (!iSelArray.empty()) {
pComboBox->SetCurSel(iSelArray.front());
} else {
- CFX_WideString wsText;
+ WideString wsText;
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Raw);
pComboBox->SetEditText(wsText);
}
@@ -120,15 +120,15 @@ bool CXFA_FFComboBox::CommitData() {
bool CXFA_FFComboBox::IsDataChanged() {
auto* pFWLcombobox = ToComboBox(m_pNormalWidget.get());
- CFX_WideString wsText = pFWLcombobox->GetEditText();
+ WideString wsText = pFWLcombobox->GetEditText();
int32_t iCursel = pFWLcombobox->GetCurSel();
if (iCursel >= 0) {
- CFX_WideString wsSel = pFWLcombobox->GetTextByIndex(iCursel);
+ WideString wsSel = pFWLcombobox->GetTextByIndex(iCursel);
if (wsSel == wsText)
m_pDataAcc->GetChoiceListItem(wsText, iCursel, true);
}
- CFX_WideString wsOldValue;
+ WideString wsOldValue;
m_pDataAcc->GetValue(wsOldValue, XFA_VALUEPICTURE_Raw);
if (wsOldValue == wsText)
return false;
@@ -193,7 +193,7 @@ bool CXFA_FFComboBox::UpdateFWLData() {
if (!iSelArray.empty()) {
pComboBox->SetCurSel(iSelArray.front());
} else {
- CFX_WideString wsText;
+ WideString wsText;
pComboBox->SetCurSel(-1);
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Raw);
pComboBox->SetEditText(wsText);
@@ -241,16 +241,16 @@ bool CXFA_FFComboBox::CanSelectAll() {
return ToComboBox(m_pNormalWidget.get())->EditCanSelectAll();
}
-bool CXFA_FFComboBox::Copy(CFX_WideString& wsCopy) {
+bool CXFA_FFComboBox::Copy(WideString& wsCopy) {
return ToComboBox(m_pNormalWidget.get())->EditCopy(wsCopy);
}
-bool CXFA_FFComboBox::Cut(CFX_WideString& wsCut) {
+bool CXFA_FFComboBox::Cut(WideString& wsCut) {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
ToComboBox(m_pNormalWidget.get())->EditCut(wsCut);
}
-bool CXFA_FFComboBox::Paste(const CFX_WideString& wsPaste) {
+bool CXFA_FFComboBox::Paste(const WideString& wsPaste) {
return m_pDataAcc->IsChoiceListAllowTextEntry() &&
ToComboBox(m_pNormalWidget.get())->EditPaste(wsPaste);
}
@@ -273,7 +273,7 @@ void CXFA_FFComboBox::SetItemState(int32_t nIndex, bool bSelected) {
AddInvalidateRect();
}
-void CXFA_FFComboBox::InsertItem(const CFX_WideStringC& wsLabel,
+void CXFA_FFComboBox::InsertItem(const WideStringView& wsLabel,
int32_t nIndex) {
ToComboBox(m_pNormalWidget.get())->AddString(wsLabel);
m_pNormalWidget->Update();
@@ -291,7 +291,7 @@ void CXFA_FFComboBox::DeleteItem(int32_t nIndex) {
}
void CXFA_FFComboBox::OnTextChanged(CFWL_Widget* pWidget,
- const CFX_WideString& wsChanged) {
+ const WideString& wsChanged) {
CXFA_EventParam eParam;
m_pDataAcc->GetValue(eParam.m_wsPrevText, XFA_VALUEPICTURE_Raw);
eParam.m_wsChange = wsChanged;
@@ -335,7 +335,7 @@ void CXFA_FFComboBox::OnProcessEvent(CFWL_Event* pEvent) {
break;
}
case CFWL_Event::Type::EditChanged: {
- CFX_WideString wsChanged;
+ WideString wsChanged;
OnTextChanged(m_pNormalWidget.get(), wsChanged);
break;
}