summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/ifwl_pushbutton.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_pushbutton.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_pushbutton.cpp')
-rw-r--r--xfa/fwl/core/ifwl_pushbutton.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/xfa/fwl/core/ifwl_pushbutton.cpp b/xfa/fwl/core/ifwl_pushbutton.cpp
index c03b26a9b6..da36e71b01 100644
--- a/xfa/fwl/core/ifwl_pushbutton.cpp
+++ b/xfa/fwl/core/ifwl_pushbutton.cpp
@@ -32,7 +32,7 @@ FWL_Type IFWL_PushButton::GetClassID() const {
return FWL_Type::PushButton;
}
-FWL_Error IFWL_PushButton::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
+void IFWL_PushButton::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
if (bAutoSize) {
rect.Set(0, 0, 0, 0);
if (!m_pProperties->m_pThemeProvider) {
@@ -56,7 +56,6 @@ FWL_Error IFWL_PushButton::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) {
} else {
rect = m_pProperties->m_rtWidget;
}
- return FWL_Error::Succeeded;
}
void IFWL_PushButton::SetStates(uint32_t dwStates, bool bSet) {
@@ -67,9 +66,9 @@ void IFWL_PushButton::SetStates(uint32_t dwStates, bool bSet) {
IFWL_Widget::SetStates(dwStates, bSet);
}
-FWL_Error IFWL_PushButton::Update() {
+void IFWL_PushButton::Update() {
if (IsLocked()) {
- return FWL_Error::Indefinite;
+ return;
}
if (!m_pProperties->m_pThemeProvider) {
m_pProperties->m_pThemeProvider = GetAvailableTheme();
@@ -80,15 +79,14 @@ FWL_Error IFWL_PushButton::Update() {
FX_FLOAT* fcaption =
static_cast<FX_FLOAT*>(GetThemeCapacity(CFWL_WidgetCapacity::Margin));
m_rtCaption.Inflate(-*fcaption, -*fcaption);
- return FWL_Error::Succeeded;
}
-FWL_Error IFWL_PushButton::DrawWidget(CFX_Graphics* pGraphics,
- const CFX_Matrix* pMatrix) {
+void IFWL_PushButton::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_PushButtonDP* pData =
static_cast<IFWL_PushButtonDP*>(m_pProperties->m_pDataProvider);
CFX_DIBitmap* pPicture = nullptr;
@@ -269,7 +267,6 @@ FWL_Error IFWL_PushButton::DrawWidget(CFX_Graphics* pGraphics,
DrawText(pGraphics, m_pProperties->m_pThemeProvider, &matrix);
break;
}
- return FWL_Error::Succeeded;
}
void IFWL_PushButton::DrawBkground(CFX_Graphics* pGraphics,