diff options
author | dsinclair <dsinclair@chromium.org> | 2016-10-20 07:19:43 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-10-20 07:19:43 -0700 |
commit | 73895de7dea3737d1a25801001b8efe186c6f5a3 (patch) | |
tree | 8754626255699818c34d336fccc75926a5958345 /xfa/fwl/theme/cfwl_listboxtp.cpp | |
parent | 2a38a02b0492de0576c2e5b5e7d550f969367f9d (diff) | |
download | pdfium-73895de7dea3737d1a25801001b8efe186c6f5a3.tar.xz |
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
Diffstat (limited to 'xfa/fwl/theme/cfwl_listboxtp.cpp')
-rw-r--r-- | xfa/fwl/theme/cfwl_listboxtp.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
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); } |