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_pushbuttontp.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'xfa/fwl/theme/cfwl_pushbuttontp.cpp') diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp index 62b8ffef65..20446da54b 100644 --- a/xfa/fwl/theme/cfwl_pushbuttontp.cpp +++ b/xfa/fwl/theme/cfwl_pushbuttontp.cpp @@ -29,7 +29,8 @@ uint32_t CFWL_PushButtonTP::SetThemeID(IFWL_Widget* pWidget, SetThemeData(FWL_GetThemeColor(dwThemeID)); return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID); } -FX_BOOL CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) { + +void CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) { switch (pParams->m_iPart) { case CFWL_Part::Border: { DrawBorder(pParams->m_pGraphics, &pParams->m_rtPart, &pParams->m_matrix); @@ -87,10 +88,11 @@ FX_BOOL CFWL_PushButtonTP::DrawBackground(CFWL_ThemeBackground* pParams) { pGraphics->RestoreGraphState(); break; } - default: {} + default: + break; } - return TRUE; } + void* CFWL_PushButtonTP::GetCapacity(CFWL_ThemePart* pThemePart, CFWL_WidgetCapacity dwCapacity) { if (dwCapacity == CFWL_WidgetCapacity::Margin) { @@ -99,14 +101,17 @@ void* CFWL_PushButtonTP::GetCapacity(CFWL_ThemePart* pThemePart, } return CFWL_WidgetTP::GetCapacity(pThemePart, dwCapacity); } -FWL_Error CFWL_PushButtonTP::Initialize() { + +void CFWL_PushButtonTP::Initialize() { InitTTO(); - return CFWL_WidgetTP::Initialize(); + CFWL_WidgetTP::Initialize(); } -FWL_Error CFWL_PushButtonTP::Finalize() { + +void CFWL_PushButtonTP::Finalize() { FinalizeTTO(); - return CFWL_WidgetTP::Finalize(); + CFWL_WidgetTP::Finalize(); } + void CFWL_PushButtonTP::SetThemeData(uint32_t dwID) { if (dwID) { m_pThemeData->clrBorder[0] = ArgbEncode(255, 55, 98, 6); @@ -152,6 +157,7 @@ void CFWL_PushButtonTP::SetThemeData(uint32_t dwID) { m_pThemeData->clrFill[4] = ArgbEncode(255, 245, 244, 234); } } + int32_t CFWL_PushButtonTP::GetColorID(uint32_t dwStates) const { int32_t color = 0; if (dwStates & CFWL_PartState_Disabled) -- cgit v1.2.3