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

Side by Side Diff: fpdfsdk/include/fsdk_actionhandler.h

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 unified diff | Download patch
« no previous file with comments | « fpdfsdk/include/formfiller/FFL_Utils.h ('k') | fpdfsdk/include/fsdk_annothandler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ 7 #ifndef FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_
8 #define FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ 8 #define FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_
9 9
10 #include "../../core/include/fpdfdoc/fpdf_doc.h" 10 #include "../../core/include/fpdfdoc/fpdf_doc.h"
11 #include "../../core/include/fxcrt/fx_string.h" 11 #include "../../core/include/fxcrt/fx_string.h"
12 #include "../../third_party/base/nonstd_unique_ptr.h" 12 #include "../../third_party/base/nonstd_unique_ptr.h"
13 #include "fsdk_baseform.h" 13 #include "fsdk_baseform.h"
14 14
15 class CFX_PtrList; 15 class CFX_PtrList;
16 class CPDFDoc_Environment; 16 class CPDFDoc_Environment;
17 class CPDFSDK_Annot; 17 class CPDFSDK_Annot;
18 class CPDFSDK_Document; 18 class CPDFSDK_Document;
19 class CPDF_Bookmark; 19 class CPDF_Bookmark;
20 class CPDF_Dictionary; 20 class CPDF_Dictionary;
21 class IFXJS_Runtime; 21 class IFXJS_Runtime;
22 22
23 class CPDFSDK_FormActionHandler 23 class CPDFSDK_FormActionHandler
24 { 24 {
25 public: 25 public:
26 » FX_BOOL»DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocu ment); 26 » bool» DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocu ment);
27 » FX_BOOL»DoAction_SubmitForm(const CPDF_Action& action, CPDFSDK_Document* pDocument); 27 » bool» DoAction_SubmitForm(const CPDF_Action& action, CPDFSDK_Document* pDocument);
28 » FX_BOOL»DoAction_ResetForm(const CPDF_Action& action, CPDFSDK_Document* pDocument); 28 » bool» DoAction_ResetForm(const CPDF_Action& action, CPDFSDK_Document* pDocument);
29 » FX_BOOL»DoAction_ImportData(const CPDF_Action& action, CPDFSDK_Document* pDocument); 29 » bool» DoAction_ImportData(const CPDF_Action& action, CPDFSDK_Document* pDocument);
30 }; 30 };
31 31
32 class CPDFSDK_MediaActionHandler 32 class CPDFSDK_MediaActionHandler
33 { 33 {
34 public: 34 public:
35 » FX_BOOL»DoAction_Rendition(const CPDF_Action& action, CPDFSDK_Document* pDocument); 35 » bool» DoAction_Rendition(const CPDF_Action& action, CPDFSDK_Document* pDocument);
36 » FX_BOOL»DoAction_Sound(const CPDF_Action& action, CPDFSDK_Document* pDoc ument); 36 » bool» DoAction_Sound(const CPDF_Action& action, CPDFSDK_Document* pDoc ument);
37 » FX_BOOL»DoAction_Movie(const CPDF_Action& action, CPDFSDK_Document* pDoc ument); 37 » bool» DoAction_Movie(const CPDF_Action& action, CPDFSDK_Document* pDoc ument);
38 }; 38 };
39 39
40 class CPDFSDK_ActionHandler 40 class CPDFSDK_ActionHandler
41 { 41 {
42 public: 42 public:
43 CPDFSDK_ActionHandler(CPDFDoc_Environment* pEvi); 43 CPDFSDK_ActionHandler(CPDFDoc_Environment* pEvi);
44 44
45 void SetMediaActionHandler(CPDFSDK_MediaActionHandler* pHandler); 45 void SetMediaActionHandler(CPDFSDK_MediaActionHandler* pHandler);
46 46
47 » FX_BOOL»» DoAction_DocOpen(const CPDF_Action& action, CPDFSDK_Docu ment* pDocument); 47 » bool» » DoAction_DocOpen(const CPDF_Action& action, CPDFSDK_Docu ment* pDocument);
48 » FX_BOOL»» DoAction_JavaScript(const CPDF_Action& JsAction,CFX_Wide String csJSName, CPDFSDK_Document* pDocument); 48 » bool» » DoAction_JavaScript(const CPDF_Action& JsAction,CFX_Wide String csJSName, CPDFSDK_Document* pDocument);
49 » FX_BOOL»» DoAction_Page(const CPDF_Action& action, enum CPDF_AActi on::AActionType eType, CPDFSDK_Document* pDocument); 49 » bool» » DoAction_Page(const CPDF_Action& action, enum CPDF_AActi on::AActionType eType, CPDFSDK_Document* pDocument);
50 » FX_BOOL»» DoAction_Document(const CPDF_Action& action, enum CPDF_A Action::AActionType eType, CPDFSDK_Document* pDocument); 50 » bool» » DoAction_Document(const CPDF_Action& action, enum CPDF_A Action::AActionType eType, CPDFSDK_Document* pDocument);
51 » FX_BOOL»» DoAction_BookMark(CPDF_Bookmark *pBookMark, const CPDF_A ction& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument); 51 » bool» » DoAction_BookMark(CPDF_Bookmark *pBookMark, const CPDF_A ction& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument);
52 » FX_BOOL»» DoAction_Screen(const CPDF_Action& action, CPDF_AAction: :AActionType type, CPDFSDK_Document* pDocument, CPDFSDK_Annot* pScreen); 52 » bool» » DoAction_Screen(const CPDF_Action& action, CPDF_AAction: :AActionType type, CPDFSDK_Document* pDocument, CPDFSDK_Annot* pScreen);
53 » FX_BOOL»» DoAction_Link(const CPDF_Action& action, CPDFSDK_Documen t* pDocument); 53 » bool» » DoAction_Link(const CPDF_Action& action, CPDFSDK_Documen t* pDocument);
54 » FX_BOOL»» DoAction_Field(const CPDF_Action& action, CPDF_AAction:: AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, PDFS DK_FieldAction& data); 54 » bool» » DoAction_Field(const CPDF_Action& action, CPDF_AAction:: AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pFormField, PDFS DK_FieldAction& data);
55 » FX_BOOL»» DoAction_FieldJavaScript(const CPDF_Action& JsAction, CP DF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pForm Field, PDFSDK_FieldAction& data); 55 » bool» » DoAction_FieldJavaScript(const CPDF_Action& JsAction, CP DF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormField* pForm Field, PDFSDK_FieldAction& data);
56 56
57 private: 57 private:
58 » FX_BOOL»» » » ExecuteDocumentOpenAction(const CPDF_Act ion& action, CPDFSDK_Document* pDocument, CFX_PtrList& list); 58 » bool» » » » ExecuteDocumentOpenAction(const CPDF_Act ion& action, CPDFSDK_Document* pDocument, CFX_PtrList& list);
59 » FX_BOOL»» » » ExecuteDocumentPageAction(const CPDF_Act ion& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CFX_P trList& list); 59 » bool» » » » ExecuteDocumentPageAction(const CPDF_Act ion& action, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CFX_P trList& list);
60 » FX_BOOL»» » » ExecuteFieldAction(const CPDF_Action& ac tion, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormFie ld* pFormField, PDFSDK_FieldAction& data, CFX_PtrList& list); 60 » bool» » » » ExecuteFieldAction(const CPDF_Action& ac tion, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDF_FormFie ld* pFormField, PDFSDK_FieldAction& data, CFX_PtrList& list);
61 » FX_BOOL»» » » ExecuteScreenAction(const CPDF_Action& a ction, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDFSDK_Ann ot* pScreen, CFX_PtrList& list); 61 » bool» » » » ExecuteScreenAction(const CPDF_Action& a ction, CPDF_AAction::AActionType type, CPDFSDK_Document* pDocument, CPDFSDK_Ann ot* pScreen, CFX_PtrList& list);
62 » FX_BOOL»» » » ExecuteBookMark(const CPDF_Action& actio n, CPDFSDK_Document* pDocument, CPDF_Bookmark* pBookmark, CFX_PtrList& list); 62 » bool» » » » ExecuteBookMark(const CPDF_Action& actio n, CPDFSDK_Document* pDocument, CPDF_Bookmark* pBookmark, CFX_PtrList& list);
63 » FX_BOOL»» » » ExecuteLinkAction(const CPDF_Action& act ion, CPDFSDK_Document* pDocument, CFX_PtrList& list); 63 » bool» » » » ExecuteLinkAction(const CPDF_Action& act ion, CPDFSDK_Document* pDocument, CFX_PtrList& list);
64 64
65 void DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Document* pDocument); 65 void DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Document* pDocument);
66 void RunDocumentPageJavaScript(CPDFSDK_Docume nt* pDocument, CPDF_AAction::AActionType type, const CFX_WideString& script); 66 void RunDocumentPageJavaScript(CPDFSDK_Docume nt* pDocument, CPDF_AAction::AActionType type, const CFX_WideString& script);
67 void RunDocumentOpenJavaScript(CPDFSDK_Docume nt* pDocument, const CFX_WideString& sScriptName, const CFX_WideString& script); 67 void RunDocumentOpenJavaScript(CPDFSDK_Docume nt* pDocument, const CFX_WideString& sScriptName, const CFX_WideString& script);
68 void RunFieldJavaScript(CPDFSDK_Document* pDo cument, CPDF_FormField* pFormField, CPDF_AAction::AActionType type, PDFSDK_Field Action& data, const CFX_WideString& script); 68 void RunFieldJavaScript(CPDFSDK_Document* pDo cument, CPDF_FormField* pFormField, CPDF_AAction::AActionType type, PDFSDK_Field Action& data, const CFX_WideString& script);
69 69
70 » FX_BOOL»» » » IsValidField(CPDFSDK_Document* pDocument , CPDF_Dictionary* pFieldDict); 70 » bool» » » » IsValidField(CPDFSDK_Document* pDocument , CPDF_Dictionary* pFieldDict);
71 » FX_BOOL»» » » IsValidDocView(CPDFSDK_Document* pDocume nt); 71 » bool» » » » IsValidDocView(CPDFSDK_Document* pDocume nt);
72 72
73 void DoAction_GoTo(CPDFSDK_Document* pDocumen t, const CPDF_Action& action); 73 void DoAction_GoTo(CPDFSDK_Document* pDocumen t, const CPDF_Action& action);
74 void DoAction_GoToR(CPDFSDK_Document* pDocume nt, const CPDF_Action& action); 74 void DoAction_GoToR(CPDFSDK_Document* pDocume nt, const CPDF_Action& action);
75 void DoAction_Launch(CPDFSDK_Document* pDocum ent, const CPDF_Action& action); 75 void DoAction_Launch(CPDFSDK_Document* pDocum ent, const CPDF_Action& action);
76 void DoAction_URI(CPDFSDK_Document* pDocument , const CPDF_Action& action); 76 void DoAction_URI(CPDFSDK_Document* pDocument , const CPDF_Action& action);
77 void DoAction_Named(CPDFSDK_Document* pDocume nt, const CPDF_Action& action); 77 void DoAction_Named(CPDFSDK_Document* pDocume nt, const CPDF_Action& action);
78 void DoAction_SetOCGState(CPDFSDK_Document* p Document, const CPDF_Action& action); 78 void DoAction_SetOCGState(CPDFSDK_Document* p Document, const CPDF_Action& action);
79 79
80 nonstd::unique_ptr<CPDFSDK_FormActionHandler> m_pFormActionHandler; 80 nonstd::unique_ptr<CPDFSDK_FormActionHandler> m_pFormActionHandler;
81 CPDFSDK_MediaActionHandler* m_pMediaActionHandler; 81 CPDFSDK_MediaActionHandler* m_pMediaActionHandler;
82 }; 82 };
83 83
84 #endif // FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ 84 #endif // FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_
OLDNEW
« no previous file with comments | « fpdfsdk/include/formfiller/FFL_Utils.h ('k') | fpdfsdk/include/fsdk_annothandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698