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

Side by Side Diff: xfa/fwl/basewidget/fwl_listboximp.cpp

Issue 1951653002: Return bool rather than bitwise-and for FX_BOOL (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual tidy Created 4 years, 7 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 unified diff | Download patch
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/basewidget/fwl_listboximp.h" 7 #include "xfa/fwl/basewidget/fwl_listboximp.h"
8 8
9 #include "xfa/fde/tto/fde_textout.h" 9 #include "xfa/fde/tto/fde_textout.h"
10 #include "xfa/fwl/basewidget/fwl_comboboximp.h" 10 #include "xfa/fwl/basewidget/fwl_comboboximp.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 392 }
393 void CFWL_ListBoxImp::ClearSelection() { 393 void CFWL_ListBoxImp::ClearSelection() {
394 FX_BOOL bMulti = 394 FX_BOOL bMulti =
395 m_pProperties->m_dwStyleExes & FWL_STYLEEXT_LTB_MultiSelection; 395 m_pProperties->m_dwStyleExes & FWL_STYLEEXT_LTB_MultiSelection;
396 IFWL_ListBoxDP* pData = 396 IFWL_ListBoxDP* pData =
397 static_cast<IFWL_ListBoxDP*>(m_pProperties->m_pDataProvider); 397 static_cast<IFWL_ListBoxDP*>(m_pProperties->m_pDataProvider);
398 int32_t iCount = pData->CountItems(m_pInterface); 398 int32_t iCount = pData->CountItems(m_pInterface);
399 for (int32_t i = 0; i < iCount; i++) { 399 for (int32_t i = 0; i < iCount; i++) {
400 FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, i); 400 FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, i);
401 uint32_t dwState = pData->GetItemStyles(m_pInterface, hItem); 401 uint32_t dwState = pData->GetItemStyles(m_pInterface, hItem);
402 FX_BOOL bFindSel = dwState & FWL_ITEMSTATE_LTB_Selected; 402 if (!(dwState & FWL_ITEMSTATE_LTB_Selected)) {
dsinclair 2016/05/04 13:11:51 nit: no {}'s
Tom Sepez 2016/05/04 20:21:25 Done.
403 if (!bFindSel) {
404 continue; 403 continue;
405 } 404 }
406 SetSelectionDirect(hItem, FALSE); 405 SetSelectionDirect(hItem, FALSE);
407 if (!bMulti) { 406 if (!bMulti) {
408 return; 407 return;
409 } 408 }
410 } 409 }
411 } 410 }
412 void CFWL_ListBoxImp::SelectAll() { 411 void CFWL_ListBoxImp::SelectAll() {
413 FX_BOOL bMulti = 412 FX_BOOL bMulti =
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 pScrollBar->SetTrackPos(fPos); 1241 pScrollBar->SetTrackPos(fPos);
1243 m_pOwner->Repaint(&m_pOwner->m_rtClient); 1242 m_pOwner->Repaint(&m_pOwner->m_rtClient);
1244 } 1243 }
1245 return TRUE; 1244 return TRUE;
1246 } 1245 }
1247 void CFWL_ListBoxImpDelegate::DispatchSelChangedEv() { 1246 void CFWL_ListBoxImpDelegate::DispatchSelChangedEv() {
1248 CFWL_EvtLtbSelChanged ev; 1247 CFWL_EvtLtbSelChanged ev;
1249 ev.m_pSrcTarget = m_pOwner->m_pInterface; 1248 ev.m_pSrcTarget = m_pOwner->m_pInterface;
1250 m_pOwner->DispatchEvent(&ev); 1249 m_pOwner->DispatchEvent(&ev);
1251 } 1250 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698