Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(510)

Unified Diff: xfa/fxfa/app/xfa_ffchoicelist.cpp

Issue 2555103005: Cleanup return values in CFWL_ComboBox (Closed)
Patch Set: Rebase to master Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fwl/core/cfwl_combobox.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffchoicelist.cpp
diff --git a/xfa/fxfa/app/xfa_ffchoicelist.cpp b/xfa/fxfa/app/xfa_ffchoicelist.cpp
index d4cfe07202215975447904f046d10bf834c14527..e8c364a6130be03453314e8f2b5ba3c6b65e407d 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) {
« no previous file with comments | « xfa/fwl/core/cfwl_combobox.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698