summaryrefslogtreecommitdiff
path: root/xfa/fwl/basewidget
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/basewidget')
-rw-r--r--xfa/fwl/basewidget/fwl_comboboximp.cpp8
-rw-r--r--xfa/fwl/basewidget/fwl_editimp.cpp2
-rw-r--r--xfa/fwl/basewidget/fwl_listboximp.cpp7
3 files changed, 7 insertions, 10 deletions
diff --git a/xfa/fwl/basewidget/fwl_comboboximp.cpp b/xfa/fwl/basewidget/fwl_comboboximp.cpp
index fd7c6d6266..35ac5fa240 100644
--- a/xfa/fwl/basewidget/fwl_comboboximp.cpp
+++ b/xfa/fwl/basewidget/fwl_comboboximp.cpp
@@ -557,8 +557,8 @@ FWL_ERR CFWL_ComboBoxImp::ModifyStylesEx(uint32_t dwStylesExAdded,
if (m_pWidgetMgr->IsFormDisabled()) {
return DisForm_ModifyStylesEx(dwStylesExAdded, dwStylesExRemoved);
}
- FX_BOOL bAddDropDown = dwStylesExAdded & FWL_STYLEEXT_CMB_DropDown;
- FX_BOOL bRemoveDropDown = dwStylesExRemoved & FWL_STYLEEXT_CMB_DropDown;
+ bool bAddDropDown = !!(dwStylesExAdded & FWL_STYLEEXT_CMB_DropDown);
+ bool bRemoveDropDown = !!(dwStylesExRemoved & FWL_STYLEEXT_CMB_DropDown);
if (bAddDropDown && !m_pEdit) {
CFWL_WidgetImpProperties prop;
m_pEdit.reset(IFWL_Edit::CreateComboEdit(prop, nullptr));
@@ -1232,8 +1232,8 @@ FWL_ERR CFWL_ComboBoxImp::DisForm_ModifyStylesEx(uint32_t dwStylesExAdded,
if (!m_pEdit) {
DisForm_InitComboEdit();
}
- FX_BOOL bAddDropDown = dwStylesExAdded & FWL_STYLEEXT_CMB_DropDown;
- FX_BOOL bDelDropDown = dwStylesExRemoved & FWL_STYLEEXT_CMB_DropDown;
+ bool bAddDropDown = !!(dwStylesExAdded & FWL_STYLEEXT_CMB_DropDown);
+ bool bDelDropDown = !!(dwStylesExRemoved & FWL_STYLEEXT_CMB_DropDown);
dwStylesExRemoved &= ~FWL_STYLEEXT_CMB_DropDown;
m_pProperties->m_dwStyleExes |= FWL_STYLEEXT_CMB_DropDown;
if (bAddDropDown) {
diff --git a/xfa/fwl/basewidget/fwl_editimp.cpp b/xfa/fwl/basewidget/fwl_editimp.cpp
index 8b4dd39321..a80b89f9a7 100644
--- a/xfa/fwl/basewidget/fwl_editimp.cpp
+++ b/xfa/fwl/basewidget/fwl_editimp.cpp
@@ -1831,7 +1831,7 @@ void CFWL_EditImpDelegate::DoButtonDown(CFWL_MsgMouse* pMsg) {
}
void CFWL_EditImpDelegate::OnFocusChanged(CFWL_Message* pMsg, FX_BOOL bSet) {
uint32_t dwStyleEx = m_pOwner->GetStylesEx();
- FX_BOOL bRepaint = dwStyleEx & FWL_STYLEEXT_EDT_InnerCaret;
+ bool bRepaint = !!(dwStyleEx & FWL_STYLEEXT_EDT_InnerCaret);
if (bSet) {
m_pOwner->m_pProperties->m_dwStates |= FWL_WGTSTATE_Focused;
if (!m_pOwner->m_pEdtEngine) {
diff --git a/xfa/fwl/basewidget/fwl_listboximp.cpp b/xfa/fwl/basewidget/fwl_listboximp.cpp
index dd017e215f..d514f7e1e3 100644
--- a/xfa/fwl/basewidget/fwl_listboximp.cpp
+++ b/xfa/fwl/basewidget/fwl_listboximp.cpp
@@ -399,14 +399,11 @@ void CFWL_ListBoxImp::ClearSelection() {
for (int32_t i = 0; i < iCount; i++) {
FWL_HLISTITEM hItem = pData->GetItem(m_pInterface, i);
uint32_t dwState = pData->GetItemStyles(m_pInterface, hItem);
- FX_BOOL bFindSel = dwState & FWL_ITEMSTATE_LTB_Selected;
- if (!bFindSel) {
+ if (!(dwState & FWL_ITEMSTATE_LTB_Selected))
continue;
- }
SetSelectionDirect(hItem, FALSE);
- if (!bMulti) {
+ if (!bMulti)
return;
- }
}
}
void CFWL_ListBoxImp::SelectAll() {