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

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

Issue 1410343003: [Merge to XFA] Revert "Revert "Add type cast definitions for CPDF_Dictionary."" (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Rebase to origin/xfa Created 5 years, 2 months 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_baseform.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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fsdk_baseform.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698