From dd17234c42e4572b85b6d74a07bc901974d061be Mon Sep 17 00:00:00 2001 From: dsinclair Date: Mon, 21 Nov 2016 09:04:05 -0800 Subject: Split fwl/core class pt I. Split classes in FWL to be single class per file. In the case of data providers which added no new methods, removed and used the IFWL_DataProvider directly. Review-Url: https://codereview.chromium.org/2506253004 --- xfa/fwl/core/ifwl_pushbutton.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'xfa/fwl/core/ifwl_pushbutton.cpp') diff --git a/xfa/fwl/core/ifwl_pushbutton.cpp b/xfa/fwl/core/ifwl_pushbutton.cpp index 63169fe97e..23f141b1dc 100644 --- a/xfa/fwl/core/ifwl_pushbutton.cpp +++ b/xfa/fwl/core/ifwl_pushbutton.cpp @@ -46,10 +46,8 @@ void IFWL_PushButton::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { m_pProperties->m_pThemeProvider = GetAvailableTheme(); CFX_WideString wsCaption; - IFWL_PushButtonDP* pData = - static_cast(m_pProperties->m_pDataProvider); - if (pData) - pData->GetCaption(this, wsCaption); + if (m_pProperties->m_pDataProvider) + m_pProperties->m_pDataProvider->GetCaption(this, wsCaption); int32_t iLen = wsCaption.GetLength(); if (iLen > 0) { @@ -92,8 +90,6 @@ void IFWL_PushButton::DrawWidget(CFX_Graphics* pGraphics, if (!m_pProperties->m_pThemeProvider) return; - IFWL_PushButtonDP* pData = - static_cast(m_pProperties->m_pDataProvider); IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; if (HasBorder()) { DrawBorder(pGraphics, CFWL_Part::Border, m_pProperties->m_pThemeProvider, @@ -108,8 +104,8 @@ void IFWL_PushButton::DrawWidget(CFX_Graphics* pGraphics, matrix.Concat(*pMatrix); CFX_WideString wsCaption; - if (pData) - pData->GetCaption(this, wsCaption); + if (m_pProperties->m_pDataProvider) + m_pProperties->m_pDataProvider->GetCaption(this, wsCaption); CFX_RectF rtText; rtText.Set(0, 0, 0, 0); -- cgit v1.2.3