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 "../../include/fpdfdoc/fpdf_doc.h" | 7 #include "../../include/fpdfdoc/fpdf_doc.h" |
8 CPDF_Dest CPDF_Action::GetDest(CPDF_Document* pDoc) const | 8 CPDF_Dest CPDF_Action::GetDest(CPDF_Document* pDoc) const |
9 { | 9 { |
10 if (!m_pDict) { | 10 if (!m_pDict) { |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 return CPDF_Action(pArray->GetDict(iIndex)); | 282 return CPDF_Action(pArray->GetDict(iIndex)); |
283 } | 283 } |
284 return CPDF_Action(); | 284 return CPDF_Action(); |
285 } | 285 } |
286 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", "PV",
"PI", | 286 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", "PV",
"PI", |
287 "O", "C", | 287 "O", "C", |
288 "K", "F", "V", "C", | 288 "K", "F", "V", "C", |
289 "WC", "WS", "DS", "WP", "DP", | 289 "WC", "WS", "DS", "WP", "DP", |
290 "" | 290 "" |
291 }; | 291 }; |
292 FX_BOOL CPDF_AAction::ActionExist(AActionType eType) const | 292 bool CPDF_AAction::ActionExist(AActionType eType) const |
293 { | 293 { |
294 if (m_pDict == NULL) { | 294 if (m_pDict == NULL) { |
295 return FALSE; | 295 return false; |
296 } | 296 } |
297 return m_pDict->KeyExist(g_sAATypes[(int)eType]); | 297 return m_pDict->KeyExist(g_sAATypes[(int)eType]); |
298 } | 298 } |
299 CPDF_Action CPDF_AAction::GetAction(AActionType eType) const | 299 CPDF_Action CPDF_AAction::GetAction(AActionType eType) const |
300 { | 300 { |
301 if (!m_pDict) { | 301 if (!m_pDict) { |
302 return CPDF_Action(); | 302 return CPDF_Action(); |
303 } | 303 } |
304 return CPDF_Action(m_pDict->GetDict(g_sAATypes[(int)eType])); | 304 return CPDF_Action(m_pDict->GetDict(g_sAATypes[(int)eType])); |
305 } | 305 } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 return CPDF_Action(); | 363 return CPDF_Action(); |
364 } | 364 } |
365 return CPDF_Action(pAction->GetDict()); | 365 return CPDF_Action(pAction->GetDict()); |
366 } | 366 } |
367 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const | 367 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const |
368 { | 368 { |
369 ASSERT(m_pDocument != NULL); | 369 ASSERT(m_pDocument != NULL); |
370 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript")); | 370 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript")); |
371 return name_tree.GetIndex(csName); | 371 return name_tree.GetIndex(csName); |
372 } | 372 } |
OLD | NEW |