| OLD | NEW |
| 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 <memory> | 10 #include <memory> |
| 11 #include <set> |
| 11 | 12 |
| 12 #include "core/include/fpdfdoc/fpdf_doc.h" | 13 #include "core/include/fpdfdoc/fpdf_doc.h" |
| 13 #include "core/include/fxcrt/fx_string.h" | 14 #include "core/include/fxcrt/fx_string.h" |
| 14 #include "fsdk_baseform.h" | 15 #include "fsdk_baseform.h" |
| 15 | 16 |
| 16 class CFX_PtrList; | |
| 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 | 21 |
| 22 class CPDFSDK_FormActionHandler { | 22 class CPDFSDK_FormActionHandler { |
| 23 public: | 23 public: |
| 24 FX_BOOL DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument); | 24 FX_BOOL DoAction_Hide(const CPDF_Action& action, CPDFSDK_Document* pDocument); |
| 25 FX_BOOL DoAction_SubmitForm(const CPDF_Action& action, | 25 FX_BOOL DoAction_SubmitForm(const CPDF_Action& action, |
| 26 CPDFSDK_Document* pDocument); | 26 CPDFSDK_Document* pDocument); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 PDFSDK_FieldAction& data); | 61 PDFSDK_FieldAction& data); |
| 62 FX_BOOL DoAction_FieldJavaScript(const CPDF_Action& JsAction, | 62 FX_BOOL DoAction_FieldJavaScript(const CPDF_Action& JsAction, |
| 63 CPDF_AAction::AActionType type, | 63 CPDF_AAction::AActionType type, |
| 64 CPDFSDK_Document* pDocument, | 64 CPDFSDK_Document* pDocument, |
| 65 CPDF_FormField* pFormField, | 65 CPDF_FormField* pFormField, |
| 66 PDFSDK_FieldAction& data); | 66 PDFSDK_FieldAction& data); |
| 67 | 67 |
| 68 private: | 68 private: |
| 69 FX_BOOL ExecuteDocumentOpenAction(const CPDF_Action& action, | 69 FX_BOOL ExecuteDocumentOpenAction(const CPDF_Action& action, |
| 70 CPDFSDK_Document* pDocument, | 70 CPDFSDK_Document* pDocument, |
| 71 CFX_PtrList& list); | 71 std::set<CPDF_Dictionary*>* visited); |
| 72 FX_BOOL ExecuteDocumentPageAction(const CPDF_Action& action, | 72 FX_BOOL ExecuteDocumentPageAction(const CPDF_Action& action, |
| 73 CPDF_AAction::AActionType type, | 73 CPDF_AAction::AActionType type, |
| 74 CPDFSDK_Document* pDocument, | 74 CPDFSDK_Document* pDocument, |
| 75 CFX_PtrList& list); | 75 std::set<CPDF_Dictionary*>* visited); |
| 76 FX_BOOL ExecuteFieldAction(const CPDF_Action& action, | 76 FX_BOOL ExecuteFieldAction(const CPDF_Action& action, |
| 77 CPDF_AAction::AActionType type, | 77 CPDF_AAction::AActionType type, |
| 78 CPDFSDK_Document* pDocument, | 78 CPDFSDK_Document* pDocument, |
| 79 CPDF_FormField* pFormField, | 79 CPDF_FormField* pFormField, |
| 80 PDFSDK_FieldAction& data, | 80 PDFSDK_FieldAction& data, |
| 81 CFX_PtrList& list); | 81 std::set<CPDF_Dictionary*>* visited); |
| 82 FX_BOOL ExecuteScreenAction(const CPDF_Action& action, | 82 FX_BOOL ExecuteScreenAction(const CPDF_Action& action, |
| 83 CPDF_AAction::AActionType type, | 83 CPDF_AAction::AActionType type, |
| 84 CPDFSDK_Document* pDocument, | 84 CPDFSDK_Document* pDocument, |
| 85 CPDFSDK_Annot* pScreen, | 85 CPDFSDK_Annot* pScreen, |
| 86 CFX_PtrList& list); | 86 std::set<CPDF_Dictionary*>* visited); |
| 87 FX_BOOL ExecuteBookMark(const CPDF_Action& action, | 87 FX_BOOL ExecuteBookMark(const CPDF_Action& action, |
| 88 CPDFSDK_Document* pDocument, | 88 CPDFSDK_Document* pDocument, |
| 89 CPDF_Bookmark* pBookmark, | 89 CPDF_Bookmark* pBookmark, |
| 90 CFX_PtrList& list); | 90 std::set<CPDF_Dictionary*>* visited); |
| 91 FX_BOOL ExecuteLinkAction(const CPDF_Action& action, | 91 FX_BOOL ExecuteLinkAction(const CPDF_Action& action, |
| 92 CPDFSDK_Document* pDocument, | 92 CPDFSDK_Document* pDocument, |
| 93 CFX_PtrList& list); | 93 std::set<CPDF_Dictionary*>* visited); |
| 94 | 94 |
| 95 void DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Document* pDocument); | 95 void DoAction_NoJs(const CPDF_Action& action, CPDFSDK_Document* pDocument); |
| 96 void RunDocumentPageJavaScript(CPDFSDK_Document* pDocument, | 96 void RunDocumentPageJavaScript(CPDFSDK_Document* pDocument, |
| 97 CPDF_AAction::AActionType type, | 97 CPDF_AAction::AActionType type, |
| 98 const CFX_WideString& script); | 98 const CFX_WideString& script); |
| 99 void RunDocumentOpenJavaScript(CPDFSDK_Document* pDocument, | 99 void RunDocumentOpenJavaScript(CPDFSDK_Document* pDocument, |
| 100 const CFX_WideString& sScriptName, | 100 const CFX_WideString& sScriptName, |
| 101 const CFX_WideString& script); | 101 const CFX_WideString& script); |
| 102 void RunFieldJavaScript(CPDFSDK_Document* pDocument, | 102 void RunFieldJavaScript(CPDFSDK_Document* pDocument, |
| 103 CPDF_FormField* pFormField, | 103 CPDF_FormField* pFormField, |
| (...skipping 10 matching lines...) Expand all Loading... |
| 114 void DoAction_Launch(CPDFSDK_Document* pDocument, const CPDF_Action& action); | 114 void DoAction_Launch(CPDFSDK_Document* pDocument, const CPDF_Action& action); |
| 115 void DoAction_URI(CPDFSDK_Document* pDocument, const CPDF_Action& action); | 115 void DoAction_URI(CPDFSDK_Document* pDocument, const CPDF_Action& action); |
| 116 void DoAction_Named(CPDFSDK_Document* pDocument, const CPDF_Action& action); | 116 void DoAction_Named(CPDFSDK_Document* pDocument, const CPDF_Action& action); |
| 117 void DoAction_SetOCGState(CPDFSDK_Document* pDocument, | 117 void DoAction_SetOCGState(CPDFSDK_Document* pDocument, |
| 118 const CPDF_Action& action); | 118 const CPDF_Action& action); |
| 119 | 119 |
| 120 std::unique_ptr<CPDFSDK_FormActionHandler> m_pFormActionHandler; | 120 std::unique_ptr<CPDFSDK_FormActionHandler> m_pFormActionHandler; |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 #endif // FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ | 123 #endif // FPDFSDK_INCLUDE_FSDK_ACTIONHANDLER_H_ |
| OLD | NEW |