OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_aaction.h" | 7 #include "core/fpdfdoc/cpdf_aaction.h" |
8 | 8 |
9 namespace { | 9 namespace { |
10 | 10 |
11 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", | 11 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", |
12 "PV", "PI", "O", "C", "K", "F", "V", "C", | 12 "PV", "PI", "O", "C", "K", "F", "V", "C", |
13 "WC", "WS", "DS", "WP", "DP", ""}; | 13 "WC", "WS", "DS", "WP", "DP", ""}; |
14 | 14 |
15 } // namespace | 15 } // namespace |
16 | 16 |
17 FX_BOOL CPDF_AAction::ActionExist(AActionType eType) const { | 17 FX_BOOL CPDF_AAction::ActionExist(AActionType eType) const { |
18 return m_pDict && m_pDict->KeyExist(g_sAATypes[eType]); | 18 return m_pDict && m_pDict->KeyExist(g_sAATypes[eType]); |
19 } | 19 } |
20 | 20 |
21 CPDF_Action CPDF_AAction::GetAction(AActionType eType) const { | 21 CPDF_Action CPDF_AAction::GetAction(AActionType eType) const { |
22 return m_pDict ? CPDF_Action(m_pDict->GetDictFor(g_sAATypes[eType])) | 22 return m_pDict ? CPDF_Action(m_pDict->GetDictFor(g_sAATypes[eType])) |
23 : CPDF_Action(); | 23 : CPDF_Action(); |
24 } | 24 } |
OLD | NEW |