summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/cfwl_checkbox.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-10-31 12:50:04 -0700
committerCommit bot <commit-bot@chromium.org>2016-10-31 12:50:04 -0700
commit42cb64572198bf8a72de9b18eae9f9dd9a07beb7 (patch)
treec27bd79fe9e1f6c79842c48ea07c9feb1faceb58 /xfa/fwl/core/cfwl_checkbox.cpp
parent461b1d93f717e248ceb3c1e1bbb8285ba3258f8c (diff)
downloadpdfium-42cb64572198bf8a72de9b18eae9f9dd9a07beb7.tar.xz
Remove GetWidget() overrides
This Cl removes the various CFWL_*::GetWidget overrides and adds anonymous To* methods as needed. Review-Url: https://codereview.chromium.org/2467503003
Diffstat (limited to 'xfa/fwl/core/cfwl_checkbox.cpp')
-rw-r--r--xfa/fwl/core/cfwl_checkbox.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/xfa/fwl/core/cfwl_checkbox.cpp b/xfa/fwl/core/cfwl_checkbox.cpp
index e1ff84f2d6..3a26c8ed87 100644
--- a/xfa/fwl/core/cfwl_checkbox.cpp
+++ b/xfa/fwl/core/cfwl_checkbox.cpp
@@ -10,6 +10,14 @@
#include "xfa/fwl/core/fwl_error.h"
+namespace {
+
+IFWL_CheckBox* ToCheckBox(IFWL_Widget* widget) {
+ return static_cast<IFWL_CheckBox*>(widget);
+}
+
+} // namespace
+
CFWL_CheckBox::CFWL_CheckBox(const IFWL_App* app) : CFWL_Widget(app) {}
CFWL_CheckBox::~CFWL_CheckBox() {}
@@ -25,14 +33,6 @@ void CFWL_CheckBox::Initialize() {
CFWL_Widget::Initialize();
}
-IFWL_CheckBox* CFWL_CheckBox::GetWidget() {
- return static_cast<IFWL_CheckBox*>(m_pIface.get());
-}
-
-const IFWL_CheckBox* CFWL_CheckBox::GetWidget() const {
- return static_cast<IFWL_CheckBox*>(m_pIface.get());
-}
-
FWL_Error CFWL_CheckBox::SetCaption(const CFX_WideStringC& wsCaption) {
m_checkboxData.m_wsCaption = wsCaption;
return FWL_Error::Succeeded;
@@ -44,11 +44,11 @@ FWL_Error CFWL_CheckBox::SetBoxSize(FX_FLOAT fHeight) {
}
int32_t CFWL_CheckBox::GetCheckState() {
- return GetWidget()->GetCheckState();
+ return ToCheckBox(GetWidget())->GetCheckState();
}
FWL_Error CFWL_CheckBox::SetCheckState(int32_t iCheck) {
- return GetWidget()->SetCheckState(iCheck);
+ return ToCheckBox(GetWidget())->SetCheckState(iCheck);
}
CFWL_CheckBox::CFWL_CheckBoxDP::CFWL_CheckBoxDP()