From e50184c087ee6f90568ad1166a55f5d25be4d09e Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 22 Nov 2016 09:34:44 -0800 Subject: 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 --- xfa/fwl/core/cfwl_listbox.cpp | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'xfa/fwl/core/cfwl_listbox.cpp') diff --git a/xfa/fwl/core/cfwl_listbox.cpp b/xfa/fwl/core/cfwl_listbox.cpp index 4c933bf24e..7da49efbb0 100644 --- a/xfa/fwl/core/cfwl_listbox.cpp +++ b/xfa/fwl/core/cfwl_listbox.cpp @@ -82,15 +82,11 @@ void CFWL_ListBox::SetSelItem(CFWL_ListItem* pItem, bool bSelect) { ToListBox(GetWidget())->SetSelItem(pItem, bSelect); } -void CFWL_ListBox::GetItemText(CFWL_ListItem* pItem, CFX_WideString& wsText) { - if (GetWidget()) - ToListBox(GetWidget())->GetItemText(pItem, wsText); -} - -CFWL_ListItem* CFWL_ListBox::GetItem(int32_t nIndex) { - if (nIndex < 0 || nIndex >= CountItems(nullptr)) - return nullptr; - return m_ItemArray[nIndex].get(); +void CFWL_ListBox::GetItemText(IFWL_Widget* pWidget, + CFWL_ListItem* pItem, + CFX_WideString& wsText) { + if (pItem) + wsText = static_cast(pItem)->m_wsText; } uint32_t CFWL_ListBox::GetItemStates(CFWL_ListItem* pItem) { @@ -124,13 +120,6 @@ uint32_t CFWL_ListBox::GetItemStyles(IFWL_Widget* pWidget, return pItem ? static_cast(pItem)->m_dwStates : 0; } -void CFWL_ListBox::GetItemText(IFWL_Widget* pWidget, - CFWL_ListItem* pItem, - CFX_WideString& wsText) { - if (pItem) - wsText = static_cast(pItem)->m_wsText; -} - void CFWL_ListBox::GetItemRect(IFWL_Widget* pWidget, CFWL_ListItem* pItem, CFX_RectF& rtItem) { -- cgit v1.2.3