diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-22 09:34:44 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-22 09:34:44 -0800 |
commit | e50184c087ee6f90568ad1166a55f5d25be4d09e (patch) | |
tree | 21210006ff0ab85bb069f0e3682093b6ce40c4f1 /xfa/fxfa | |
parent | 4572c8a20beee5cbab2eb1a90cb6cadcc5fa512c (diff) | |
download | pdfium-e50184c087ee6f90568ad1166a55f5d25be4d09e.tar.xz |
Rename common methods between ifwl and cfwl.
This CL renames some methods in IFWL which have the same name as the CFWL
methods but the CFWL methods are not proxy methods.
Review-Url: https://codereview.chromium.org/2520413002
Diffstat (limited to 'xfa/fxfa')
-rw-r--r-- | xfa/fxfa/app/xfa_ffchoicelist.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp index 63ed7c46d3..da433aeeed 100644 --- a/xfa/fxfa/app/xfa_ffchoicelist.cpp +++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp @@ -66,7 +66,7 @@ bool CXFA_FFListBox::LoadWidget() { m_pDataAcc->GetSelectedItems(iSelArray); int32_t iSelCount = iSelArray.GetSize(); for (int32_t j = 0; j < iSelCount; j++) { - CFWL_ListItem* item = pListBox->GetItem(iSelArray[j]); + CFWL_ListItem* item = pListBox->GetItem(nullptr, iSelArray[j]); pListBox->SetSelItem(item, true); } m_pNormalWidget->UnlockUpdate(); @@ -100,7 +100,7 @@ bool CXFA_FFListBox::IsDataChanged() { return true; for (int32_t i = 0; i < iSels; ++i) { - CFWL_ListItem* hlistItem = pListBox->GetItem(iSelArray[i]); + CFWL_ListItem* hlistItem = pListBox->GetItem(nullptr, iSelArray[i]); if (!(pListBox->GetItemStates(hlistItem) & FWL_ITEMSTATE_LTB_Selected)) return true; } @@ -160,7 +160,7 @@ void CXFA_FFListBox::OnSelectChanged(IFWL_Widget* pWidget, CFWL_ListBox* pListBox = (CFWL_ListBox*)m_pNormalWidget; int32_t iSels = pListBox->CountSelItems(); if (iSels > 0) { - pListBox->GetItemText(pListBox->GetSelItem(0), eParam.m_wsNewText); + pListBox->GetItemText(nullptr, pListBox->GetSelItem(0), eParam.m_wsNewText); } m_pDataAcc->ProcessEvent(XFA_ATTRIBUTEENUM_Change, &eParam); } @@ -178,13 +178,13 @@ void CXFA_FFListBox::InsertItem(const CFX_WideStringC& wsLabel, AddInvalidateRect(); } void CXFA_FFListBox::DeleteItem(int32_t nIndex) { - if (nIndex < 0) { - ((CFWL_ListBox*)m_pNormalWidget)->DeleteAll(); - } else { - ((CFWL_ListBox*)m_pNormalWidget) - ->DeleteString(((CFWL_ListBox*)m_pNormalWidget)->GetItem(nIndex)); - } - m_pNormalWidget->Update(); + CFWL_ListBox* listBox = static_cast<CFWL_ListBox*>(m_pNormalWidget); + if (nIndex < 0) + listBox->DeleteAll(); + else + listBox->DeleteString(listBox->GetItem(nullptr, nIndex)); + + listBox->Update(); AddInvalidateRect(); } |