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

Side by Side Diff: fpdfsdk/fpdf_ext.cpp

Issue 2031653003: Get rid of NULLs in fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_core
Patch Set: rebase Created 4 years, 6 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/fpdf_dataavail.cpp ('k') | fpdfsdk/fpdf_flatten.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 "public/fpdf_ext.h" 7 #include "public/fpdf_ext.h"
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return; 149 return;
150 } 150 }
151 if (pRootDict->KeyExist("Names")) { 151 if (pRootDict->KeyExist("Names")) {
152 CPDF_Dictionary* pNameDict = pRootDict->GetDictBy("Names"); 152 CPDF_Dictionary* pNameDict = pRootDict->GetDictBy("Names");
153 if (pNameDict && pNameDict->KeyExist("EmbeddedFiles")) { 153 if (pNameDict && pNameDict->KeyExist("EmbeddedFiles")) {
154 FPDF_UnSupportError(FPDF_UNSP_DOC_ATTACHMENT); 154 FPDF_UnSupportError(FPDF_UNSP_DOC_ATTACHMENT);
155 return; 155 return;
156 } 156 }
157 if (pNameDict && pNameDict->KeyExist("JavaScript")) { 157 if (pNameDict && pNameDict->KeyExist("JavaScript")) {
158 CPDF_Dictionary* pJSDict = pNameDict->GetDictBy("JavaScript"); 158 CPDF_Dictionary* pJSDict = pNameDict->GetDictBy("JavaScript");
159 CPDF_Array* pArray = pJSDict ? pJSDict->GetArrayBy("Names") : NULL; 159 CPDF_Array* pArray = pJSDict ? pJSDict->GetArrayBy("Names") : nullptr;
160 if (pArray) { 160 if (pArray) {
161 for (size_t i = 0; i < pArray->GetCount(); i++) { 161 for (size_t i = 0; i < pArray->GetCount(); i++) {
162 CFX_ByteString cbStr = pArray->GetStringAt(i); 162 CFX_ByteString cbStr = pArray->GetStringAt(i);
163 if (cbStr.Compare("com.adobe.acrobat.SharedReview.Register") == 0) { 163 if (cbStr.Compare("com.adobe.acrobat.SharedReview.Register") == 0) {
164 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDREVIEW); 164 FPDF_UnSupportError(FPDF_UNSP_DOC_SHAREDREVIEW);
165 return; 165 return;
166 } 166 }
167 } 167 }
168 } 168 }
169 } 169 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 return PAGEMODE_USETHUMBS; 206 return PAGEMODE_USETHUMBS;
207 if (strPageMode.EqualNoCase("FullScreen")) 207 if (strPageMode.EqualNoCase("FullScreen"))
208 return PAGEMODE_FULLSCREEN; 208 return PAGEMODE_FULLSCREEN;
209 if (strPageMode.EqualNoCase("UseOC")) 209 if (strPageMode.EqualNoCase("UseOC"))
210 return PAGEMODE_USEOC; 210 return PAGEMODE_USEOC;
211 if (strPageMode.EqualNoCase("UseAttachments")) 211 if (strPageMode.EqualNoCase("UseAttachments"))
212 return PAGEMODE_USEATTACHMENTS; 212 return PAGEMODE_USEATTACHMENTS;
213 213
214 return PAGEMODE_UNKNOWN; 214 return PAGEMODE_UNKNOWN;
215 } 215 }
OLDNEW
« no previous file with comments | « fpdfsdk/fpdf_dataavail.cpp ('k') | fpdfsdk/fpdf_flatten.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698