diff options
author | dsinclair <dsinclair@chromium.org> | 2016-12-14 06:25:02 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-14 06:25:02 -0800 |
commit | 603f57b85c0643f0598f03b97c4525501f3e1221 (patch) | |
tree | 85c9521a8f0fec47ba84041d64cb84e6bc019638 /xfa/fxfa/app/xfa_ffchoicelist.cpp | |
parent | a9caab94c1f16929e5acf2676117224617d80f53 (diff) | |
download | pdfium-603f57b85c0643f0598f03b97c4525501f3e1221.tar.xz |
Update CFWL_ListBox to return instead of using out params.
This CL updates the CFWL_ListBox code to work with return values instead
of out params. This also extracts the CFWL_ListItem code out of CFWL_ListBox
and puts into the correct class.
Review-Url: https://codereview.chromium.org/2572783002
Diffstat (limited to 'xfa/fxfa/app/xfa_ffchoicelist.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_ffchoicelist.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp index d19fd6876b..2764d725af 100644 --- a/xfa/fxfa/app/xfa_ffchoicelist.cpp +++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp @@ -104,7 +104,7 @@ bool CXFA_FFListBox::IsDataChanged() { for (int32_t i = 0; i < iSels; ++i) { CFWL_ListItem* hlistItem = pListBox->GetItem(nullptr, iSelArray[i]); - if (!(pListBox->GetItemStates(hlistItem) & FWL_ITEMSTATE_LTB_Selected)) + if (!(hlistItem->GetStates() & FWL_ITEMSTATE_LTB_Selected)) return true; } return false; @@ -163,8 +163,8 @@ void CXFA_FFListBox::OnSelectChanged(CFWL_Widget* pWidget, CFWL_ListBox* pListBox = (CFWL_ListBox*)m_pNormalWidget; int32_t iSels = pListBox->CountSelItems(); if (iSels > 0) { - eParam.m_wsNewText = - pListBox->GetItemText(nullptr, pListBox->GetSelItem(0)); + CFWL_ListItem* item = pListBox->GetSelItem(0); + eParam.m_wsNewText = item ? item->GetText() : L""; } m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); |