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

Side by Side Diff: fpdfsdk/fpdf_ext.cpp

Issue 1841173002: Rename GetElementValue() to GetDirectObject{By,At}(). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix test name Created 4 years, 8 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/formfiller/cba_fontmap.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 "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_document.h" 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_document.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document) { 194 DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document) {
195 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); 195 CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
196 if (!pDoc) 196 if (!pDoc)
197 return PAGEMODE_UNKNOWN; 197 return PAGEMODE_UNKNOWN;
198 198
199 CPDF_Dictionary* pRoot = pDoc->GetRoot(); 199 CPDF_Dictionary* pRoot = pDoc->GetRoot();
200 if (!pRoot) 200 if (!pRoot)
201 return PAGEMODE_UNKNOWN; 201 return PAGEMODE_UNKNOWN;
202 202
203 CPDF_Object* pName = pRoot->GetElement("PageMode"); 203 CPDF_Object* pName = pRoot->GetObjectBy("PageMode");
204 if (!pName) 204 if (!pName)
205 return PAGEMODE_USENONE; 205 return PAGEMODE_USENONE;
206 206
207 CFX_ByteString strPageMode = pName->GetString(); 207 CFX_ByteString strPageMode = pName->GetString();
208 if (strPageMode.IsEmpty() || strPageMode.EqualNoCase("UseNone")) 208 if (strPageMode.IsEmpty() || strPageMode.EqualNoCase("UseNone"))
209 return PAGEMODE_USENONE; 209 return PAGEMODE_USENONE;
210 if (strPageMode.EqualNoCase("UseOutlines")) 210 if (strPageMode.EqualNoCase("UseOutlines"))
211 return PAGEMODE_USEOUTLINES; 211 return PAGEMODE_USEOUTLINES;
212 if (strPageMode.EqualNoCase("UseThumbs")) 212 if (strPageMode.EqualNoCase("UseThumbs"))
213 return PAGEMODE_USETHUMBS; 213 return PAGEMODE_USETHUMBS;
214 if (strPageMode.EqualNoCase("FullScreen")) 214 if (strPageMode.EqualNoCase("FullScreen"))
215 return PAGEMODE_FULLSCREEN; 215 return PAGEMODE_FULLSCREEN;
216 if (strPageMode.EqualNoCase("UseOC")) 216 if (strPageMode.EqualNoCase("UseOC"))
217 return PAGEMODE_USEOC; 217 return PAGEMODE_USEOC;
218 if (strPageMode.EqualNoCase("UseAttachments")) 218 if (strPageMode.EqualNoCase("UseAttachments"))
219 return PAGEMODE_USEATTACHMENTS; 219 return PAGEMODE_USEATTACHMENTS;
220 220
221 return PAGEMODE_UNKNOWN; 221 return PAGEMODE_UNKNOWN;
222 } 222 }
OLDNEW
« no previous file with comments | « fpdfsdk/formfiller/cba_fontmap.cpp ('k') | fpdfsdk/fpdf_flatten.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698