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/fxfa/app/xfa_fftextedit.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/fxfa/app/xfa_fftextedit.cpp')
-rw-r--r-- | xfa/fxfa/app/xfa_fftextedit.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/xfa/fxfa/app/xfa_fftextedit.cpp b/xfa/fxfa/app/xfa_fftextedit.cpp index 50b087315d..74bd99a55d 100644 --- a/xfa/fxfa/app/xfa_fftextedit.cpp +++ b/xfa/fxfa/app/xfa_fftextedit.cpp @@ -505,16 +505,12 @@ bool CXFA_FFDateTimeEdit::GetBBox(CFX_RectF& rtBox, } bool CXFA_FFDateTimeEdit::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) { - if (!m_pNormalWidget) { - return false; - } - CFX_RectF rtWidget; - ((CFWL_DateTimePicker*)m_pNormalWidget)->GetBBox(rtWidget); - if (rtWidget.Contains(fx, fy)) { - return true; - } - return false; + return m_pNormalWidget && + static_cast<CFWL_DateTimePicker*>(m_pNormalWidget) + ->GetBBox() + .Contains(fx, fy); } + bool CXFA_FFDateTimeEdit::LoadWidget() { CFWL_DateTimePicker* pWidget = new CFWL_DateTimePicker(GetFWLApp()); m_pNormalWidget = pWidget; |