From 9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 4 Aug 2015 13:00:21 -0700 Subject: XFA: clang-format all pdfium code. No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none --- fpdfsdk/src/formfiller/FFL_Notify.cpp | 230 +++++++++++++++++----------------- 1 file changed, 117 insertions(+), 113 deletions(-) (limited to 'fpdfsdk/src/formfiller/FFL_Notify.cpp') diff --git a/fpdfsdk/src/formfiller/FFL_Notify.cpp b/fpdfsdk/src/formfiller/FFL_Notify.cpp index 58a2202b61..e348f8e0b9 100644 --- a/fpdfsdk/src/formfiller/FFL_Notify.cpp +++ b/fpdfsdk/src/formfiller/FFL_Notify.cpp @@ -10,164 +10,168 @@ // #include "../../include/formfiller/FFL_ComboBox.h" // #include "../../include/formfiller/FFL_Module.h" -/* -------------------------------- CFFL_Notify ------------------------------ */ +/* -------------------------------- CFFL_Notify ------------------------------ + */ //#pragma warning(disable: 4800) -CFFL_Notify::CFFL_Notify(CFFL_FormFiller * pFormFiller) : - m_bDoActioning(FALSE), - m_nNotifyFlag(0) -{ - ASSERT(pFormFiller != NULL); +CFFL_Notify::CFFL_Notify(CFFL_FormFiller* pFormFiller) + : m_bDoActioning(FALSE), m_nNotifyFlag(0) { + ASSERT(pFormFiller != NULL); } -CFFL_Notify::~CFFL_Notify() -{ -} +CFFL_Notify::~CFFL_Notify() {} -void CFFL_Notify::BeforeNotify() -{ - m_nNotifyFlag ++; +void CFFL_Notify::BeforeNotify() { + m_nNotifyFlag++; } - -void CFFL_Notify::AfterNotify() -{ - m_nNotifyFlag --; +void CFFL_Notify::AfterNotify() { + m_nNotifyFlag--; } -FX_BOOL CFFL_Notify::OnMouseUp(FX_BOOL & bExit) -{ - BeforeNotify(); - FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::ButtonUp, bExit); - AfterNotify(); - return bRet; +FX_BOOL CFFL_Notify::OnMouseUp(FX_BOOL& bExit) { + BeforeNotify(); + FX_BOOL bRet = + FALSE; // DoAAction(CPDF_AAction::AActionType::ButtonUp, bExit); + AfterNotify(); + return bRet; } -FX_BOOL CFFL_Notify::OnMouseDown(FX_BOOL & bExit) -{ - BeforeNotify(); - FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::ButtonDown, bExit); - AfterNotify(); - return bRet; +FX_BOOL CFFL_Notify::OnMouseDown(FX_BOOL& bExit) { + BeforeNotify(); + FX_BOOL bRet = + FALSE; // DoAAction(CPDF_AAction::AActionType::ButtonDown, bExit); + AfterNotify(); + return bRet; } -FX_BOOL CFFL_Notify::OnMouseEnter(FX_BOOL & bExit) -{ - BeforeNotify(); - FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::CursorEnter, bExit); - AfterNotify(); - return bRet; +FX_BOOL CFFL_Notify::OnMouseEnter(FX_BOOL& bExit) { + BeforeNotify(); + FX_BOOL bRet = + FALSE; // DoAAction(CPDF_AAction::AActionType::CursorEnter, bExit); + AfterNotify(); + return bRet; } -FX_BOOL CFFL_Notify::OnMouseExit(FX_BOOL & bExit) -{ - BeforeNotify(); - FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::CursorExit, bExit); - AfterNotify(); - return bRet; +FX_BOOL CFFL_Notify::OnMouseExit(FX_BOOL& bExit) { + BeforeNotify(); + FX_BOOL bRet = + FALSE; // DoAAction(CPDF_AAction::AActionType::CursorExit, bExit); + AfterNotify(); + return bRet; } -FX_BOOL CFFL_Notify::OnSetFocus(FX_BOOL & bExit) -{ - BeforeNotify(); - FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::GetFocus, bExit); - AfterNotify(); - return bRet; +FX_BOOL CFFL_Notify::OnSetFocus(FX_BOOL& bExit) { + BeforeNotify(); + FX_BOOL bRet = + FALSE; // DoAAction(CPDF_AAction::AActionType::GetFocus, bExit); + AfterNotify(); + return bRet; } -FX_BOOL CFFL_Notify::OnKillFocus(FX_BOOL & bExit) -{ - BeforeNotify(); - FX_BOOL bRet = FALSE;//DoAAction(CPDF_AAction::AActionType::LoseFocus, bExit); - AfterNotify(); - return bRet; +FX_BOOL CFFL_Notify::OnKillFocus(FX_BOOL& bExit) { + BeforeNotify(); + FX_BOOL bRet = + FALSE; // DoAAction(CPDF_AAction::AActionType::LoseFocus, bExit); + AfterNotify(); + return bRet; } -FX_BOOL CFFL_Notify::OnCalculate() -{ - return TRUE; +FX_BOOL CFFL_Notify::OnCalculate() { + return TRUE; } -FX_BOOL CFFL_Notify::OnFormat(int iCommitKey) -{ - return TRUE; +FX_BOOL CFFL_Notify::OnFormat(int iCommitKey) { + return TRUE; } -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; +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; } -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; +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; } -FX_BOOL CFFL_Notify::DoAAction(CPDF_AAction::AActionType eAAT, FX_BOOL & bExit) -{ - if (m_bDoActioning) - return FALSE; +FX_BOOL CFFL_Notify::DoAAction(CPDF_AAction::AActionType eAAT, FX_BOOL& bExit) { + if (m_bDoActioning) + return FALSE; - CPDF_Action action; - if (!FindAAction(eAAT, action)) - return FALSE; + CPDF_Action action; + if (!FindAAction(eAAT, action)) + return FALSE; - m_bDoActioning = TRUE; - ExecuteActionTree(eAAT,action,bExit); - m_bDoActioning = FALSE; - return TRUE; + m_bDoActioning = TRUE; + ExecuteActionTree(eAAT, action, bExit); + m_bDoActioning = FALSE; + return TRUE; } -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; +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; - for (int32_t i=0,sz=action.GetSubActionsCount(); i