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_picturebox.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_picturebox.cpp')
-rw-r--r-- | xfa/fwl/core/ifwl_picturebox.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/xfa/fwl/core/ifwl_picturebox.cpp b/xfa/fwl/core/ifwl_picturebox.cpp index f97ee709c3..17a87ed835 100644 --- a/xfa/fwl/core/ifwl_picturebox.cpp +++ b/xfa/fwl/core/ifwl_picturebox.cpp @@ -28,11 +28,11 @@ FWL_Type IFWL_PictureBox::GetClassID() const { return FWL_Type::PictureBox; } -FWL_Error IFWL_PictureBox::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { +void IFWL_PictureBox::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { if (bAutoSize) { rect.Set(0, 0, 0, 0); if (!m_pProperties->m_pDataProvider) - return FWL_Error::Indefinite; + return; CFX_DIBitmap* pBitmap = static_cast<IFWL_PictureBoxDP*>(m_pProperties->m_pDataProvider) ->GetPicture(this); @@ -44,26 +44,24 @@ FWL_Error IFWL_PictureBox::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { } else { rect = m_pProperties->m_rtWidget; } - return FWL_Error::Succeeded; } -FWL_Error IFWL_PictureBox::Update() { +void IFWL_PictureBox::Update() { if (IsLocked()) { - return FWL_Error::Succeeded; + return; } if (!m_pProperties->m_pThemeProvider) { m_pProperties->m_pThemeProvider = GetAvailableTheme(); } GetClientRect(m_rtClient); - return FWL_Error::Succeeded; } -FWL_Error IFWL_PictureBox::DrawWidget(CFX_Graphics* pGraphics, - const CFX_Matrix* pMatrix) { +void IFWL_PictureBox::DrawWidget(CFX_Graphics* pGraphics, + const CFX_Matrix* pMatrix) { if (!pGraphics) - return FWL_Error::Indefinite; + return; if (!m_pProperties->m_pThemeProvider) - return FWL_Error::Indefinite; + return; IFWL_ThemeProvider* pTheme = GetAvailableTheme(); if (HasBorder()) { DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix); @@ -72,7 +70,6 @@ FWL_Error IFWL_PictureBox::DrawWidget(CFX_Graphics* pGraphics, DrawEdge(pGraphics, CFWL_Part::Edge, pTheme, pMatrix); } DrawBkground(pGraphics, pTheme, pMatrix); - return FWL_Error::Succeeded; } void IFWL_PictureBox::DrawBkground(CFX_Graphics* pGraphics, |