summaryrefslogtreecommitdiff
path: root/fpdfsdk/pdfwindow/cpwl_combo_box.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/pdfwindow/cpwl_combo_box.cpp')
-rw-r--r--fpdfsdk/pdfwindow/cpwl_combo_box.cpp34
1 files changed, 11 insertions, 23 deletions
diff --git a/fpdfsdk/pdfwindow/cpwl_combo_box.cpp b/fpdfsdk/pdfwindow/cpwl_combo_box.cpp
index 660f8cd9d3..4427440bb8 100644
--- a/fpdfsdk/pdfwindow/cpwl_combo_box.cpp
+++ b/fpdfsdk/pdfwindow/cpwl_combo_box.cpp
@@ -427,9 +427,7 @@ void CPWL_ComboBox::SetPopup(bool bPopup) {
return;
#ifdef PDF_ENABLE_XFA
- bool bExit = false;
- m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), bExit, 0);
- if (bExit)
+ if (m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), 0))
return;
#endif // PDF_ENABLE_XFA
@@ -458,8 +456,7 @@ void CPWL_ComboBox::SetPopup(bool bPopup) {
Move(rcWindow, true, true);
#ifdef PDF_ENABLE_XFA
- bExit = false;
- m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), bExit, 0);
+ m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), 0);
#endif // PDF_ENABLE_XFA
}
@@ -474,18 +471,15 @@ bool CPWL_ComboBox::OnKeyDown(uint16_t nChar, uint32_t nFlag) {
switch (nChar) {
case FWL_VKEY_Up:
if (m_pList->GetCurSel() > 0) {
- bool bExit = false;
#ifdef PDF_ENABLE_XFA
if (m_pFillerNotify) {
- m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), bExit, nFlag);
- if (bExit)
+ if (m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), nFlag))
return false;
- bExit = false;
- m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), bExit, nFlag);
- if (bExit)
+ if (m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), nFlag))
return false;
}
#endif // PDF_ENABLE_XFA
+ bool bExit = false;
if (m_pList->OnKeyDownWithExit(nChar, bExit, nFlag)) {
if (bExit)
return false;
@@ -495,18 +489,15 @@ bool CPWL_ComboBox::OnKeyDown(uint16_t nChar, uint32_t nFlag) {
return true;
case FWL_VKEY_Down:
if (m_pList->GetCurSel() < m_pList->GetCount() - 1) {
- bool bExit = false;
#ifdef PDF_ENABLE_XFA
if (m_pFillerNotify) {
- m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), bExit, nFlag);
- if (bExit)
+ if (m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), nFlag))
return false;
- bExit = false;
- m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), bExit, nFlag);
- if (bExit)
+ if (m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), nFlag))
return false;
}
#endif // PDF_ENABLE_XFA
+ bool bExit = false;
if (m_pList->OnKeyDownWithExit(nChar, bExit, nFlag)) {
if (bExit)
return false;
@@ -533,18 +524,15 @@ bool CPWL_ComboBox::OnChar(uint16_t nChar, uint32_t nFlag) {
if (HasFlag(PCBS_ALLOWCUSTOMTEXT))
return m_pEdit->OnChar(nChar, nFlag);
- bool bExit = false;
#ifdef PDF_ENABLE_XFA
if (m_pFillerNotify) {
- m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), bExit, nFlag);
- if (bExit)
+ if (m_pFillerNotify->OnPopupPreOpen(GetAttachedData(), nFlag))
return false;
-
- m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), bExit, nFlag);
- if (bExit)
+ if (m_pFillerNotify->OnPopupPostOpen(GetAttachedData(), nFlag))
return false;
}
#endif // PDF_ENABLE_XFA
+ bool bExit = false;
return m_pList->OnCharWithExit(nChar, bExit, nFlag) ? bExit : false;
}