diff options
author | dsinclair <dsinclair@chromium.org> | 2016-12-14 06:25:02 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-14 06:25:02 -0800 |
commit | 603f57b85c0643f0598f03b97c4525501f3e1221 (patch) | |
tree | 85c9521a8f0fec47ba84041d64cb84e6bc019638 /xfa/fwl/cfwl_form.cpp | |
parent | a9caab94c1f16929e5acf2676117224617d80f53 (diff) | |
download | pdfium-603f57b85c0643f0598f03b97c4525501f3e1221.tar.xz |
Update CFWL_ListBox to return instead of using out params.
This CL updates the CFWL_ListBox code to work with return values instead
of out params. This also extracts the CFWL_ListItem code out of CFWL_ListBox
and puts into the correct class.
Review-Url: https://codereview.chromium.org/2572783002
Diffstat (limited to 'xfa/fwl/cfwl_form.cpp')
-rw-r--r-- | xfa/fwl/cfwl_form.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fwl/cfwl_form.cpp b/xfa/fwl/cfwl_form.cpp index 4d978a503a..58d9e18989 100644 --- a/xfa/fwl/cfwl_form.cpp +++ b/xfa/fwl/cfwl_form.cpp @@ -186,10 +186,8 @@ void CFWL_Form::DrawWidget(CFX_Graphics* pGraphics, const CFX_Matrix* pMatrix) { } if ((m_pProperties->m_dwStyleExes & FWL_WGTSTYLE_EdgeMask) != FWL_WGTSTYLE_EdgeNone) { - CFX_RectF rtEdge; - GetEdgeRect(rtEdge); param.m_iPart = CFWL_Part::Edge; - param.m_rtPart = rtEdge; + param.m_rtPart = GetEdgeRect(); param.m_dwStates = iState; pTheme->DrawBackground(¶m); } @@ -369,13 +367,14 @@ int32_t CFWL_Form::GetSysBtnIndex(CFWL_SysBtn* pBtn) { return arrBtn.Find(pBtn); } -void CFWL_Form::GetEdgeRect(CFX_RectF& rtEdge) { - rtEdge = m_rtRelative; +CFX_RectF CFWL_Form::GetEdgeRect() { + CFX_RectF rtEdge = m_rtRelative; if (m_pProperties->m_dwStyles & FWL_WGTSTYLE_Border) { FX_FLOAT fCX = GetBorderSize(true); FX_FLOAT fCY = GetBorderSize(false); rtEdge.Deflate(fCX, fCY, fCX, fCY); } + return rtEdge; } void CFWL_Form::SetWorkAreaRect() { |