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

Side by Side Diff: core/fpdfapi/fpdf_page/fpdf_page_func.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 | « core/fpdfapi/fpdf_page/fpdf_page_doc.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser.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 "core/fpdfapi/fpdf_page/pageint.h" 7 #include "core/fpdfapi/fpdf_page/pageint.h"
8 8
9 #include <limits.h> 9 #include <limits.h>
10 10
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 CPDF_Array* pArray = pDict->GetArrayBy("Functions"); 769 CPDF_Array* pArray = pDict->GetArrayBy("Functions");
770 if (!pArray) { 770 if (!pArray) {
771 return FALSE; 771 return FALSE;
772 } 772 }
773 uint32_t nSubs = pArray->GetCount(); 773 uint32_t nSubs = pArray->GetCount();
774 if (nSubs == 0) { 774 if (nSubs == 0) {
775 return FALSE; 775 return FALSE;
776 } 776 }
777 m_nOutputs = 0; 777 m_nOutputs = 0;
778 for (uint32_t i = 0; i < nSubs; i++) { 778 for (uint32_t i = 0; i < nSubs; i++) {
779 CPDF_Object* pSub = pArray->GetElementValue(i); 779 CPDF_Object* pSub = pArray->GetDirectObjectAt(i);
780 if (pSub == pObj) { 780 if (pSub == pObj) {
781 return FALSE; 781 return FALSE;
782 } 782 }
783 std::unique_ptr<CPDF_Function> pFunc(CPDF_Function::Load(pSub)); 783 std::unique_ptr<CPDF_Function> pFunc(CPDF_Function::Load(pSub));
784 if (!pFunc) { 784 if (!pFunc) {
785 return FALSE; 785 return FALSE;
786 } 786 }
787 // Check that the input dimensionality is 1, and that all output 787 // Check that the input dimensionality is 1, and that all output
788 // dimensionalities are the same. 788 // dimensionalities are the same.
789 if (pFunc->CountInputs() != kRequiredNumInputs) { 789 if (pFunc->CountInputs() != kRequiredNumInputs) {
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 for (int i = 0; i < m_nOutputs; i++) { 933 for (int i = 0; i < m_nOutputs; i++) {
934 if (results[i] < m_pRanges[i * 2]) { 934 if (results[i] < m_pRanges[i * 2]) {
935 results[i] = m_pRanges[i * 2]; 935 results[i] = m_pRanges[i * 2];
936 } else if (results[i] > m_pRanges[i * 2 + 1]) { 936 } else if (results[i] > m_pRanges[i * 2 + 1]) {
937 results[i] = m_pRanges[i * 2 + 1]; 937 results[i] = m_pRanges[i * 2 + 1];
938 } 938 }
939 } 939 }
940 } 940 }
941 return TRUE; 941 return TRUE;
942 } 942 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_page/fpdf_page_doc.cpp ('k') | core/fpdfapi/fpdf_page/fpdf_page_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698