diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-10 09:40:14 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-10 09:40:14 -0800 |
commit | 98329fe75b9c3e5422344a37d787fb22c89c2ca2 (patch) | |
tree | a1e7f3d35bc97695b074756ab7ef531c17c6262d /xfa/fwl/core/ifwl_spinbutton.cpp | |
parent | 50feafc7f367a87b7e4e689421eb7ae1484660d9 (diff) | |
download | pdfium-98329fe75b9c3e5422344a37d787fb22c89c2ca2.tar.xz |
Cleanup IFWL_Widget visibility and virtual parameters
This Cl cleans up the IFWL_Widget class including:
* Making members and methods private where possible
* Removing virtual methods that are never overridden
* Removing methods that do nothing
* Removing unchecked FWL_Error return codes
Review-Url: https://codereview.chromium.org/2488953003
Diffstat (limited to 'xfa/fwl/core/ifwl_spinbutton.cpp')
-rw-r--r-- | xfa/fwl/core/ifwl_spinbutton.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/xfa/fwl/core/ifwl_spinbutton.cpp b/xfa/fwl/core/ifwl_spinbutton.cpp index a669493574..716f56c629 100644 --- a/xfa/fwl/core/ifwl_spinbutton.cpp +++ b/xfa/fwl/core/ifwl_spinbutton.cpp @@ -46,19 +46,18 @@ FWL_Type IFWL_SpinButton::GetClassID() const { return FWL_Type::SpinButton; } -FWL_Error IFWL_SpinButton::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { +void IFWL_SpinButton::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { if (bAutoSize) { rect.Set(0, 0, kMinWidth, kMinHeight); IFWL_Widget::GetWidgetRect(rect, true); } else { rect = m_pProperties->m_rtWidget; } - return FWL_Error::Succeeded; } -FWL_Error IFWL_SpinButton::Update() { +void IFWL_SpinButton::Update() { if (IsLocked()) { - return FWL_Error::Indefinite; + return; } GetClientRect(m_rtClient); if (m_pProperties->m_dwStyleExes & FWL_STYLEEXE_SPB_Vert) { @@ -72,7 +71,6 @@ FWL_Error IFWL_SpinButton::Update() { m_rtDnButton.Set(m_rtClient.left + m_rtClient.width / 2, m_rtClient.top, m_rtClient.width / 2, m_rtClient.height); } - return FWL_Error::Succeeded; } FWL_WidgetHit IFWL_SpinButton::HitTest(FX_FLOAT fx, FX_FLOAT fy) { @@ -93,10 +91,10 @@ FWL_WidgetHit IFWL_SpinButton::HitTest(FX_FLOAT fx, FX_FLOAT fy) { return FWL_WidgetHit::Unknown; } -FWL_Error IFWL_SpinButton::DrawWidget(CFX_Graphics* pGraphics, - const CFX_Matrix* pMatrix) { +void IFWL_SpinButton::DrawWidget(CFX_Graphics* pGraphics, + const CFX_Matrix* pMatrix) { if (!pGraphics) - return FWL_Error::Indefinite; + return; CFX_RectF rtClip(m_rtClient); if (pMatrix) @@ -110,7 +108,6 @@ FWL_Error IFWL_SpinButton::DrawWidget(CFX_Graphics* pGraphics, DrawUpButton(pGraphics, pTheme, pMatrix); DrawDownButton(pGraphics, pTheme, pMatrix); - return FWL_Error::Succeeded; } FWL_Error IFWL_SpinButton::EnableButton(bool bEnable, bool bUp) { |