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

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

Issue 1644633003: Member function name refactoring (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 11 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') | fpdfsdk/src/javascript/Document.cpp » ('j') | 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 <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "fpdfsdk/include/fsdk_mgr.h" 10 #include "fpdfsdk/include/fsdk_mgr.h"
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 } 446 }
447 447
448 FX_BOOL CPDFSDK_Document::ProcOpenAction() { 448 FX_BOOL CPDFSDK_Document::ProcOpenAction() {
449 if (!m_pDoc) 449 if (!m_pDoc)
450 return FALSE; 450 return FALSE;
451 451
452 CPDF_Dictionary* pRoot = GetPDFDocument()->GetRoot(); 452 CPDF_Dictionary* pRoot = GetPDFDocument()->GetRoot();
453 if (!pRoot) 453 if (!pRoot)
454 return FALSE; 454 return FALSE;
455 455
456 CPDF_Object* pOpenAction = pRoot->GetDict("OpenAction"); 456 CPDF_Object* pOpenAction = pRoot->GetDictBy("OpenAction");
457 if (!pOpenAction) 457 if (!pOpenAction)
458 pOpenAction = pRoot->GetArray("OpenAction"); 458 pOpenAction = pRoot->GetArrayBy("OpenAction");
459 459
460 if (!pOpenAction) 460 if (!pOpenAction)
461 return FALSE; 461 return FALSE;
462 462
463 if (pOpenAction->IsArray()) 463 if (pOpenAction->IsArray())
464 return TRUE; 464 return TRUE;
465 465
466 if (CPDF_Dictionary* pDict = pOpenAction->AsDictionary()) { 466 if (CPDF_Dictionary* pDict = pOpenAction->AsDictionary()) {
467 CPDF_Action action(pDict); 467 CPDF_Action action(pDict);
468 if (m_pEnv->GetActionHander()) 468 if (m_pEnv->GetActionHander())
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 CPDFSDK_Annot* pSDKAnnot = pAnnotHandler->NewAnnot(pPDFAnnot, this); 709 CPDFSDK_Annot* pSDKAnnot = pAnnotHandler->NewAnnot(pPDFAnnot, this);
710 if (!pSDKAnnot) 710 if (!pSDKAnnot)
711 return nullptr; 711 return nullptr;
712 712
713 m_fxAnnotArray.push_back(pSDKAnnot); 713 m_fxAnnotArray.push_back(pSDKAnnot);
714 pAnnotHandler->Annot_OnCreate(pSDKAnnot); 714 pAnnotHandler->Annot_OnCreate(pSDKAnnot);
715 return pSDKAnnot; 715 return pSDKAnnot;
716 } 716 }
717 717
718 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Dictionary* pDict) { 718 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(CPDF_Dictionary* pDict) {
719 return pDict ? AddAnnot(pDict->GetString("Subtype"), pDict) : nullptr; 719 return pDict ? AddAnnot(pDict->GetStringBy("Subtype"), pDict) : nullptr;
720 } 720 }
721 721
722 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(const FX_CHAR* lpSubType, 722 CPDFSDK_Annot* CPDFSDK_PageView::AddAnnot(const FX_CHAR* lpSubType,
723 CPDF_Dictionary* pDict) { 723 CPDF_Dictionary* pDict) {
724 return NULL; 724 return NULL;
725 } 725 }
726 726
727 FX_BOOL CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot) { 727 FX_BOOL CPDFSDK_PageView::DeleteAnnot(CPDFSDK_Annot* pAnnot) {
728 return FALSE; 728 return FALSE;
729 } 729 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot(); 917 CPDFSDK_Annot* pFocusAnnot = m_pSDKDoc->GetFocusAnnot();
918 if (!pFocusAnnot) 918 if (!pFocusAnnot)
919 return nullptr; 919 return nullptr;
920 920
921 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) { 921 for (CPDFSDK_Annot* pAnnot : m_fxAnnotArray) {
922 if (pAnnot == pFocusAnnot) 922 if (pAnnot == pFocusAnnot)
923 return pAnnot; 923 return pAnnot;
924 } 924 }
925 return nullptr; 925 return nullptr;
926 } 926 }
OLDNEW
« no previous file with comments | « fpdfsdk/src/fsdk_baseform.cpp ('k') | fpdfsdk/src/javascript/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698