summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-07-27 11:55:29 -0700
committerTom Sepez <tsepez@chromium.org>2015-07-27 11:55:29 -0700
commitff46aaf499edcf153ee2f57c7016587aa96dcfa0 (patch)
tree0a0d92713af476897899b126d180cc6294433d10 /fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
parentaafeff816e22c1333c17d8a0eb4fe8927c28142d (diff)
downloadpdfium-ff46aaf499edcf153ee2f57c7016587aa96dcfa0.tar.xz
FX Bool considered harmful, part 3
Try to reland this patch after fixing underlying issues that caused it to be reverted. fx_system.h is the only manual edit. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1258093002 .
Diffstat (limited to 'fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp')
-rw-r--r--fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp b/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
index 90fa8f880d..7bb38c4bfe 100644
--- a/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
+++ b/fpdfsdk/src/pdfwindow/PWL_SpecialButton.cpp
@@ -32,7 +32,7 @@ CPDF_Rect CPWL_PushButton::GetFocusRect() const
/* --------------------------- CPWL_CheckBox ---------------------------- */
-CPWL_CheckBox::CPWL_CheckBox() : m_bChecked(FALSE)
+CPWL_CheckBox::CPWL_CheckBox() : m_bChecked(false)
{
}
@@ -45,33 +45,33 @@ CFX_ByteString CPWL_CheckBox::GetClassName() const
return "CPWL_CheckBox";
}
-void CPWL_CheckBox::SetCheck(FX_BOOL bCheck)
+void CPWL_CheckBox::SetCheck(bool bCheck)
{
m_bChecked = bCheck;
}
-FX_BOOL CPWL_CheckBox::IsChecked() const
+bool CPWL_CheckBox::IsChecked() const
{
return m_bChecked;
}
-FX_BOOL CPWL_CheckBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+bool CPWL_CheckBox::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- if (IsReadOnly()) return FALSE;
+ if (IsReadOnly()) return false;
SetCheck(!IsChecked());
- return TRUE;
+ return true;
}
-FX_BOOL CPWL_CheckBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+bool CPWL_CheckBox::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
SetCheck(!IsChecked());
- return TRUE;
+ return true;
}
/* --------------------------- CPWL_RadioButton ---------------------------- */
-CPWL_RadioButton::CPWL_RadioButton() : m_bChecked(FALSE)
+CPWL_RadioButton::CPWL_RadioButton() : m_bChecked(false)
{
}
@@ -84,27 +84,27 @@ CFX_ByteString CPWL_RadioButton::GetClassName() const
return "CPWL_RadioButton";
}
-FX_BOOL CPWL_RadioButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
+bool CPWL_RadioButton::OnLButtonUp(const CPDF_Point & point, FX_DWORD nFlag)
{
- if (IsReadOnly()) return FALSE;
+ if (IsReadOnly()) return false;
- SetCheck(TRUE);
- return TRUE;
+ SetCheck(true);
+ return true;
}
-void CPWL_RadioButton::SetCheck(FX_BOOL bCheck)
+void CPWL_RadioButton::SetCheck(bool bCheck)
{
m_bChecked = bCheck;
}
-FX_BOOL CPWL_RadioButton::IsChecked() const
+bool CPWL_RadioButton::IsChecked() const
{
return m_bChecked;
}
-FX_BOOL CPWL_RadioButton::OnChar(FX_WORD nChar, FX_DWORD nFlag)
+bool CPWL_RadioButton::OnChar(FX_WORD nChar, FX_DWORD nFlag)
{
- SetCheck(TRUE);
- return TRUE;
+ SetCheck(true);
+ return true;
}