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 "../../public/fpdf_ext.h" | 7 #include "../../public/fpdf_ext.h" |
8 #include "../../third_party/base/nonstd_unique_ptr.h" | 8 #include "../../third_party/base/nonstd_unique_ptr.h" |
9 #include "../include/formfiller/FFL_FormFiller.h" | 9 #include "../include/formfiller/FFL_FormFiller.h" |
10 #include "../include/fsdk_define.h" | 10 #include "../include/fsdk_define.h" |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 CPDF_Object* pOpenAction = pRoot->GetDict("OpenAction"); | 473 CPDF_Object* pOpenAction = pRoot->GetDict("OpenAction"); |
474 if (!pOpenAction) | 474 if (!pOpenAction) |
475 pOpenAction = pRoot->GetArray("OpenAction"); | 475 pOpenAction = pRoot->GetArray("OpenAction"); |
476 | 476 |
477 if (!pOpenAction) | 477 if (!pOpenAction) |
478 return FALSE; | 478 return FALSE; |
479 | 479 |
480 if (pOpenAction->GetType() == PDFOBJ_ARRAY) | 480 if (pOpenAction->GetType() == PDFOBJ_ARRAY) |
481 return TRUE; | 481 return TRUE; |
482 | 482 |
483 if (pOpenAction->GetType() == PDFOBJ_DICTIONARY) { | 483 if (CPDF_Dictionary* pDict = pOpenAction->AsDictionary()) { |
484 CPDF_Dictionary* pDict = (CPDF_Dictionary*)pOpenAction; | |
485 CPDF_Action action(pDict); | 484 CPDF_Action action(pDict); |
486 if (m_pEnv->GetActionHander()) | 485 if (m_pEnv->GetActionHander()) |
487 m_pEnv->GetActionHander()->DoAction_DocOpen(action, this); | 486 m_pEnv->GetActionHander()->DoAction_DocOpen(action, this); |
488 return TRUE; | 487 return TRUE; |
489 } | 488 } |
490 return FALSE; | 489 return FALSE; |
491 } | 490 } |
492 | 491 |
493 CPDF_OCContext* CPDFSDK_Document::GetOCContext() { | 492 CPDF_OCContext* CPDFSDK_Document::GetOCContext() { |
494 if (!m_pOccontent) | 493 if (!m_pOccontent) |
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
986 if (!pFocusAnnot) | 985 if (!pFocusAnnot) |
987 return NULL; | 986 return NULL; |
988 | 987 |
989 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { | 988 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { |
990 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); | 989 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); |
991 if (pAnnot == pFocusAnnot) | 990 if (pAnnot == pFocusAnnot) |
992 return pAnnot; | 991 return pAnnot; |
993 } | 992 } |
994 return NULL; | 993 return NULL; |
995 } | 994 } |
OLD | NEW |