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

Unified Diff: xfa/fwl/theme/cfwl_listboxtp.cpp

Issue 2435603003: Cleanup unused methods and return values in FWL code. (Closed)
Patch Set: Fix typo Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/theme/cfwl_listboxtp.h ('k') | xfa/fwl/theme/cfwl_monthcalendartp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/theme/cfwl_listboxtp.cpp
diff --git a/xfa/fwl/theme/cfwl_listboxtp.cpp b/xfa/fwl/theme/cfwl_listboxtp.cpp
index 69fc0719f85a56ef2ee91f5d2e9bc7dc0314df47..304c3a8397b620310733d24876e98fad31eb9847 100644
--- a/xfa/fwl/theme/cfwl_listboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_listboxtp.cpp
@@ -20,9 +20,10 @@ bool CFWL_ListBoxTP::IsValidWidget(IFWL_Widget* pWidget) {
return pWidget && pWidget->GetClassID() == FWL_Type::ListBox;
}
-FX_BOOL CFWL_ListBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
+void CFWL_ListBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
if (!pParams)
- return FALSE;
+ return;
+
switch (pParams->m_iPart) {
case CFWL_Part::Border: {
DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix);
@@ -62,18 +63,21 @@ FX_BOOL CFWL_ListBoxTP::DrawBackground(CFWL_ThemeBackground* pParams) {
FillSoildRect(pParams->m_pGraphics, color, &pParams->m_rtPart,
&pParams->m_matrix);
}
- default: {}
+ default:
+ break;
}
- return TRUE;
}
-FWL_Error CFWL_ListBoxTP::Initialize() {
+
+void CFWL_ListBoxTP::Initialize() {
InitTTO();
- return CFWL_WidgetTP::Initialize();
+ CFWL_WidgetTP::Initialize();
}
-FWL_Error CFWL_ListBoxTP::Finalize() {
+
+void CFWL_ListBoxTP::Finalize() {
FinalizeTTO();
- return CFWL_WidgetTP::Finalize();
+ CFWL_WidgetTP::Finalize();
}
+
void CFWL_ListBoxTP::DrawListBoxItem(CFX_Graphics* pGraphics,
uint32_t dwStates,
const CFX_RectF* prtItem,
@@ -96,9 +100,6 @@ void CFWL_ListBoxTP::DrawListBoxItem(CFX_Graphics* pGraphics,
pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix);
pGraphics->RestoreGraphState();
}
- if (dwStates & CFWL_PartState_Focused) {
- if (pData) {
- DrawFocus(pGraphics, (CFX_RectF*)pData, pMatrix);
- }
- }
+ if (dwStates & CFWL_PartState_Focused && pData)
+ DrawFocus(pGraphics, (CFX_RectF*)pData, pMatrix);
}
« no previous file with comments | « xfa/fwl/theme/cfwl_listboxtp.h ('k') | xfa/fwl/theme/cfwl_monthcalendartp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698