From 320b2313d19869333ed453af546e61a9fc2b81c9 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 23 Jul 2015 13:26:26 -0700 Subject: 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 . --- fpdfsdk/src/fsdk_actionhandler.cpp | 136 ++++++++++++++++++------------------- 1 file changed, 68 insertions(+), 68 deletions(-) (limited to 'fpdfsdk/src/fsdk_actionhandler.cpp') diff --git a/fpdfsdk/src/fsdk_actionhandler.cpp b/fpdfsdk/src/fsdk_actionhandler.cpp index 145559e057..7ba227f0c2 100644 --- a/fpdfsdk/src/fsdk_actionhandler.cpp +++ b/fpdfsdk/src/fsdk_actionhandler.cpp @@ -24,14 +24,14 @@ void CPDFSDK_ActionHandler::SetMediaActionHandler(CPDFSDK_MediaActionHandler* pH } //document open -FX_BOOL CPDFSDK_ActionHandler::DoAction_DocOpen(const CPDF_Action& action, CPDFSDK_Document* pDocument) +bool CPDFSDK_ActionHandler::DoAction_DocOpen(const CPDF_Action& action, CPDFSDK_Document* pDocument) { CFX_PtrList list; return ExecuteDocumentOpenAction(action, pDocument, list); } //document open -FX_BOOL CPDFSDK_ActionHandler::DoAction_JavaScript(const CPDF_Action& JsAction,CFX_WideString csJSName, +bool CPDFSDK_ActionHandler::DoAction_JavaScript(const CPDF_Action& JsAction,CFX_WideString csJSName, CPDFSDK_Document* pDocument) { if (JsAction.GetType() == CPDF_Action::JavaScript) @@ -40,14 +40,14 @@ FX_BOOL CPDFSDK_ActionHandler::DoAction_JavaScript(const CPDF_Action& JsAction,C if (!swJS.IsEmpty()) { RunDocumentOpenJavaScript(pDocument, csJSName, swJS); - return TRUE; + return true; } } - return FALSE; + return false; } -FX_BOOL CPDFSDK_ActionHandler::DoAction_FieldJavaScript(const CPDF_Action& JsAction, CPDF_AAction::AActionType type, +bool CPDFSDK_ActionHandler::DoAction_FieldJavaScript(const CPDF_Action& JsAction, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, PDFSDK_FieldAction& data) { @@ -59,48 +59,48 @@ FX_BOOL CPDFSDK_ActionHandler::DoAction_FieldJavaScript(const CPDF_Action& JsAct if (!swJS.IsEmpty()) { RunFieldJavaScript(pDocument, pFormField, type, data, swJS); - return TRUE; + return true; } } - return FALSE; + return false; } -FX_BOOL CPDFSDK_ActionHandler::DoAction_Page(const CPDF_Action& action, enum CPDF_AAction::AActionType eType, +bool CPDFSDK_ActionHandler::DoAction_Page(const CPDF_Action& action, enum CPDF_AAction::AActionType eType, CPDFSDK_Document* pDocument) { CFX_PtrList list; return ExecuteDocumentPageAction(action, eType, pDocument, list); } -FX_BOOL CPDFSDK_ActionHandler::DoAction_Document(const CPDF_Action& action, enum CPDF_AAction::AActionType eType, +bool CPDFSDK_ActionHandler::DoAction_Document(const CPDF_Action& action, enum CPDF_AAction::AActionType eType, CPDFSDK_Document* pDocument) { CFX_PtrList list; return ExecuteDocumentPageAction(action, eType, pDocument, list); } -FX_BOOL CPDFSDK_ActionHandler::DoAction_BookMark(CPDF_Bookmark *pBookMark, const CPDF_Action& action, CPDF_AAction::AActionType type, +bool CPDFSDK_ActionHandler::DoAction_BookMark(CPDF_Bookmark *pBookMark, const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument) { CFX_PtrList list; return ExecuteBookMark(action, pDocument, pBookMark, list); } -FX_BOOL CPDFSDK_ActionHandler::DoAction_Screen(const CPDF_Action& action, CPDF_AAction::AActionType type, +bool CPDFSDK_ActionHandler::DoAction_Screen(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDFSDK_Annot* pScreen) { CFX_PtrList list; return ExecuteScreenAction(action, type, pDocument, pScreen, list); } -FX_BOOL CPDFSDK_ActionHandler::DoAction_Link(const CPDF_Action& action, +bool CPDFSDK_ActionHandler::DoAction_Link(const CPDF_Action& action, CPDFSDK_Document* pDocument) { CFX_PtrList list; return ExecuteLinkAction(action, pDocument, list); } -FX_BOOL CPDFSDK_ActionHandler::DoAction_Field(const CPDF_Action& action, CPDF_AAction::AActionType type, +bool CPDFSDK_ActionHandler::DoAction_Field(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, PDFSDK_FieldAction& data) { @@ -108,12 +108,12 @@ FX_BOOL CPDFSDK_ActionHandler::DoAction_Field(const CPDF_Action& action, CPDF_AA return ExecuteFieldAction(action, type, pDocument, pFormField, data, list); } -FX_BOOL CPDFSDK_ActionHandler::ExecuteDocumentOpenAction(const CPDF_Action& action, CPDFSDK_Document* pDocument, +bool CPDFSDK_ActionHandler::ExecuteDocumentOpenAction(const CPDF_Action& action, CPDFSDK_Document* pDocument, CFX_PtrList& list) { CPDF_Dictionary* pDict = action.GetDict(); if (list.Find(pDict)) - return FALSE; + return false; list.AddTail(pDict); @@ -138,20 +138,20 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteDocumentOpenAction(const CPDF_Action& acti for (int32_t i=0,sz=action.GetSubActionsCount(); iOnLink_MouseUp(pDocument); CFX_WideString csInfo; - FX_BOOL bRet = pContext->RunScript(swJS, csInfo); + bool bRet = pContext->RunScript(swJS, csInfo); if (!bRet) { // FIXME: return error. @@ -193,20 +193,20 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteLinkAction(const CPDF_Action& action, CPDF for (int32_t i=0,sz=action.GetSubActionsCount(); iGetFieldByDict(pFieldDict) != NULL; } -FX_BOOL CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPDF_AAction::AActionType type, +bool CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, PDFSDK_FieldAction& data, CFX_PtrList& list) { @@ -262,7 +262,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPD CPDF_Dictionary* pDict = action.GetDict(); if (list.Find(pDict)) - return FALSE; + return false; list.AddTail(pDict); @@ -277,7 +277,7 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPD { RunFieldJavaScript(pDocument, pFormField, type, data, swJS); if (!IsValidField(pDocument, pFormField->GetFieldDict())) - return FALSE; + return false; } } } @@ -289,20 +289,20 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteFieldAction(const CPDF_Action& action, CPD for (int32_t i=0,sz=action.GetSubActionsCount(); iOnScreen_OutView(IsCTRLpressed(), IsSHIFTpressed(), pScreen); // break; // default: - // ASSERT(FALSE); + // ASSERT(false); // break; // } CFX_WideString csInfo; - FX_BOOL bRet = pContext->RunScript(swJS, csInfo); + bool bRet = pContext->RunScript(swJS, csInfo); if (!bRet) { //CBCL_FormNotify::MsgBoxJSError(pPageView->GetPageViewWnd(), csInfo); @@ -379,20 +379,20 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteScreenAction(const CPDF_Action& action, CP for (int32_t i=0,sz=action.GetSubActionsCount(); iOnBookmark_MouseUp(pBookmark); CFX_WideString csInfo; - FX_BOOL bRet = pContext->RunScript(swJS, csInfo); + bool bRet = pContext->RunScript(swJS, csInfo); if (!bRet) { //CBCL_FormNotify::MsgBoxJSError(pPageView->GetPageViewWnd(), csInfo); @@ -434,10 +434,10 @@ FX_BOOL CPDFSDK_ActionHandler::ExecuteBookMark(const CPDF_Action& action, CPDFSD for (int32_t i=0,sz=action.GetSubActionsCount(); iRunScript(script, csInfo); + bool bRet = pContext->RunScript(script, csInfo); if (!bRet) { //CBCL_FormNotify::MsgBoxJSError(pPageView->GetPageViewWnd(), csInfo); @@ -668,7 +668,7 @@ void CPDFSDK_ActionHandler::RunDocumentOpenJavaScript(CPDFSDK_Document* pDocumen pContext->OnDoc_Open(pDocument, sScriptName); CFX_WideString csInfo; - FX_BOOL bRet = pContext->RunScript(script, csInfo); + bool bRet = pContext->RunScript(script, csInfo); if (!bRet) { //CBCL_FormNotify::MsgBoxJSError(pPageView->GetPageViewWnd(), csInfo); @@ -719,12 +719,12 @@ void CPDFSDK_ActionHandler::RunDocumentPageJavaScript(CPDFSDK_Document* pDocumen pContext->OnPage_OutView(pDocument); break; default: - ASSERT(FALSE); + ASSERT(false); break; } CFX_WideString csInfo; - FX_BOOL bRet = pContext->RunScript(script, csInfo); + bool bRet = pContext->RunScript(script, csInfo); if (!bRet) { //CBCL_FormNotify::MsgBoxJSError(pPageView->GetPageViewWnd(), csInfo); @@ -734,7 +734,7 @@ void CPDFSDK_ActionHandler::RunDocumentPageJavaScript(CPDFSDK_Document* pDocumen } -FX_BOOL CPDFSDK_FormActionHandler::DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument) +bool CPDFSDK_FormActionHandler::DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument) { ASSERT(pDocument != NULL); @@ -744,13 +744,13 @@ FX_BOOL CPDFSDK_FormActionHandler::DoAction_Hide(const CPDF_Action& action, CPDF if (pInterForm->DoAction_Hide(action)) { pDocument->SetChangeMark(); - return TRUE; + return true; } - return FALSE; + return false; } -FX_BOOL CPDFSDK_FormActionHandler::DoAction_SubmitForm(const CPDF_Action& action, CPDFSDK_Document* pDocument) +bool CPDFSDK_FormActionHandler::DoAction_SubmitForm(const CPDF_Action& action, CPDFSDK_Document* pDocument) { ASSERT(pDocument != NULL); @@ -760,7 +760,7 @@ FX_BOOL CPDFSDK_FormActionHandler::DoAction_SubmitForm(const CPDF_Action& action return pInterForm->DoAction_SubmitForm(action); } -FX_BOOL CPDFSDK_FormActionHandler::DoAction_ResetForm(const CPDF_Action& action, CPDFSDK_Document* pDocument) +bool CPDFSDK_FormActionHandler::DoAction_ResetForm(const CPDF_Action& action, CPDFSDK_Document* pDocument) { ASSERT(pDocument != NULL); @@ -769,13 +769,13 @@ FX_BOOL CPDFSDK_FormActionHandler::DoAction_ResetForm(const CPDF_Action& action, if (pInterForm->DoAction_ResetForm(action)) { - return TRUE; + return true; } - return FALSE; + return false; } -FX_BOOL CPDFSDK_FormActionHandler::DoAction_ImportData(const CPDF_Action& action, CPDFSDK_Document* pDocument) +bool CPDFSDK_FormActionHandler::DoAction_ImportData(const CPDF_Action& action, CPDFSDK_Document* pDocument) { ASSERT(pDocument != NULL); @@ -785,23 +785,23 @@ FX_BOOL CPDFSDK_FormActionHandler::DoAction_ImportData(const CPDF_Action& action if (pInterForm->DoAction_ImportData(action)) { pDocument->SetChangeMark(); - return TRUE; + return true; } - return FALSE; + return false; } -FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Rendition(const CPDF_Action& action, CPDFSDK_Document* pDocument) +bool CPDFSDK_MediaActionHandler::DoAction_Rendition(const CPDF_Action& action, CPDFSDK_Document* pDocument) { - return FALSE; + return false; } -FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Sound(const CPDF_Action& action, CPDFSDK_Document* pDocument) +bool CPDFSDK_MediaActionHandler::DoAction_Sound(const CPDF_Action& action, CPDFSDK_Document* pDocument) { - return FALSE; + return false; } -FX_BOOL CPDFSDK_MediaActionHandler::DoAction_Movie(const CPDF_Action& action, CPDFSDK_Document* pDocument) +bool CPDFSDK_MediaActionHandler::DoAction_Movie(const CPDF_Action& action, CPDFSDK_Document* pDocument) { - return FALSE; + return false; } -- cgit v1.2.3