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

Side by Side Diff: fpdfsdk/cpdfsdk_document.cpp

Issue 2334323005: Rename dictionary set and get methods (Closed)
Patch Set: Created 4 years, 3 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/cpdfsdk_baannot.cpp ('k') | fpdfsdk/cpdfsdk_interform.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 2016 PDFium Authors. All rights reserved. 1 // Copyright 2016 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 "fpdfsdk/include/cpdfsdk_document.h" 7 #include "fpdfsdk/include/cpdfsdk_document.h"
8 8
9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
10 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 97
98 FX_BOOL CPDFSDK_Document::ProcOpenAction() { 98 FX_BOOL CPDFSDK_Document::ProcOpenAction() {
99 if (!m_pDoc) 99 if (!m_pDoc)
100 return FALSE; 100 return FALSE;
101 101
102 CPDF_Dictionary* pRoot = GetPDFDocument()->GetRoot(); 102 CPDF_Dictionary* pRoot = GetPDFDocument()->GetRoot();
103 if (!pRoot) 103 if (!pRoot)
104 return FALSE; 104 return FALSE;
105 105
106 CPDF_Object* pOpenAction = pRoot->GetDictBy("OpenAction"); 106 CPDF_Object* pOpenAction = pRoot->GetDictFor("OpenAction");
107 if (!pOpenAction) 107 if (!pOpenAction)
108 pOpenAction = pRoot->GetArrayBy("OpenAction"); 108 pOpenAction = pRoot->GetArrayFor("OpenAction");
109 109
110 if (!pOpenAction) 110 if (!pOpenAction)
111 return FALSE; 111 return FALSE;
112 112
113 if (pOpenAction->IsArray()) 113 if (pOpenAction->IsArray())
114 return TRUE; 114 return TRUE;
115 115
116 if (CPDF_Dictionary* pDict = pOpenAction->AsDictionary()) { 116 if (CPDF_Dictionary* pDict = pOpenAction->AsDictionary()) {
117 CPDF_Action action(pDict); 117 CPDF_Action action(pDict);
118 if (m_pEnv->GetActionHander()) 118 if (m_pEnv->GetActionHander())
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 return GetPDFDocument()->GetUserPermissions() & nFlag; 252 return GetPDFDocument()->GetUserPermissions() & nFlag;
253 } 253 }
254 254
255 IJS_Runtime* CPDFSDK_Document::GetJsRuntime() { 255 IJS_Runtime* CPDFSDK_Document::GetJsRuntime() {
256 return m_pEnv->GetJSRuntime(); 256 return m_pEnv->GetJSRuntime();
257 } 257 }
258 258
259 CFX_WideString CPDFSDK_Document::GetPath() { 259 CFX_WideString CPDFSDK_Document::GetPath() {
260 return m_pEnv->JS_docGetFilePath(); 260 return m_pEnv->JS_docGetFilePath();
261 } 261 }
OLDNEW
« no previous file with comments | « fpdfsdk/cpdfsdk_baannot.cpp ('k') | fpdfsdk/cpdfsdk_interform.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698