From b7675f63684ebff68c688a1c7b160596b6747c3e Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 4 May 2016 14:11:13 -0700 Subject: Cleanup CFWL_ThemePart data. The m_dwData pointer was being used as a generic way to pass around data. There were only two places we were reading that data. This Cl changes to have two specific flags and removes the generic pointer. Review-Url: https://codereview.chromium.org/1950973003 --- xfa/fwl/core/cfwl_themepart.h | 6 ++++-- xfa/fwl/core/fwl_formimp.cpp | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'xfa/fwl/core') diff --git a/xfa/fwl/core/cfwl_themepart.h b/xfa/fwl/core/cfwl_themepart.h index df75a94f85..5bdf1530a5 100644 --- a/xfa/fwl/core/cfwl_themepart.h +++ b/xfa/fwl/core/cfwl_themepart.h @@ -85,7 +85,8 @@ class CFWL_ThemePart { : m_pWidget(nullptr), m_iPart(CFWL_Part::None), m_dwStates(CFWL_PartState_Normal), - m_dwData(0), + m_bMaximize(false), + m_bStaticBackground(false), m_pData(nullptr) { m_rtPart.Reset(); m_matrix.SetIdentity(); @@ -96,7 +97,8 @@ class CFWL_ThemePart { IFWL_Widget* m_pWidget; CFWL_Part m_iPart; uint32_t m_dwStates; - uint32_t m_dwData; + bool m_bMaximize; + bool m_bStaticBackground; void* m_pData; }; diff --git a/xfa/fwl/core/fwl_formimp.cpp b/xfa/fwl/core/fwl_formimp.cpp index 34663d7e0d..539a48dde0 100644 --- a/xfa/fwl/core/fwl_formimp.cpp +++ b/xfa/fwl/core/fwl_formimp.cpp @@ -330,7 +330,7 @@ FWL_ERR CFWL_FormImp::DrawWidget(CFX_Graphics* pGraphics, param.m_dwStates = CFWL_PartState_Hovered; } param.m_rtPart = m_pMaxBox->m_rtBtn; - param.m_dwData = m_bMaximized; + param.m_bMaximize = m_bMaximized; pTheme->DrawBackground(¶m); } if (m_pMinBox) { @@ -358,7 +358,7 @@ FWL_ERR CFWL_FormImp::DrawWidget(CFX_Graphics* pGraphics, param.m_iPart = CFWL_Part::MaximizeBox; param.m_dwStates = m_pMaxBox->GetPartState(); param.m_rtPart = m_pMaxBox->m_rtBtn; - param.m_dwData = m_bMaximized; + param.m_bMaximize = m_bMaximized; pTheme->DrawBackground(¶m); } if (m_pMinBox) { -- cgit v1.2.3