From 603f57b85c0643f0598f03b97c4525501f3e1221 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Wed, 14 Dec 2016 06:25:02 -0800 Subject: 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 --- xfa/fxfa/app/xfa_fftextedit.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'xfa/fxfa/app/xfa_fftextedit.cpp') 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(m_pNormalWidget) + ->GetBBox() + .Contains(fx, fy); } + bool CXFA_FFDateTimeEdit::LoadWidget() { CFWL_DateTimePicker* pWidget = new CFWL_DateTimePicker(GetFWLApp()); m_pNormalWidget = pWidget; -- cgit v1.2.3