diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-23 13:36:00 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-23 13:36:00 -0700 |
commit | f1e7c461dfabbff6b65a072f24f6711b34159361 (patch) | |
tree | 3b0bb772a59669f06b86824a444fd06642592d4b /fpdfsdk/src/formfiller/FFL_ListBox.cpp | |
parent | 320b2313d19869333ed453af546e61a9fc2b81c9 (diff) | |
download | pdfium-f1e7c461dfabbff6b65a072f24f6711b34159361.tar.xz |
Revert "FX_BOOL considered harmful, part 2."
This reverts commit 320b2313d19869333ed453af546e61a9fc2b81c9.
Reason for revert: build failure.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255693002 .
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_ListBox.cpp')
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_ListBox.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_ListBox.cpp b/fpdfsdk/src/formfiller/FFL_ListBox.cpp index ef113dad96..c105cfcbdd 100644 --- a/fpdfsdk/src/formfiller/FFL_ListBox.cpp +++ b/fpdfsdk/src/formfiller/FFL_ListBox.cpp @@ -73,7 +73,7 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView { m_OriginSelections.clear(); - bool bSetCaret = false; + FX_BOOL bSetCaret = FALSE; for (int32_t i=0,sz=m_pWidget->CountOptions(); i<sz; i++) { if (m_pWidget->IsOptionSelected(i)) @@ -81,7 +81,7 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView if (!bSetCaret) { pWnd->SetCaret(i); - bSetCaret = true; + bSetCaret = TRUE; } pWnd->Select(i); m_OriginSelections.insert(i); @@ -106,23 +106,23 @@ CPWL_Wnd* CFFL_ListBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageView } -bool CFFL_ListBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags) +FX_BOOL CFFL_ListBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags) { return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags); } -bool CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView) +FX_BOOL CFFL_ListBox::IsDataChanged(CPDFSDK_PageView* pPageView) { - CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false); + CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE); if (!pListBox) - return false; + return FALSE; if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT) { int nSelCount = 0; for (int32_t i = 0, sz = pListBox->GetCount(); i < sz; ++i) { if (pListBox->IsItemSelected(i)) { if (m_OriginSelections.count(i) == 0) - return true; + return TRUE; nSelCount++; } @@ -137,7 +137,7 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView) { ASSERT(m_pWidget != NULL); - if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false)) + if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) { CFX_IntArray aOldSelect, aNewSelect; @@ -154,7 +154,7 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView) int32_t nNewTopIndex = pListBox->GetTopVisibleIndex(); - m_pWidget->ClearSelection(false); + m_pWidget->ClearSelection(FALSE); if (m_pWidget->GetFieldFlags() & FIELDFLAG_MULTISELECT) { @@ -162,19 +162,19 @@ void CFFL_ListBox::SaveData(CPDFSDK_PageView* pPageView) { if (pListBox->IsItemSelected(i)) { - m_pWidget->SetOptionSelection(i, true, false); + m_pWidget->SetOptionSelection(i, TRUE, FALSE); aNewSelect.Add(i); } } } else { - m_pWidget->SetOptionSelection(pListBox->GetCurSel(), true, false); + m_pWidget->SetOptionSelection(pListBox->GetCurSel(), TRUE, FALSE); aNewSelect.Add(pListBox->GetCurSel()); } m_pWidget->SetTopVisibleIndex(nNewTopIndex); - m_pWidget->ResetFieldAppearance(true); + m_pWidget->ResetFieldAppearance(TRUE); m_pWidget->UpdateField(); SetChangeMark(); } @@ -192,7 +192,7 @@ void CFFL_ListBox::GetActionData(CPDFSDK_PageView* pPageView, CPDF_AAction::AAct } else { - if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false)) + if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) { ASSERT(m_pWidget != NULL); int32_t nCurSel = pListBox->GetCurSel(); @@ -230,7 +230,7 @@ void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView) { ASSERT(pPageView != NULL); - if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false)) + if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) { for (int32_t i=0,sz=pListBox->GetCount(); i<sz; i++) { @@ -244,14 +244,14 @@ void CFFL_ListBox::SaveState(CPDFSDK_PageView* pPageView) void CFFL_ListBox::RestoreState(CPDFSDK_PageView* pPageView) { - if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, false)) + if (CPWL_ListBox* pListBox = (CPWL_ListBox*)GetPDFWindow(pPageView, FALSE)) { for (int i=0,sz=m_State.GetSize(); i<sz; i++) pListBox->Select(m_State[i]); } } -CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestoreValue) +CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, FX_BOOL bRestoreValue) { if (bRestoreValue) SaveState(pPageView); @@ -263,17 +263,17 @@ CPWL_Wnd* CFFL_ListBox::ResetPDFWindow(CPDFSDK_PageView* pPageView, bool bRestor if (bRestoreValue) { RestoreState(pPageView); - pRet = GetPDFWindow(pPageView, false); + pRet = GetPDFWindow(pPageView, FALSE); } else - pRet = GetPDFWindow(pPageView, true); + pRet = GetPDFWindow(pPageView, TRUE); m_pWidget->UpdateField(); return pRet; } -void CFFL_ListBox::OnKeyStroke(bool bKeyDown, FX_DWORD nFlag) +void CFFL_ListBox::OnKeyStroke(FX_BOOL bKeyDown, FX_DWORD nFlag) { ASSERT(m_pWidget != NULL); @@ -289,7 +289,7 @@ void CFFL_ListBox::OnKeyStroke(bool bKeyDown, FX_DWORD nFlag) if (CommitData(pPageView, nFlag)) { DestroyPDFWindow(pPageView); - m_bValid = false; + m_bValid = FALSE; } } } |