diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-07-27 12:08:12 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-07-27 12:08:12 -0700 |
commit | 8d2aae7ee320da3a8ffe01c57e38b3f98443257d (patch) | |
tree | e694c6f82ec72fa46e6172b4475996b30d3f6a3a /fpdfsdk/src/formfiller/FFL_Notify.cpp | |
parent | ff46aaf499edcf153ee2f57c7016587aa96dcfa0 (diff) | |
download | pdfium-8d2aae7ee320da3a8ffe01c57e38b3f98443257d.tar.xz |
Revert "FX Bool considered harmful, part 3"
This reverts commit ff46aaf499edcf153ee2f57c7016587aa96dcfa0.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1255293002 .
Diffstat (limited to 'fpdfsdk/src/formfiller/FFL_Notify.cpp')
-rw-r--r-- | fpdfsdk/src/formfiller/FFL_Notify.cpp | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/fpdfsdk/src/formfiller/FFL_Notify.cpp b/fpdfsdk/src/formfiller/FFL_Notify.cpp index fdc4bcf7b1..58a2202b61 100644 --- a/fpdfsdk/src/formfiller/FFL_Notify.cpp +++ b/fpdfsdk/src/formfiller/FFL_Notify.cpp @@ -15,7 +15,7 @@ //#pragma warning(disable: 4800) CFFL_Notify::CFFL_Notify(CFFL_FormFiller * pFormFiller) : - m_bDoActioning(false), + m_bDoActioning(FALSE), m_nNotifyFlag(0) { ASSERT(pFormFiller != NULL); @@ -36,116 +36,116 @@ void CFFL_Notify::AfterNotify() m_nNotifyFlag --; } -bool CFFL_Notify::OnMouseUp(bool & bExit) +FX_BOOL CFFL_Notify::OnMouseUp(FX_BOOL & bExit) { BeforeNotify(); - bool bRet = false;//DoAAction(CPDF_AAction::AActionType::ButtonUp, bExit); + FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::ButtonUp, bExit); AfterNotify(); return bRet; } -bool CFFL_Notify::OnMouseDown(bool & bExit) +FX_BOOL CFFL_Notify::OnMouseDown(FX_BOOL & bExit) { BeforeNotify(); - bool bRet = false;//DoAAction(CPDF_AAction::AActionType::ButtonDown, bExit); + FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::ButtonDown, bExit); AfterNotify(); return bRet; } -bool CFFL_Notify::OnMouseEnter(bool & bExit) +FX_BOOL CFFL_Notify::OnMouseEnter(FX_BOOL & bExit) { BeforeNotify(); - bool bRet = false;//DoAAction(CPDF_AAction::AActionType::CursorEnter, bExit); + FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::CursorEnter, bExit); AfterNotify(); return bRet; } -bool CFFL_Notify::OnMouseExit(bool & bExit) +FX_BOOL CFFL_Notify::OnMouseExit(FX_BOOL & bExit) { BeforeNotify(); - bool bRet = false;//DoAAction(CPDF_AAction::AActionType::CursorExit, bExit); + FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::CursorExit, bExit); AfterNotify(); return bRet; } -bool CFFL_Notify::OnSetFocus(bool & bExit) +FX_BOOL CFFL_Notify::OnSetFocus(FX_BOOL & bExit) { BeforeNotify(); - bool bRet = false;//DoAAction(CPDF_AAction::AActionType::GetFocus, bExit); + FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::GetFocus, bExit); AfterNotify(); return bRet; } -bool CFFL_Notify::OnKillFocus(bool & bExit) +FX_BOOL CFFL_Notify::OnKillFocus(FX_BOOL & bExit) { BeforeNotify(); - bool bRet = false;//DoAAction(CPDF_AAction::AActionType::LoseFocus, bExit); + FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::LoseFocus, bExit); AfterNotify(); return bRet; } -bool CFFL_Notify::OnCalculate() +FX_BOOL CFFL_Notify::OnCalculate() { - return true; + return TRUE; } -bool CFFL_Notify::OnFormat(int iCommitKey) +FX_BOOL CFFL_Notify::OnFormat(int iCommitKey) { - return true; + return TRUE; } -bool CFFL_Notify::OnKeyStroke(CPDF_FormField* pFormField, int nCommitKey, CFX_WideString& strValue, CFX_WideString& strChange, - const CFX_WideString& strChangeEx, bool bKeyDown, bool bModifier, - bool bShift, bool bWillCommit, bool bFieldFull, - int& nSelStart, int& nSelEnd, bool& bRC) +FX_BOOL CFFL_Notify::OnKeyStroke(CPDF_FormField* pFormField, int nCommitKey, CFX_WideString& strValue, CFX_WideString& strChange, + const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier, + FX_BOOL bShift, FX_BOOL bWillCommit, FX_BOOL bFieldFull, + int& nSelStart, int& nSelEnd, FX_BOOL& bRC) { - return true; + return TRUE; } -bool CFFL_Notify::OnValidate(CPDF_FormField* pFormField, CFX_WideString& strValue, CFX_WideString & strChange, - const CFX_WideString& strChangeEx, bool bKeyDown, bool bModifier, - bool bShift, bool & bRC) +FX_BOOL CFFL_Notify::OnValidate(CPDF_FormField* pFormField, CFX_WideString& strValue, CFX_WideString & strChange, + const CFX_WideString& strChangeEx, FX_BOOL bKeyDown, FX_BOOL bModifier, + FX_BOOL bShift, FX_BOOL & bRC) { - return true; + return TRUE; } -bool CFFL_Notify::DoAAction(CPDF_AAction::AActionType eAAT, bool & bExit) +FX_BOOL CFFL_Notify::DoAAction(CPDF_AAction::AActionType eAAT, FX_BOOL & bExit) { if (m_bDoActioning) - return false; + return FALSE; CPDF_Action action; if (!FindAAction(eAAT, action)) - return false; + return FALSE; - m_bDoActioning = true; + m_bDoActioning = TRUE; ExecuteActionTree(eAAT,action,bExit); - m_bDoActioning = false; - return true; + m_bDoActioning = FALSE; + return TRUE; } -bool CFFL_Notify::ExecuteActionTree(CPDF_AAction::AActionType eAAT,CPDF_Action & action, bool& bExit) +FX_BOOL CFFL_Notify::ExecuteActionTree(CPDF_AAction::AActionType eAAT,CPDF_Action & action, FX_BOOL& bExit) { - if (!ExecuteAction(eAAT,action,bExit)) return false; - if (bExit) return true; + if (!ExecuteAction(eAAT,action,bExit)) return FALSE; + if (bExit) return TRUE; for (int32_t i=0,sz=action.GetSubActionsCount(); i<sz; i++) { CPDF_Action subaction = action.GetSubAction(i); - if (!ExecuteActionTree(eAAT,subaction,bExit)) return false; + if (!ExecuteActionTree(eAAT,subaction,bExit)) return FALSE; if (bExit) break; } - return true; + return TRUE; } -bool CFFL_Notify::FindAAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action) +FX_BOOL CFFL_Notify::FindAAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action) { - return false; + return FALSE; } -bool CFFL_Notify::FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType eAAT,CPDF_Action & action) +FX_BOOL CFFL_Notify::FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType eAAT,CPDF_Action & action) { CPDF_Action MyAction; @@ -154,20 +154,20 @@ bool CFFL_Notify::FindAAction(CPDF_AAction aaction,CPDF_AAction::AActionType eAA MyAction = aaction.GetAction(eAAT); } else - return false; + return FALSE; if (MyAction.GetType() == CPDF_Action::Unknown) - return false; + return FALSE; action = MyAction; - return true; + return TRUE; } -bool CFFL_Notify::ExecuteAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action,bool& bExit) +FX_BOOL CFFL_Notify::ExecuteAction(CPDF_AAction::AActionType eAAT,CPDF_Action & action,FX_BOOL& bExit) { - return false; + return FALSE; } //#pragma warning(default: 4800) |