summaryrefslogtreecommitdiff
path: root/fpdfsdk/formfiller/cffl_combobox.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-09-13 06:46:40 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-13 06:46:40 -0700
commit067990ccf96ae962392a2dbacbfd8348dc4c7676 (patch)
tree5e6a1d32d1b19bc2f7ff4197693d8612737342fc /fpdfsdk/formfiller/cffl_combobox.cpp
parentbb8935e9def5ad865be613eebea597a77fc7c547 (diff)
downloadpdfium-067990ccf96ae962392a2dbacbfd8348dc4c7676.tar.xz
Stop converting widestring -> c_str -> widestring in several places.
Avoids a needless alloc and copy. Review-Url: https://codereview.chromium.org/2338553002
Diffstat (limited to 'fpdfsdk/formfiller/cffl_combobox.cpp')
-rw-r--r--fpdfsdk/formfiller/cffl_combobox.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/fpdfsdk/formfiller/cffl_combobox.cpp b/fpdfsdk/formfiller/cffl_combobox.cpp
index f6aef20c02..fc590fd940 100644
--- a/fpdfsdk/formfiller/cffl_combobox.cpp
+++ b/fpdfsdk/formfiller/cffl_combobox.cpp
@@ -65,11 +65,11 @@ CPWL_Wnd* CFFL_ComboBox::NewPDFWindow(const PWL_CREATEPARAM& cp,
swText = m_pWidget->GetOptionLabel(nCurSel);
for (int32_t i = 0, sz = m_pWidget->CountOptions(); i < sz; i++) {
- pWnd->AddString(m_pWidget->GetOptionLabel(i).c_str());
+ pWnd->AddString(m_pWidget->GetOptionLabel(i));
}
pWnd->SetSelect(nCurSel);
- pWnd->SetText(swText.c_str());
+ pWnd->SetText(swText);
return pWnd;
}
@@ -172,7 +172,7 @@ void CFFL_ComboBox::SetActionData(CPDFSDK_PageView* pPageView,
static_cast<CPWL_ComboBox*>(GetPDFWindow(pPageView, FALSE))) {
if (CPWL_Edit* pEdit = pComboBox->GetEdit()) {
pEdit->SetSel(fa.nSelStart, fa.nSelEnd);
- pEdit->ReplaceSel(fa.sChange.c_str());
+ pEdit->ReplaceSel(fa.sChange);
}
}
break;
@@ -219,7 +219,7 @@ void CFFL_ComboBox::RestoreState(CPDFSDK_PageView* pPageView) {
pComboBox->SetSelect(m_State.nIndex);
} else {
if (CPWL_Edit* pEdit = pComboBox->GetEdit()) {
- pEdit->SetText(m_State.sValue.c_str());
+ pEdit->SetText(m_State.sValue);
pEdit->SetSel(m_State.nStart, m_State.nEnd);
}
}