Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Side by Side Diff: fpdfsdk/src/fsdk_mgr.cpp

Issue 1417893003: Add type cast definitions for CPDF_Array. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fpdfsdk/src/fsdk_actionhandler.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 if (!pRoot) 472 if (!pRoot)
473 return FALSE; 473 return FALSE;
474 474
475 CPDF_Object* pOpenAction = pRoot->GetDict("OpenAction"); 475 CPDF_Object* pOpenAction = pRoot->GetDict("OpenAction");
476 if (!pOpenAction) 476 if (!pOpenAction)
477 pOpenAction = pRoot->GetArray("OpenAction"); 477 pOpenAction = pRoot->GetArray("OpenAction");
478 478
479 if (!pOpenAction) 479 if (!pOpenAction)
480 return FALSE; 480 return FALSE;
481 481
482 if (pOpenAction->GetType() == PDFOBJ_ARRAY) 482 if (pOpenAction->IsArray())
483 return TRUE; 483 return TRUE;
484 484
485 if (CPDF_Dictionary* pDict = pOpenAction->AsDictionary()) { 485 if (CPDF_Dictionary* pDict = pOpenAction->AsDictionary()) {
486 CPDF_Action action(pDict); 486 CPDF_Action action(pDict);
487 if (m_pEnv->GetActionHander()) 487 if (m_pEnv->GetActionHander())
488 m_pEnv->GetActionHander()->DoAction_DocOpen(action, this); 488 m_pEnv->GetActionHander()->DoAction_DocOpen(action, this);
489 return TRUE; 489 return TRUE;
490 } 490 }
491 return FALSE; 491 return FALSE;
492 } 492 }
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 if (!pFocusAnnot) 987 if (!pFocusAnnot)
988 return NULL; 988 return NULL;
989 989
990 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) { 990 for (int i = 0; i < m_fxAnnotArray.GetSize(); i++) {
991 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i); 991 CPDFSDK_Annot* pAnnot = (CPDFSDK_Annot*)m_fxAnnotArray.GetAt(i);
992 if (pAnnot == pFocusAnnot) 992 if (pAnnot == pFocusAnnot)
993 return pAnnot; 993 return pAnnot;
994 } 994 }
995 return NULL; 995 return NULL;
996 } 996 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fsdk_actionhandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698