summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget/fwl_listboximp.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-04 14:11:13 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-04 14:11:13 -0700
commitb7675f63684ebff68c688a1c7b160596b6747c3e (patch)
treeb677ff8fd5eb74ad27ffefb97681ffe92e1bb89b /xfa/fwl/basewidget/fwl_listboximp.cpp
parentef43608928148bac9b73f6919188efd87feccf95 (diff)
downloadpdfium-b7675f63684ebff68c688a1c7b160596b6747c3e.tar.xz
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
Diffstat (limited to 'xfa/fwl/basewidget/fwl_listboximp.cpp')
-rw-r--r--xfa/fwl/basewidget/fwl_listboximp.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/xfa/fwl/basewidget/fwl_listboximp.cpp b/xfa/fwl/basewidget/fwl_listboximp.cpp
index b2a4e2c20c..3a0df152c2 100644
--- a/xfa/fwl/basewidget/fwl_listboximp.cpp
+++ b/xfa/fwl/basewidget/fwl_listboximp.cpp
@@ -637,9 +637,6 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics,
dwItemStyles & FWL_ITEMSTATE_LTB_Focused) {
dwPartStates |= CFWL_PartState_Focused;
}
- FWL_ListBoxItemData itemData;
- itemData.pDataProvider = pData;
- itemData.iIndex = Index;
{
CFWL_ThemeBackground param;
param.m_pWidget = m_pInterface;
@@ -648,7 +645,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics,
param.m_pGraphics = pGraphics;
param.m_matrix.Concat(*pMatrix);
param.m_rtPart = rtItem;
- param.m_dwData = (uint32_t)(uintptr_t)(&itemData);
+ param.m_bMaximize = true;
CFX_RectF rtFocus(rtItem);
param.m_pData = &rtFocus;
if (m_pVertScrollBar && !m_pHorzScrollBar &&
@@ -672,7 +669,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics,
param.m_pGraphics = pGraphics;
param.m_matrix.Concat(*pMatrix);
param.m_rtPart = rtDIB;
- param.m_dwData = (uint32_t)(uintptr_t)(&itemData);
+ param.m_bMaximize = true;
param.m_pImage = pDib;
pTheme->DrawBackground(&param);
}
@@ -694,7 +691,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics,
}
param.m_matrix.Concat(*pMatrix);
param.m_rtPart = rtCheck;
- param.m_dwData = (uint32_t)(uintptr_t)(&itemData);
+ param.m_bMaximize = true;
pTheme->DrawBackground(&param);
}
CFX_WideString wsText;
@@ -717,7 +714,7 @@ void CFWL_ListBoxImp::DrawItem(CFX_Graphics* pGraphics,
textParam.m_wsText = wsText;
textParam.m_dwTTOStyles = m_dwTTOStyles;
textParam.m_iTTOAlign = m_iTTOAligns;
- textParam.m_dwData = (uint32_t)(uintptr_t)(&itemData);
+ textParam.m_bMaximize = true;
pTheme->DrawText(&textParam);
}
}
@@ -751,7 +748,7 @@ CFX_SizeF CFWL_ListBoxImp::CalcSize(FX_BOOL bAutoSize) {
itemPart.m_pWidget = m_pInterface;
itemPart.m_iPart = CFWL_Part::ListItem;
itemPart.m_pData = m_pProperties->m_pDataProvider;
- itemPart.m_dwData = i;
+ itemPart.m_bMaximize = i > 0;
CFX_RectF r;
m_pProperties->m_pThemeProvider->GetPartRect(&itemPart, r);
if (!bAutoSize) {