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

Side by Side Diff: core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp

Issue 1722913002: Remove uses of this->foo. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 10 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 | « no previous file | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.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/include/fpdfapi/fpdf_parser.h" 7 #include "core/include/fpdfapi/fpdf_parser.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
(...skipping 4281 matching lines...) Expand 10 before | Expand all | Expand 10 after
4292 } 4292 }
4293 int CPDF_DataAvail::GetPageCount() const { 4293 int CPDF_DataAvail::GetPageCount() const {
4294 if (m_pLinearized) { 4294 if (m_pLinearized) {
4295 CPDF_Dictionary* pDict = m_pLinearized->GetDict(); 4295 CPDF_Dictionary* pDict = m_pLinearized->GetDict();
4296 CPDF_Object* pObj = pDict ? pDict->GetElementValue("N") : nullptr; 4296 CPDF_Object* pObj = pDict ? pDict->GetElementValue("N") : nullptr;
4297 return pObj ? pObj->GetInteger() : 0; 4297 return pObj ? pObj->GetInteger() : 0;
4298 } 4298 }
4299 return m_pDocument ? m_pDocument->GetPageCount() : 0; 4299 return m_pDocument ? m_pDocument->GetPageCount() : 0;
4300 } 4300 }
4301 CPDF_Dictionary* CPDF_DataAvail::GetPage(int index) { 4301 CPDF_Dictionary* CPDF_DataAvail::GetPage(int index) {
4302 if (!m_pDocument || index < 0 || index >= this->GetPageCount()) { 4302 if (!m_pDocument || index < 0 || index >= GetPageCount()) {
4303 return nullptr; 4303 return nullptr;
4304 } 4304 }
4305 if (m_pLinearized) { 4305 if (m_pLinearized) {
4306 CPDF_Dictionary* pDict = m_pLinearized->GetDict(); 4306 CPDF_Dictionary* pDict = m_pLinearized->GetDict();
4307 CPDF_Object* pObj = pDict ? pDict->GetElementValue("P") : nullptr; 4307 CPDF_Object* pObj = pDict ? pDict->GetElementValue("P") : nullptr;
4308 int pageNum = pObj ? pObj->GetInteger() : 0; 4308 int pageNum = pObj ? pObj->GetInteger() : 0;
4309 if (m_pHintTables && index != pageNum) { 4309 if (m_pHintTables && index != pageNum) {
4310 FX_FILESIZE szPageStartPos = 0; 4310 FX_FILESIZE szPageStartPos = 0;
4311 FX_FILESIZE szPageLength = 0; 4311 FX_FILESIZE szPageLength = 0;
4312 FX_DWORD dwObjNum = 0; 4312 FX_DWORD dwObjNum = 0;
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
4740 if (!m_pLinearizedDict) 4740 if (!m_pLinearizedDict)
4741 return -1; 4741 return -1;
4742 CPDF_Array* pRange = m_pLinearizedDict->GetArrayBy("H"); 4742 CPDF_Array* pRange = m_pLinearizedDict->GetArrayBy("H");
4743 if (!pRange) 4743 if (!pRange)
4744 return -1; 4744 return -1;
4745 CPDF_Object* pStreamLen = pRange->GetElementValue(1); 4745 CPDF_Object* pStreamLen = pRange->GetElementValue(1);
4746 if (!pStreamLen) 4746 if (!pStreamLen)
4747 return -1; 4747 return -1;
4748 return pStreamLen->GetInteger(); 4748 return pStreamLen->GetInteger();
4749 } 4749 }
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698