From b4d40ffae3f955fab2fac838430c89aca452c45f Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 5 May 2016 10:28:02 -0700 Subject: Remove CLASSHASH defines in favour of an enum class. This Cl updates all the CLASSHASH defines to use an enum class. A few defines where unabled and were either updated or removed if the number no longer exists in the code base. Review-Url: https://codereview.chromium.org/1946213003 --- xfa/fwl/lightwidget/cfwl_theme.cpp | 2 +- xfa/fwl/lightwidget/cfwl_theme.h | 2 +- xfa/fwl/lightwidget/cfwl_widget.cpp | 4 ++-- xfa/fwl/lightwidget/cfwl_widget.h | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) (limited to 'xfa/fwl/lightwidget') diff --git a/xfa/fwl/lightwidget/cfwl_theme.cpp b/xfa/fwl/lightwidget/cfwl_theme.cpp index 594dbd84a4..a070e046c1 100644 --- a/xfa/fwl/lightwidget/cfwl_theme.cpp +++ b/xfa/fwl/lightwidget/cfwl_theme.cpp @@ -45,7 +45,7 @@ CFWL_Theme::CFWL_Theme() { CFWL_Theme::~CFWL_Theme() {} -FX_BOOL CFWL_Theme::IsValidWidget(IFWL_Widget* pWidget) { +bool CFWL_Theme::IsValidWidget(IFWL_Widget* pWidget) { return !!GetTheme(pWidget); } diff --git a/xfa/fwl/lightwidget/cfwl_theme.h b/xfa/fwl/lightwidget/cfwl_theme.h index ba20013c10..1de1fb607c 100644 --- a/xfa/fwl/lightwidget/cfwl_theme.h +++ b/xfa/fwl/lightwidget/cfwl_theme.h @@ -26,7 +26,7 @@ class CFWL_Theme : public IFWL_ThemeProvider { ~CFWL_Theme() override; // IFWL_ThemeProvider: - FX_BOOL IsValidWidget(IFWL_Widget* pWidget) override; + bool IsValidWidget(IFWL_Widget* pWidget) override; uint32_t GetThemeID(IFWL_Widget* pWidget) override; uint32_t SetThemeID(IFWL_Widget* pWidget, uint32_t dwThemeID, diff --git a/xfa/fwl/lightwidget/cfwl_widget.cpp b/xfa/fwl/lightwidget/cfwl_widget.cpp index e1959797b3..8d3237605f 100644 --- a/xfa/fwl/lightwidget/cfwl_widget.cpp +++ b/xfa/fwl/lightwidget/cfwl_widget.cpp @@ -29,9 +29,9 @@ FWL_Error CFWL_Widget::GetClassName(CFX_WideString& wsClass) const { return m_pIface->GetClassName(wsClass); } -uint32_t CFWL_Widget::GetClassID() const { +FWL_Type CFWL_Widget::GetClassID() const { if (!m_pIface) - return 0; + return FWL_Type::Unknown; return m_pIface->GetClassID(); } diff --git a/xfa/fwl/lightwidget/cfwl_widget.h b/xfa/fwl/lightwidget/cfwl_widget.h index fd30b71b4c..1c29b1f58e 100644 --- a/xfa/fwl/lightwidget/cfwl_widget.h +++ b/xfa/fwl/lightwidget/cfwl_widget.h @@ -20,9 +20,10 @@ class CFWL_WidgetMgr; class CFWL_Widget { public: virtual ~CFWL_Widget(); + IFWL_Widget* GetWidget(); FWL_Error GetClassName(CFX_WideString& wsClass) const; - uint32_t GetClassID() const; + FWL_Type GetClassID() const; virtual FX_BOOL IsInstance(const CFX_WideStringC& wsClass) const; FWL_Error GetWidgetRect(CFX_RectF& rect, FX_BOOL bAutoSize = FALSE); -- cgit v1.2.3