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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 CPDF_Object* pOpenAction = pRoot->GetDict("OpenAction"); | 478 CPDF_Object* pOpenAction = pRoot->GetDict("OpenAction"); |
479 if (!pOpenAction) | 479 if (!pOpenAction) |
480 pOpenAction = pRoot->GetArray("OpenAction"); | 480 pOpenAction = pRoot->GetArray("OpenAction"); |
481 | 481 |
482 if (!pOpenAction) | 482 if (!pOpenAction) |
483 return FALSE; | 483 return FALSE; |
484 | 484 |
485 if (pOpenAction->GetType() == PDFOBJ_ARRAY) | 485 if (pOpenAction->GetType() == PDFOBJ_ARRAY) |
486 return TRUE; | 486 return TRUE; |
487 | 487 |
488 if (pOpenAction->GetType() == PDFOBJ_DICTIONARY) { | 488 if (CPDF_Dictionary* pDict = pOpenAction->AsDictionary()) { |
489 CPDF_Dictionary* pDict = (CPDF_Dictionary*)pOpenAction; | |
490 CPDF_Action action(pDict); | 489 CPDF_Action action(pDict); |
491 if (m_pEnv->GetActionHander()) | 490 if (m_pEnv->GetActionHander()) |
492 m_pEnv->GetActionHander()->DoAction_DocOpen(action, this); | 491 m_pEnv->GetActionHander()->DoAction_DocOpen(action, this); |
493 return TRUE; | 492 return TRUE; |
494 } | 493 } |
495 return FALSE; | 494 return FALSE; |
496 } | 495 } |
497 | 496 |
498 CPDF_OCContext* CPDFSDK_Document::GetOCContext() { | 497 CPDF_OCContext* CPDFSDK_Document::GetOCContext() { |
499 if (!m_pOccontent) | 498 if (!m_pOccontent) |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1177 if (!pFocusAnnot) | 1176 if (!pFocusAnnot) |
1178 return NULL; | 1177 return NULL; |
1179 | 1178 |
1180 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { | 1179 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { |
1181 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); | 1180 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); |
1182 if (pAnnot == pFocusAnnot) | 1181 if (pAnnot == pFocusAnnot) |
1183 return pAnnot; | 1182 return pAnnot; |
1184 } | 1183 } |
1185 return NULL; | 1184 return NULL; |
1186 } | 1185 } |
OLD | NEW |