From 73895de7dea3737d1a25801001b8efe186c6f5a3 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 20 Oct 2016 07:19:43 -0700 Subject: Cleanup unused methods and return values in FWL code. This CL does an initial pass to remove unused methods and return values in the FWL code base. Review-Url: https://chromiumcodereview.appspot.com/2435603003 --- xfa/fwl/theme/cfwl_listboxtp.cpp | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'xfa/fwl/theme/cfwl_listboxtp.cpp') diff --git a/xfa/fwl/theme/cfwl_listboxtp.cpp b/xfa/fwl/theme/cfwl_listboxtp.cpp index 69fc0719f8..304c3a8397 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); } -- cgit v1.2.3