Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Unified Diff: xfa/fwl/core/ifwl_pushbutton.cpp

Issue 2506253004: Split fwl/core class pt I. (Closed)
Patch Set: Rebase to master Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/ifwl_pushbutton.h ('k') | xfa/fwl/core/ifwl_scrollbar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fwl/core/ifwl_pushbutton.cpp
diff --git a/xfa/fwl/core/ifwl_pushbutton.cpp b/xfa/fwl/core/ifwl_pushbutton.cpp
index 63169fe97e19833daccb06a7ae919899b8f87278..23f141b1dcd2f9136751180c46d0d334edb5a6e3 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);
« no previous file with comments | « xfa/fwl/core/ifwl_pushbutton.h ('k') | xfa/fwl/core/ifwl_scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698