summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_scrollbar.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-11-10 09:40:14 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-10 09:40:14 -0800
commit98329fe75b9c3e5422344a37d787fb22c89c2ca2 (patch)
treea1e7f3d35bc97695b074756ab7ef531c17c6262d /xfa/fwl/core/ifwl_scrollbar.cpp
parent50feafc7f367a87b7e4e689421eb7ae1484660d9 (diff)
downloadpdfium-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_scrollbar.cpp')
-rw-r--r--xfa/fwl/core/ifwl_scrollbar.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/xfa/fwl/core/ifwl_scrollbar.cpp b/xfa/fwl/core/ifwl_scrollbar.cpp
index 777ca593e9..949458a7c8 100644
--- a/xfa/fwl/core/ifwl_scrollbar.cpp
+++ b/xfa/fwl/core/ifwl_scrollbar.cpp
@@ -61,13 +61,13 @@ FWL_Type IFWL_ScrollBar::GetClassID() const {
return FWL_Type::ScrollBar;
}
-FWL_Error IFWL_ScrollBar::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
+void IFWL_ScrollBar::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
if (bAutoSize) {
rect.Set(0, 0, 0, 0);
FX_FLOAT* pfMinWidth = static_cast<FX_FLOAT*>(
GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth));
if (!pfMinWidth)
- return FWL_Error::Indefinite;
+ return;
if (IsVertical()) {
rect.Set(0, 0, (*pfMinWidth), (*pfMinWidth) * 3);
} else {
@@ -77,26 +77,24 @@ FWL_Error IFWL_ScrollBar::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
} else {
rect = m_pProperties->m_rtWidget;
}
- return FWL_Error::Succeeded;
}
-FWL_Error IFWL_ScrollBar::Update() {
+void IFWL_ScrollBar::Update() {
if (IsLocked()) {
- return FWL_Error::Indefinite;
+ return;
}
if (!m_pProperties->m_pThemeProvider) {
m_pProperties->m_pThemeProvider = GetAvailableTheme();
}
Layout();
- return FWL_Error::Succeeded;
}
-FWL_Error IFWL_ScrollBar::DrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+void IFWL_ScrollBar::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 = m_pProperties->m_pThemeProvider;
if (HasBorder()) {
DrawBorder(pGraphics, CFWL_Part::Border, pTheme, pMatrix);
@@ -109,7 +107,6 @@ FWL_Error IFWL_ScrollBar::DrawWidget(CFX_Graphics* pGraphics,
DrawArrowBtn(pGraphics, pTheme, true, pMatrix);
DrawArrowBtn(pGraphics, pTheme, false, pMatrix);
DrawThumb(pGraphics, pTheme, pMatrix);
- return FWL_Error::Succeeded;
}
inline bool IFWL_ScrollBar::IsVertical() {