diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-23 13:26:26 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-23 13:26:26 -0700 |
commit | 320b2313d19869333ed453af546e61a9fc2b81c9 (patch) | |
tree | 25f2eb8a0991ac485ca6354f0d3caf7fd775e732 /fpdfsdk/src/formfiller/FFL_CheckBox.cpp | |
parent | 065e9321b84fc0490f3da9099e8840c65e06868d (diff) | |
download | pdfium-320b2313d19869333ed453af546e61a9fc2b81c9.tar.xz |
FX_BOOL considered harmful, part 2.
Fully automatic change, execpt for cleanup in fx_system.h
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1254703002 .
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_CheckBox.cpp')
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_CheckBox.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp index 55d2d45bc2..72ff575c11 100644 --- a/fpdfsdk/src/formfiller/FFL_CheckBox.cpp +++ b/fpdfsdk/src/formfiller/FFL_CheckBox.cpp @@ -31,18 +31,18 @@ CPWL_Wnd* CFFL_CheckBox::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_PageVie return pWnd; } -FX_BOOL CFFL_CheckBox::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags) +bool CFFL_CheckBox::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags) { switch (nKeyCode) { case FWL_VKEY_Return: case FWL_VKEY_Space: - return TRUE; + return true; default: return CFFL_FormFiller::OnKeyDown(pAnnot, nKeyCode, nFlags); } } -FX_BOOL CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags) +bool CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags) { switch (nChar) { @@ -55,57 +55,57 @@ FX_BOOL CFFL_CheckBox::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFla CPDFSDK_PageView* pPageView = pAnnot->GetPageView(); ASSERT(pPageView != NULL); - FX_BOOL bReset = FALSE; - FX_BOOL bExit = FALSE; + bool bReset = false; + bool bExit = false; pIFormFiller->OnButtonUp(m_pWidget, pPageView, bReset, bExit,nFlags); - if (bReset) return TRUE; - if (bExit) return TRUE; + if (bReset) return true; + if (bExit) return true; CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags); - if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, TRUE)) + if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, true)) pWnd->SetCheck(!pWnd->IsChecked()); CommitData(pPageView,nFlags); - return TRUE; + return true; } default: return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags); } } -FX_BOOL CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point) +bool CFFL_CheckBox::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point) { CFFL_Button::OnLButtonUp(pPageView, pAnnot, nFlags, point); if (IsValid()) { - if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, TRUE)) + if (CPWL_CheckBox * pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, true)) { CPDFSDK_Widget* pWidget = (CPDFSDK_Widget*)pAnnot; pWnd->SetCheck(!pWidget->IsChecked()); // pWnd->SetCheck(!pWnd->IsChecked()); } - if (!CommitData(pPageView, nFlags)) return FALSE; + if (!CommitData(pPageView, nFlags)) return false; } - return TRUE; + return true; } -FX_BOOL CFFL_CheckBox::IsDataChanged(CPDFSDK_PageView* pPageView) +bool CFFL_CheckBox::IsDataChanged(CPDFSDK_PageView* pPageView) { ASSERT(m_pWidget != NULL); - if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE)) + if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, false)) { return pWnd->IsChecked() != m_pWidget->IsChecked(); } - return FALSE; + return false; } void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView) @@ -113,10 +113,10 @@ void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView) ASSERT(m_pWidget != NULL); - if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, FALSE)) + if (CPWL_CheckBox* pWnd = (CPWL_CheckBox*)GetPDFWindow(pPageView, false)) { - FX_BOOL bNewChecked = pWnd->IsChecked(); + bool bNewChecked = pWnd->IsChecked(); if (bNewChecked) @@ -136,7 +136,7 @@ void CFFL_CheckBox::SaveData(CPDFSDK_PageView* pPageView) } } - m_pWidget->SetCheck(bNewChecked, FALSE); + m_pWidget->SetCheck(bNewChecked, false); m_pWidget->UpdateField(); SetChangeMark(); } |