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

Side by Side Diff: xfa/fwl/core/fwl_widgetmgrimp.cpp

Issue 1998873002: Clean up XFA code which causes warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments 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
« no previous file with comments | « xfa/fgas/layout/fgas_textbreak.cpp ('k') | xfa/fwl/lightwidget/cfwl_theme.cpp » ('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/core/fwl_widgetmgrimp.h" 7 #include "xfa/fwl/core/fwl_widgetmgrimp.h"
8 8
9 #include "xfa/fwl/core/cfwl_message.h" 9 #include "xfa/fwl/core/cfwl_message.h"
10 #include "xfa/fwl/core/fwl_appimp.h" 10 #include "xfa/fwl/core/fwl_appimp.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 while (pChild) 464 while (pChild)
465 pChild = GetWidget(pChild, FWL_WGTRELATION_NextSibling); 465 pChild = GetWidget(pChild, FWL_WGTRELATION_NextSibling);
466 return iRet; 466 return iRet;
467 } 467 }
468 IFWL_Widget* CFWL_WidgetMgr::GetSiblingRadioButton(IFWL_Widget* pWidget, 468 IFWL_Widget* CFWL_WidgetMgr::GetSiblingRadioButton(IFWL_Widget* pWidget,
469 FX_BOOL bNext) { 469 FX_BOOL bNext) {
470 return nullptr; 470 return nullptr;
471 } 471 }
472 IFWL_Widget* CFWL_WidgetMgr::GetRadioButtonGroupHeader( 472 IFWL_Widget* CFWL_WidgetMgr::GetRadioButtonGroupHeader(
473 IFWL_Widget* pRadioButton) { 473 IFWL_Widget* pRadioButton) {
474 if (pRadioButton->GetStyles() & FWL_WGTSTYLE_Group) {
475 return pRadioButton;
476 }
477 IFWL_Widget* pNext = pRadioButton; 474 IFWL_Widget* pNext = pRadioButton;
478 while ((pNext = GetSiblingRadioButton(pNext, FALSE)) != NULL) { 475 while (pNext) {
479 if (pNext->GetStyles() & FWL_WGTSTYLE_Group) { 476 if (pNext->GetStyles() & FWL_WGTSTYLE_Group)
480 return pNext; 477 return pNext;
481 } 478 pNext = GetSiblingRadioButton(pNext, FALSE);
482 } 479 }
483 pNext = GetWidget(pRadioButton, FWL_WGTRELATION_LastSibling); 480 pNext = GetWidget(pRadioButton, FWL_WGTRELATION_LastSibling);
484 while ((pNext = GetSiblingRadioButton(pNext, FALSE)) && pNext && 481 while ((pNext = GetSiblingRadioButton(pNext, FALSE)) != nullptr &&
485 pNext != pRadioButton) { 482 pNext != pRadioButton) {
486 if (pNext->GetStyles() & FWL_WGTSTYLE_Group) { 483 if (pNext->GetStyles() & FWL_WGTSTYLE_Group)
487 return pNext; 484 return pNext;
488 }
489 } 485 }
490 pNext = GetWidget(pRadioButton, FWL_WGTRELATION_FirstSibling); 486 pNext = GetWidget(pRadioButton, FWL_WGTRELATION_FirstSibling);
491 return GetSiblingRadioButton(pNext, TRUE); 487 return GetSiblingRadioButton(pNext, TRUE);
492 } 488 }
493 void CFWL_WidgetMgr::GetSameGroupRadioButton( 489 void CFWL_WidgetMgr::GetSameGroupRadioButton(
494 IFWL_Widget* pRadioButton, 490 IFWL_Widget* pRadioButton,
495 CFX_ArrayTemplate<IFWL_Widget*>& group) { 491 CFX_ArrayTemplate<IFWL_Widget*>& group) {
496 IFWL_Widget* pFirst = GetWidget(pRadioButton, FWL_WGTRELATION_FirstSibling); 492 IFWL_Widget* pFirst = GetWidget(pRadioButton, FWL_WGTRELATION_FirstSibling);
497 if (!pFirst) { 493 if (!pFirst) {
498 pFirst = pRadioButton; 494 pFirst = pRadioButton;
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 temp.Deflate(50, 50); 892 temp.Deflate(50, 50);
897 if (!temp.Contains(r)) 893 if (!temp.Contains(r))
898 return FALSE; 894 return FALSE;
899 895
900 pItem->bOutsideChanged = FALSE; 896 pItem->bOutsideChanged = FALSE;
901 } 897 }
902 #endif 898 #endif
903 899
904 return pItem->iRedrawCounter == 0; 900 return pItem->iRedrawCounter == 0;
905 } 901 }
OLDNEW
« no previous file with comments | « xfa/fgas/layout/fgas_textbreak.cpp ('k') | xfa/fwl/lightwidget/cfwl_theme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698