Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: xfa/fxfa/app/xfa_ffchoicelist.cpp

Issue 1857073002: Make down-conversion explicit from CFX_Widetring to CFX_WideStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: String argument type Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_ffbarcode.cpp ('k') | xfa/fxfa/app/xfa_ffdocview.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffchoicelist.cpp
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp
index 44ae14264dcb2e44185bf163bcc4bf1df8a17f3c..645b8c88fa4048fbff189894a3fae94aea28328c 100644
--- a/xfa/fxfa/app/xfa_ffchoicelist.cpp
+++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp
@@ -44,7 +44,7 @@ FX_BOOL CXFA_FFListBox::LoadWidget() {
m_pDataAcc->GetChoiceListItems(wsLabelArray, FALSE);
int32_t iItems = wsLabelArray.GetSize();
for (int32_t i = 0; i < iItems; i++) {
- pListBox->AddString(wsLabelArray[i]);
+ pListBox->AddString(wsLabelArray[i].AsWideStringC());
}
uint32_t dwExtendedStyle = FWL_STYLEEXT_LTB_ShowScrollBarFocus;
if (m_pDataAcc->GetChoiceListOpen() == XFA_ATTRIBUTEENUM_MultiSelect) {
@@ -166,7 +166,7 @@ void CXFA_FFListBox::SetItemState(int32_t nIndex, FX_BOOL bSelected) {
void CXFA_FFListBox::InsertItem(const CFX_WideStringC& wsLabel,
int32_t nIndex) {
CFX_WideString wsTemp(wsLabel);
- ((CFWL_ListBox*)m_pNormalWidget)->AddString(wsTemp);
+ ((CFWL_ListBox*)m_pNormalWidget)->AddString(wsTemp.AsWideStringC());
m_pNormalWidget->Update();
AddInvalidateRect();
}
@@ -240,7 +240,7 @@ FX_BOOL CXFA_FFComboBox::LoadWidget() {
m_pDataAcc->GetChoiceListItems(wsLabelArray, FALSE);
int32_t iItems = wsLabelArray.GetSize();
for (int32_t i = 0; i < iItems; i++) {
- pComboBox->AddString(wsLabelArray[i]);
+ pComboBox->AddString(wsLabelArray[i].AsWideStringC());
}
CFX_Int32Array iSelArray;
m_pDataAcc->GetSelectedItems(iSelArray);
@@ -250,7 +250,7 @@ FX_BOOL CXFA_FFComboBox::LoadWidget() {
} else {
CFX_WideString wsText;
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Raw);
- pComboBox->SetEditText(wsText);
+ pComboBox->SetEditText(wsText.AsWideStringC());
}
UpdateWidgetProperty();
m_pNormalWidget->UnlockUpdate();
@@ -382,7 +382,7 @@ FX_BOOL CXFA_FFComboBox::UpdateFWLData() {
CFX_WideString wsText;
((CFWL_ComboBox*)m_pNormalWidget)->SetCurSel(-1);
m_pDataAcc->GetValue(wsText, XFA_VALUEPICTURE_Raw);
- ((CFWL_ComboBox*)m_pNormalWidget)->SetEditText(wsText);
+ ((CFWL_ComboBox*)m_pNormalWidget)->SetEditText(wsText.AsWideStringC());
}
m_pNormalWidget->Update();
return TRUE;
« no previous file with comments | « xfa/fxfa/app/xfa_ffbarcode.cpp ('k') | xfa/fxfa/app/xfa_ffdocview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698