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

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

Issue 1243883003: Fix else-after-returns throughout pdfium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 5 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
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 "../../core/include/fxcrt/fx_xml.h" 7 #include "../../core/include/fxcrt/fx_xml.h"
8 #include "../../public/fpdf_ext.h" 8 #include "../../public/fpdf_ext.h"
9 #include "../include/fsdk_define.h" 9 #include "../include/fsdk_define.h"
10 10
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 return ; 171 return ;
172 } 172 }
173 if(pRootDict->KeyExist("Names")) 173 if(pRootDict->KeyExist("Names"))
174 { 174 {
175 CPDF_Dictionary* pNameDict = pRootDict->GetDict("Names") ; 175 CPDF_Dictionary* pNameDict = pRootDict->GetDict("Names") ;
176 if (pNameDict && pNameDict->KeyExist("EmbeddedFiles")) 176 if (pNameDict && pNameDict->KeyExist("EmbeddedFiles"))
177 { 177 {
178 FPDF_UnSupportError(FPDF_UNSP_DOC_ATTACHMENT); 178 FPDF_UnSupportError(FPDF_UNSP_DOC_ATTACHMENT);
179 return; 179 return;
180 } 180 }
181 » » » else if (pNameDict && pNameDict->KeyExist("JavaScript")) 181 » » » if (pNameDict && pNameDict->KeyExist("JavaScript"))
182 { 182 {
183 CPDF_Dictionary* pJSDict = pNameDict->GetDict("J avaScript"); 183 CPDF_Dictionary* pJSDict = pNameDict->GetDict("J avaScript");
184 CPDF_Array * pArray = pJSDict ? pJSDict->GetArra y("Names") : NULL; 184 CPDF_Array * pArray = pJSDict ? pJSDict->GetArra y("Names") : NULL;
185 if (pArray) { 185 if (pArray) {
186 int nCount = pArray->GetCount(); 186 int nCount = pArray->GetCount();
187 for(int i=0; i<nCount; i++) 187 for(int i=0; i<nCount; i++)
188 { 188 {
189 CFX_ByteString cbStr = pArray->G etString(i); 189 CFX_ByteString cbStr = pArray->G etString(i);
190 if(cbStr.Compare("com.adobe.acro bat.SharedReview.Register") == 0) 190 if(cbStr.Compare("com.adobe.acro bat.SharedReview.Register") == 0)
191 { 191 {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 return PAGEMODE_USETHUMBS; 236 return PAGEMODE_USETHUMBS;
237 if (strPageMode.EqualNoCase("FullScreen")) 237 if (strPageMode.EqualNoCase("FullScreen"))
238 return PAGEMODE_FULLSCREEN; 238 return PAGEMODE_FULLSCREEN;
239 if (strPageMode.EqualNoCase("UseOC")) 239 if (strPageMode.EqualNoCase("UseOC"))
240 return PAGEMODE_USEOC; 240 return PAGEMODE_USEOC;
241 if (strPageMode.EqualNoCase("UseAttachments")) 241 if (strPageMode.EqualNoCase("UseAttachments"))
242 return PAGEMODE_USEATTACHMENTS; 242 return PAGEMODE_USEATTACHMENTS;
243 243
244 return PAGEMODE_UNKNOWN; 244 return PAGEMODE_UNKNOWN;
245 } 245 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698