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

Side by Side Diff: core/fpdfapi/fpdf_page/cpdf_page.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
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 "core/fpdfapi/fpdf_page/include/cpdf_page.h" 7 #include "core/fpdfapi/fpdf_page/include/cpdf_page.h"
8 8
9 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h" 9 #include "core/fpdfapi/fpdf_page/include/cpdf_pageobject.h"
10 #include "core/fpdfapi/fpdf_page/pageint.h" 10 #include "core/fpdfapi/fpdf_page/pageint.h"
11 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" 11 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h"
12 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" 12 #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h"
13 #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h" 13 #include "core/fpdfapi/fpdf_parser/include/cpdf_object.h"
14 #include "core/fpdfapi/include/cpdf_modulemgr.h" 14 #include "core/fpdfapi/include/cpdf_modulemgr.h"
15 #include "core/fpdfapi/ipdf_rendermodule.h" 15 #include "core/fpdfapi/ipdf_rendermodule.h"
16 16
17 CPDF_Object* FPDFAPI_GetPageAttr(CPDF_Dictionary* pPageDict, 17 CPDF_Object* FPDFAPI_GetPageAttr(CPDF_Dictionary* pPageDict,
18 const CFX_ByteStringC& name) { 18 const CFX_ByteStringC& name) {
19 int level = 0; 19 int level = 0;
20 while (1) { 20 while (1) {
21 CPDF_Object* pObj = pPageDict->GetElementValue(name); 21 CPDF_Object* pObj = pPageDict->GetDirectObjectBy(name);
22 if (pObj) { 22 if (pObj) {
23 return pObj; 23 return pObj;
24 } 24 }
25 CPDF_Dictionary* pParent = pPageDict->GetDictBy("Parent"); 25 CPDF_Dictionary* pParent = pPageDict->GetDictBy("Parent");
26 if (!pParent || pParent == pPageDict) { 26 if (!pParent || pParent == pPageDict) {
27 return NULL; 27 return NULL;
28 } 28 }
29 pPageDict = pParent; 29 pPageDict = pParent;
30 level++; 30 level++;
31 if (level == 1000) { 31 if (level == 1000) {
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 y2 = yPos; 182 y2 = yPos;
183 break; 183 break;
184 } 184 }
185 display_matrix.Set( 185 display_matrix.Set(
186 ((FX_FLOAT)(x2 - x0)) / m_PageWidth, ((FX_FLOAT)(y2 - y0)) / m_PageWidth, 186 ((FX_FLOAT)(x2 - x0)) / m_PageWidth, ((FX_FLOAT)(y2 - y0)) / m_PageWidth,
187 ((FX_FLOAT)(x1 - x0)) / m_PageHeight, 187 ((FX_FLOAT)(x1 - x0)) / m_PageHeight,
188 ((FX_FLOAT)(y1 - y0)) / m_PageHeight, (FX_FLOAT)x0, (FX_FLOAT)y0); 188 ((FX_FLOAT)(y1 - y0)) / m_PageHeight, (FX_FLOAT)x0, (FX_FLOAT)y0);
189 matrix = m_PageMatrix; 189 matrix = m_PageMatrix;
190 matrix.Concat(display_matrix); 190 matrix.Concat(display_matrix);
191 } 191 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/cpdf_colorspace.cpp ('k') | core/fpdfapi/fpdf_page/cpdf_shadingpattern.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698