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

Unified Diff: core/fpdfapi/fpdf_parser/cpdf_document.cpp

Issue 2275593002: IndirectObjectHolder API updates (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Missed one Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: core/fpdfapi/fpdf_parser/cpdf_document.cpp
diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.cpp b/core/fpdfapi/fpdf_parser/cpdf_document.cpp
index 85606607034861f219430e4f7d0807c21c991fdd..a05a24e07f7de412eafb331539c6542860812865 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp
@@ -499,9 +499,9 @@ CPDF_Document::~CPDF_Document() {
}
void CPDF_Document::LoadDocInternal() {
- m_LastObjNum = m_pParser->GetLastObjNum();
+ SetLastObjNum(m_pParser->GetLastObjNum());
- CPDF_Object* pRootObj = GetIndirectObject(m_pParser->GetRootObjNum());
+ CPDF_Object* pRootObj = GetOrParseIndirectObject(m_pParser->GetRootObjNum());
if (!pRootObj)
return;
@@ -509,7 +509,7 @@ void CPDF_Document::LoadDocInternal() {
if (!m_pRootDict)
return;
- CPDF_Object* pInfoObj = GetIndirectObject(m_pParser->GetInfoObjNum());
+ CPDF_Object* pInfoObj = GetOrParseIndirectObject(m_pParser->GetInfoObjNum());
if (pInfoObj)
m_pInfoDict = pInfoObj->GetDict();
if (CPDF_Array* pIDArray = m_pParser->GetIDArray()) {
@@ -589,14 +589,14 @@ CPDF_Dictionary* CPDF_Document::GetPage(int iPage) {
if (m_bLinearized && (iPage == m_iFirstPageNo)) {
if (CPDF_Dictionary* pDict =
- ToDictionary(GetIndirectObject(m_dwFirstPageObjNum))) {
+ ToDictionary(GetOrParseIndirectObject(m_dwFirstPageObjNum))) {
return pDict;
}
}
int objnum = m_PageList.GetAt(iPage);
if (objnum) {
- if (CPDF_Dictionary* pDict = ToDictionary(GetIndirectObject(objnum)))
+ if (CPDF_Dictionary* pDict = ToDictionary(GetOrParseIndirectObject(objnum)))
return pDict;
}
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp ('k') | core/fpdfapi/fpdf_parser/cpdf_indirect_object_holder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698