| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 return CPDF_Action(pArray->GetDict(iIndex)); | 275 return CPDF_Action(pArray->GetDict(iIndex)); |
| 276 } | 276 } |
| 277 return CPDF_Action(); | 277 return CPDF_Action(); |
| 278 } | 278 } |
| 279 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", "PV",
"PI", | 279 const FX_CHAR* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC", "PV",
"PI", |
| 280 "O", "C", | 280 "O", "C", |
| 281 "K", "F", "V", "C", | 281 "K", "F", "V", "C", |
| 282 "WC", "WS", "DS", "WP", "DP", | 282 "WC", "WS", "DS", "WP", "DP", |
| 283 "" | 283 "" |
| 284 }; | 284 }; |
| 285 FX_BOOL CPDF_AAction::ActionExist(AActionType eType) const | 285 bool CPDF_AAction::ActionExist(AActionType eType) const |
| 286 { | 286 { |
| 287 if (m_pDict == NULL) { | 287 if (m_pDict == NULL) { |
| 288 return FALSE; | 288 return false; |
| 289 } | 289 } |
| 290 return m_pDict->KeyExist(g_sAATypes[(int)eType]); | 290 return m_pDict->KeyExist(g_sAATypes[(int)eType]); |
| 291 } | 291 } |
| 292 CPDF_Action CPDF_AAction::GetAction(AActionType eType) const | 292 CPDF_Action CPDF_AAction::GetAction(AActionType eType) const |
| 293 { | 293 { |
| 294 if (!m_pDict) { | 294 if (!m_pDict) { |
| 295 return CPDF_Action(); | 295 return CPDF_Action(); |
| 296 } | 296 } |
| 297 return CPDF_Action(m_pDict->GetDict(g_sAATypes[(int)eType])); | 297 return CPDF_Action(m_pDict->GetDict(g_sAATypes[(int)eType])); |
| 298 } | 298 } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 return CPDF_Action(); | 356 return CPDF_Action(); |
| 357 } | 357 } |
| 358 return CPDF_Action(pAction->GetDict()); | 358 return CPDF_Action(pAction->GetDict()); |
| 359 } | 359 } |
| 360 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const | 360 int CPDF_DocJSActions::FindJSAction(const CFX_ByteString& csName) const |
| 361 { | 361 { |
| 362 ASSERT(m_pDocument != NULL); | 362 ASSERT(m_pDocument != NULL); |
| 363 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript")); | 363 CPDF_NameTree name_tree(m_pDocument, FX_BSTRC("JavaScript")); |
| 364 return name_tree.GetIndex(csName); | 364 return name_tree.GetIndex(csName); |
| 365 } | 365 } |
| OLD | NEW |