diff options
author | dsinclair <dsinclair@chromium.org> | 2016-12-07 18:10:16 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-07 18:10:16 -0800 |
commit | a2cbc570a035186529be151af0b3d44cf4106eee (patch) | |
tree | 1fbe99b81299839ff9c304739a85151d20c626b3 /xfa/fxfa | |
parent | 442997cbb3a9e970946dd294acd1498e9fa9bfc7 (diff) | |
download | pdfium-a2cbc570a035186529be151af0b3d44cf4106eee.tar.xz |
Cleanup return values in CFWL_ComboBox
This CL changes methods in CFWL_ComboBox to return values instead of taking
out params.
Review-Url: https://codereview.chromium.org/2555103005
Diffstat (limited to 'xfa/fxfa')
-rw-r--r-- | xfa/fxfa/app/xfa_ffchoicelist.cpp | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp index d4cfe07202..e8c364a613 100644 --- a/xfa/fxfa/app/xfa_ffchoicelist.cpp +++ b/xfa/fxfa/app/xfa_ffchoicelist.cpp @@ -227,16 +227,13 @@ bool CXFA_FFComboBox::GetBBox(CFX_RectF& rtBox, } bool CXFA_FFComboBox::PtInActiveRect(FX_FLOAT fx, FX_FLOAT fy) { - if (!m_pNormalWidget) { + if (!m_pNormalWidget) return false; - } - CFX_RectF rtWidget; - ((CFWL_ComboBox*)m_pNormalWidget)->GetBBox(rtWidget); - if (rtWidget.Contains(fx, fy)) { - return true; - } - return false; + return static_cast<CFWL_ComboBox*>(m_pNormalWidget) + ->GetBBox() + .Contains(fx, fy); } + bool CXFA_FFComboBox::LoadWidget() { CFWL_ComboBox* pComboBox = new CFWL_ComboBox(GetFWLApp()); m_pNormalWidget = (CFWL_Widget*)pComboBox; @@ -321,12 +318,11 @@ bool CXFA_FFComboBox::IsDataChanged() { CFX_WideString wsText = pFWLcombobox->GetEditText(); int32_t iCursel = pFWLcombobox->GetCurSel(); if (iCursel >= 0) { - CFX_WideString wsSel; - pFWLcombobox->GetTextByIndex(iCursel, wsSel); - if (wsSel == wsText) { + CFX_WideString wsSel = pFWLcombobox->GetTextByIndex(iCursel); + if (wsSel == wsText) m_pDataAcc->GetChoiceListItem(wsText, iCursel, true); - } } + CFX_WideString wsOldValue; m_pDataAcc->GetValue(wsOldValue, XFA_VALUEPICTURE_Raw); if (wsOldValue != wsText) { |