diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-21 09:04:05 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-21 09:04:05 -0800 |
commit | dd17234c42e4572b85b6d74a07bc901974d061be (patch) | |
tree | 31a9c3dc96bc3a637f204949f1689a501ada6906 /xfa/fwl/core/ifwl_pushbutton.cpp | |
parent | b4455b90b1c86ab94986e4f470c963f1e91b27ba (diff) | |
download | pdfium-dd17234c42e4572b85b6d74a07bc901974d061be.tar.xz |
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
Diffstat (limited to 'xfa/fwl/core/ifwl_pushbutton.cpp')
-rw-r--r-- | xfa/fwl/core/ifwl_pushbutton.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
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<IFWL_PushButtonDP*>(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<IFWL_PushButtonDP*>(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); |