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

Side by Side Diff: xfa/fwl/cfwl_listbox.cpp

Issue 2563693003: Remove unused list data pointer (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « xfa/fwl/cfwl_listbox.h ('k') | xfa/fwl/cfwl_listitem.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "xfa/fwl/cfwl_listbox.h" 7 #include "xfa/fwl/cfwl_listbox.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 return pItem ? static_cast<CFWL_ListItem*>(pItem)->m_dwStates : 0; 1033 return pItem ? static_cast<CFWL_ListItem*>(pItem)->m_dwStates : 0;
1034 } 1034 }
1035 1035
1036 void CFWL_ListBox::GetItemRect(CFWL_Widget* pWidget, 1036 void CFWL_ListBox::GetItemRect(CFWL_Widget* pWidget,
1037 CFWL_ListItem* pItem, 1037 CFWL_ListItem* pItem,
1038 CFX_RectF& rtItem) { 1038 CFX_RectF& rtItem) {
1039 if (pItem) 1039 if (pItem)
1040 rtItem = static_cast<CFWL_ListItem*>(pItem)->m_rtItem; 1040 rtItem = static_cast<CFWL_ListItem*>(pItem)->m_rtItem;
1041 } 1041 }
1042 1042
1043 void* CFWL_ListBox::GetItemData(CFWL_Widget* pWidget, CFWL_ListItem* pItem) {
1044 return pItem ? static_cast<CFWL_ListItem*>(pItem)->m_pData : nullptr;
1045 }
1046
1047 void CFWL_ListBox::SetItemStyles(CFWL_Widget* pWidget, 1043 void CFWL_ListBox::SetItemStyles(CFWL_Widget* pWidget,
1048 CFWL_ListItem* pItem, 1044 CFWL_ListItem* pItem,
1049 uint32_t dwStyle) { 1045 uint32_t dwStyle) {
1050 if (pItem) 1046 if (pItem)
1051 static_cast<CFWL_ListItem*>(pItem)->m_dwStates = dwStyle; 1047 static_cast<CFWL_ListItem*>(pItem)->m_dwStates = dwStyle;
1052 } 1048 }
1053 1049
1054 void CFWL_ListBox::SetItemRect(CFWL_Widget* pWidget, 1050 void CFWL_ListBox::SetItemRect(CFWL_Widget* pWidget,
1055 CFWL_ListItem* pItem, 1051 CFWL_ListItem* pItem,
1056 const CFX_RectF& rtItem) { 1052 const CFX_RectF& rtItem) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 1117
1122 void CFWL_ListBox::DeleteAll() { 1118 void CFWL_ListBox::DeleteAll() {
1123 m_ItemArray.clear(); 1119 m_ItemArray.clear();
1124 } 1120 }
1125 1121
1126 uint32_t CFWL_ListBox::GetItemStates(CFWL_ListItem* pItem) { 1122 uint32_t CFWL_ListBox::GetItemStates(CFWL_ListItem* pItem) {
1127 if (!pItem) 1123 if (!pItem)
1128 return 0; 1124 return 0;
1129 return pItem->m_dwStates | pItem->m_dwCheckState; 1125 return pItem->m_dwStates | pItem->m_dwCheckState;
1130 } 1126 }
OLDNEW
« no previous file with comments | « xfa/fwl/cfwl_listbox.h ('k') | xfa/fwl/cfwl_listitem.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698