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

Unified Diff: fpdfsdk/src/formfiller/FFL_RadioButton.cpp

Issue 1252613002: FX_BOOL considered harmful. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Manual edits. Created 5 years, 5 months 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 | « fpdfsdk/src/formfiller/FFL_PushButton.cpp ('k') | fpdfsdk/src/formfiller/FFL_TextField.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/formfiller/FFL_RadioButton.cpp
diff --git a/fpdfsdk/src/formfiller/FFL_RadioButton.cpp b/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
index 1f73e8ccaa5b919a9b6bb7c46d62b907e2700d55..e7b334828a94a47c175e88244efb58a95b9783c8 100644
--- a/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
+++ b/fpdfsdk/src/formfiller/FFL_RadioButton.cpp
@@ -31,19 +31,19 @@ CPWL_Wnd* CFFL_RadioButton::NewPDFWindow(const PWL_CREATEPARAM& cp, CPDFSDK_Page
return pWnd;
}
-FX_BOOL CFFL_RadioButton::OnKeyDown(CPDFSDK_Annot* pAnnot, FX_UINT nKeyCode, FX_UINT nFlags)
+bool CFFL_RadioButton::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_RadioButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
+bool CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT nFlags)
{
switch (nChar)
{
@@ -56,61 +56,61 @@ FX_BOOL CFFL_RadioButton::OnChar(CPDFSDK_Annot* pAnnot, FX_UINT nChar, FX_UINT n
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_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, TRUE))
- pWnd->SetCheck(TRUE);
+ if (CPWL_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, true))
+ pWnd->SetCheck(true);
CommitData(pPageView,nFlags);
- return TRUE;
+ return true;
}
default:
return CFFL_FormFiller::OnChar(pAnnot, nChar, nFlags);
}
}
-FX_BOOL CFFL_RadioButton::OnLButtonUp(CPDFSDK_PageView *pPageView, CPDFSDK_Annot* pAnnot, FX_UINT nFlags, const CPDF_Point& point)
+bool CFFL_RadioButton::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_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, TRUE))
- pWnd->SetCheck(TRUE);
+ if (CPWL_RadioButton * pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, true))
+ pWnd->SetCheck(true);
- if (!CommitData(pPageView,nFlags)) return FALSE;
+ if (!CommitData(pPageView,nFlags)) return false;
}
- return TRUE;
+ return true;
}
-FX_BOOL CFFL_RadioButton::IsDataChanged(CPDFSDK_PageView* pPageView)
+bool CFFL_RadioButton::IsDataChanged(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, false))
{
return pWnd->IsChecked() != m_pWidget->IsChecked();
}
- return FALSE;
+ return false;
}
void CFFL_RadioButton::SaveData(CPDFSDK_PageView* pPageView)
{
ASSERT(m_pWidget != NULL);
- if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, FALSE))
+ if (CPWL_RadioButton* pWnd = (CPWL_RadioButton*)GetPDFWindow(pPageView, false))
{
- FX_BOOL bNewChecked = pWnd->IsChecked();
+ bool bNewChecked = pWnd->IsChecked();
if (bNewChecked)
{
@@ -129,7 +129,7 @@ void CFFL_RadioButton::SaveData(CPDFSDK_PageView* pPageView)
}
}
- m_pWidget->SetCheck(bNewChecked, FALSE);
+ m_pWidget->SetCheck(bNewChecked, false);
m_pWidget->UpdateField();
SetChangeMark();
}
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_PushButton.cpp ('k') | fpdfsdk/src/formfiller/FFL_TextField.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698