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_monthcalendartp.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_monthcalendartp.cpp')
-rw-r--r-- | xfa/fwl/theme/cfwl_monthcalendartp.cpp | 85 |
1 files changed, 44 insertions, 41 deletions
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.cpp b/xfa/fwl/theme/cfwl_monthcalendartp.cpp index 01d2854c2d..b554483dcd 100644 --- a/xfa/fwl/theme/cfwl_monthcalendartp.cpp +++ b/xfa/fwl/theme/cfwl_monthcalendartp.cpp @@ -66,9 +66,10 @@ uint32_t CFWL_MonthCalendarTP::SetThemeID(IFWL_Widget* pWidget, return CFWL_WidgetTP::SetThemeID(pWidget, dwThemeID); } -FX_BOOL CFWL_MonthCalendarTP::DrawBackground(CFWL_ThemeBackground* pParams) { +void CFWL_MonthCalendarTP::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); @@ -119,13 +120,15 @@ FX_BOOL CFWL_MonthCalendarTP::DrawBackground(CFWL_ThemeBackground* pParams) { DrawWeekNumSep(pParams, &pParams->m_matrix); break; } - default: {} + default: + break; } - return TRUE; } -FX_BOOL CFWL_MonthCalendarTP::DrawText(CFWL_ThemeText* pParams) { + +void CFWL_MonthCalendarTP::DrawText(CFWL_ThemeText* pParams) { if (!m_pTextOut) - return FALSE; + return; + if ((pParams->m_iPart == CFWL_Part::DatesIn) && !(pParams->m_dwStates & FWL_ITEMSTATE_MCD_Flag) && (pParams->m_dwStates & @@ -136,8 +139,9 @@ FX_BOOL CFWL_MonthCalendarTP::DrawText(CFWL_ThemeText* pParams) { } else { m_pTextOut->SetTextColor(0xFF000000); } - return CFWL_WidgetTP::DrawText(pParams); + CFWL_WidgetTP::DrawText(pParams); } + void* CFWL_MonthCalendarTP::GetCapacity(CFWL_ThemePart* pThemePart, CFWL_WidgetCapacity dwCapacity) { FX_BOOL bDefPro = FALSE; @@ -336,26 +340,30 @@ void* CFWL_MonthCalendarTP::GetCapacity(CFWL_ThemePart* pThemePart, wsResource = L"Today"; return &wsResource; } - default: { bDefPro = TRUE; } + default: + bDefPro = TRUE; + break; } if (!bDefPro) { - if (bDwordVal) { + if (bDwordVal) return &m_dwValue; - } return &m_fValue; } return CFWL_WidgetTP::GetCapacity(pThemePart, dwCapacity); } -FWL_Error CFWL_MonthCalendarTP::Initialize() { + +void CFWL_MonthCalendarTP::Initialize() { InitTTO(); - return CFWL_WidgetTP::Initialize(); + CFWL_WidgetTP::Initialize(); } -FWL_Error CFWL_MonthCalendarTP::Finalize() { + +void CFWL_MonthCalendarTP::Finalize() { FinalizeTTO(); - return CFWL_WidgetTP::Finalize(); + CFWL_WidgetTP::Finalize(); } -FX_BOOL CFWL_MonthCalendarTP::DrawTotalBK(CFWL_ThemeBackground* pParams, - CFX_Matrix* pMatrix) { + +void CFWL_MonthCalendarTP::DrawTotalBK(CFWL_ThemeBackground* pParams, + CFX_Matrix* pMatrix) { CFX_Path path; path.Create(); CFX_RectF rtTotal(pParams->m_rtPart); @@ -365,10 +373,10 @@ FX_BOOL CFWL_MonthCalendarTP::DrawTotalBK(CFWL_ThemeBackground* pParams, pParams->m_pGraphics->SetFillColor(&clrBK); pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix); pParams->m_pGraphics->RestoreGraphState(); - return TRUE; } -FX_BOOL CFWL_MonthCalendarTP::DrawHeadBk(CFWL_ThemeBackground* pParams, - CFX_Matrix* pMatrix) { + +void CFWL_MonthCalendarTP::DrawHeadBk(CFWL_ThemeBackground* pParams, + CFX_Matrix* pMatrix) { CFX_Path path; path.Create(); CFX_RectF rtHead = pParams->m_rtPart; @@ -378,10 +386,10 @@ FX_BOOL CFWL_MonthCalendarTP::DrawHeadBk(CFWL_ThemeBackground* pParams, pParams->m_pGraphics->SetFillColor(&clrHeadBK); pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix); pParams->m_pGraphics->RestoreGraphState(); - return TRUE; } -FX_BOOL CFWL_MonthCalendarTP::DrawLButton(CFWL_ThemeBackground* pParams, - CFX_Matrix* pMatrix) { + +void CFWL_MonthCalendarTP::DrawLButton(CFWL_ThemeBackground* pParams, + CFX_Matrix* pMatrix) { CFX_Path path; path.Create(); CFX_RectF rtLBtn; @@ -410,10 +418,10 @@ FX_BOOL CFWL_MonthCalendarTP::DrawLButton(CFWL_ThemeBackground* pParams, pParams->m_pGraphics->SetStrokeColor(&clrFlag); pParams->m_pGraphics->StrokePath(&path, pMatrix); pParams->m_pGraphics->RestoreGraphState(); - return TRUE; } -FX_BOOL CFWL_MonthCalendarTP::DrawRButton(CFWL_ThemeBackground* pParams, - CFX_Matrix* pMatrix) { + +void CFWL_MonthCalendarTP::DrawRButton(CFWL_ThemeBackground* pParams, + CFX_Matrix* pMatrix) { CFX_Path path; path.Create(); CFX_RectF rtRBtn; @@ -442,10 +450,10 @@ FX_BOOL CFWL_MonthCalendarTP::DrawRButton(CFWL_ThemeBackground* pParams, pParams->m_pGraphics->SetStrokeColor(&clrFlag); pParams->m_pGraphics->StrokePath(&path, pMatrix); pParams->m_pGraphics->RestoreGraphState(); - return TRUE; } -FX_BOOL CFWL_MonthCalendarTP::DrawHSeperator(CFWL_ThemeBackground* pParams, - CFX_Matrix* pMatrix) { + +void CFWL_MonthCalendarTP::DrawHSeperator(CFWL_ThemeBackground* pParams, + CFX_Matrix* pMatrix) { CFX_Path path; path.Create(); CFX_RectF rtHSep; @@ -457,11 +465,10 @@ FX_BOOL CFWL_MonthCalendarTP::DrawHSeperator(CFWL_ThemeBackground* pParams, pParams->m_pGraphics->SetStrokeColor(&clrHSep); pParams->m_pGraphics->StrokePath(&path, pMatrix); pParams->m_pGraphics->RestoreGraphState(); - return TRUE; } -FX_BOOL CFWL_MonthCalendarTP::DrawWeekNumSep(CFWL_ThemeBackground* pParams, - CFX_Matrix* pMatrix) { +void CFWL_MonthCalendarTP::DrawWeekNumSep(CFWL_ThemeBackground* pParams, + CFX_Matrix* pMatrix) { CFX_Path path; path.Create(); CFX_RectF rtWeekSep; @@ -473,11 +480,10 @@ FX_BOOL CFWL_MonthCalendarTP::DrawWeekNumSep(CFWL_ThemeBackground* pParams, pParams->m_pGraphics->SetStrokeColor(&clrHSep); pParams->m_pGraphics->StrokePath(&path, pMatrix); pParams->m_pGraphics->RestoreGraphState(); - return TRUE; } -FX_BOOL CFWL_MonthCalendarTP::DrawDatesInBK(CFWL_ThemeBackground* pParams, - CFX_Matrix* pMatrix) { +void CFWL_MonthCalendarTP::DrawDatesInBK(CFWL_ThemeBackground* pParams, + CFX_Matrix* pMatrix) { pParams->m_pGraphics->SaveGraphState(); if (pParams->m_dwStates & CFWL_PartState_Selected) { CFX_Path path; @@ -501,11 +507,10 @@ FX_BOOL CFWL_MonthCalendarTP::DrawDatesInBK(CFWL_ThemeBackground* pParams, pParams->m_pGraphics->FillPath(&path, FXFILL_WINDING, pMatrix); } pParams->m_pGraphics->RestoreGraphState(); - return FALSE; } -FX_BOOL CFWL_MonthCalendarTP::DrawDatesInCircle(CFWL_ThemeBackground* pParams, - CFX_Matrix* pMatrix) { +void CFWL_MonthCalendarTP::DrawDatesInCircle(CFWL_ThemeBackground* pParams, + CFX_Matrix* pMatrix) { CFX_Path path; path.Create(); CFX_RectF rtSelDay; @@ -517,11 +522,10 @@ FX_BOOL CFWL_MonthCalendarTP::DrawDatesInCircle(CFWL_ThemeBackground* pParams, pParams->m_pGraphics->SetStrokeColor(&clrSelDayBK); pParams->m_pGraphics->StrokePath(&path, pMatrix); pParams->m_pGraphics->RestoreGraphState(); - return TRUE; } -FX_BOOL CFWL_MonthCalendarTP::DrawTodayCircle(CFWL_ThemeBackground* pParams, - CFX_Matrix* pMatrix) { +void CFWL_MonthCalendarTP::DrawTodayCircle(CFWL_ThemeBackground* pParams, + CFX_Matrix* pMatrix) { CFX_Path path; path.Create(); CFX_RectF rtTodayCircle; @@ -533,7 +537,6 @@ FX_BOOL CFWL_MonthCalendarTP::DrawTodayCircle(CFWL_ThemeBackground* pParams, pParams->m_pGraphics->SetStrokeColor(&clrTodayCircle); pParams->m_pGraphics->StrokePath(&path, pMatrix); pParams->m_pGraphics->RestoreGraphState(); - return TRUE; } FWLTHEME_STATE CFWL_MonthCalendarTP::GetState(uint32_t dwFWLStates) { |