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 #include "core/fpdfdoc/include/cpdf_action.h" |
| 8 |
7 #include <vector> | 9 #include <vector> |
8 | 10 |
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" | 11 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" | 12 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h" |
11 #include "core/fpdfdoc/include/fpdf_doc.h" | 13 #include "core/fpdfdoc/include/cpdf_aaction.h" |
| 14 #include "core/fpdfdoc/include/cpdf_actionfields.h" |
| 15 #include "core/fpdfdoc/include/cpdf_docjsactions.h" |
| 16 #include "core/fpdfdoc/include/cpdf_filespec.h" |
| 17 #include "core/fpdfdoc/include/cpdf_nametree.h" |
12 | 18 |
13 namespace { | 19 namespace { |
14 | 20 |
15 const FX_CHAR* const g_sATypes[] = { | 21 const FX_CHAR* const g_sATypes[] = { |
16 "Unknown", "GoTo", "GoToR", "GoToE", "Launch", | 22 "Unknown", "GoTo", "GoToR", "GoToE", "Launch", |
17 "Thread", "URI", "Sound", "Movie", "Hide", | 23 "Thread", "URI", "Sound", "Movie", "Hide", |
18 "Named", "SubmitForm", "ResetForm", "ImportData", "JavaScript", | 24 "Named", "SubmitForm", "ResetForm", "ImportData", "JavaScript", |
19 "SetOCGState", "Rendition", "Trans", "GoTo3DView", nullptr}; | 25 "SetOCGState", "Rendition", "Trans", "GoTo3DView", nullptr}; |
20 | 26 |
21 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", | 27 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 if (!ToDictionary(pAction)) { | 262 if (!ToDictionary(pAction)) { |
257 return CPDF_Action(); | 263 return CPDF_Action(); |
258 } | 264 } |
259 return CPDF_Action(pAction->GetDict()); | 265 return CPDF_Action(pAction->GetDict()); |
260 } | 266 } |
261 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const { | 267 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const { |
262 ASSERT(m_pDocument); | 268 ASSERT(m_pDocument); |
263 CPDF_NameTree name_tree(m_pDocument, "JavaScript"); | 269 CPDF_NameTree name_tree(m_pDocument, "JavaScript"); |
264 return name_tree.GetIndex(csName); | 270 return name_tree.GetIndex(csName); |
265 } | 271 } |
OLD | NEW |