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

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

Issue 2355813002: CPDF_Document and CPDF_DataAvail are no longer friends (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp ('k') | core/fpdfapi/fpdf_parser/include/cpdf_document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b2a3cd4ef246fa6890d8d013d41f42aeffc3c350..c204570999afc982487b2213c12a859c53d0fbd4 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp
@@ -513,6 +513,10 @@ CPDF_Dictionary* CPDF_Document::GetPagesDict() const {
return pRoot ? pRoot->GetDictFor("Pages") : nullptr;
}
+bool CPDF_Document::IsPageLoaded(int iPage) {
Tom Sepez 2016/09/20 17:26:04 nit: const method.
dsinclair 2016/09/20 19:21:46 Done.
+ return !!m_PageList.GetAt(iPage);
+}
+
CPDF_Dictionary* CPDF_Document::GetPage(int iPage) {
if (iPage < 0 || iPage >= m_PageList.GetSize())
return nullptr;
@@ -542,6 +546,10 @@ CPDF_Dictionary* CPDF_Document::GetPage(int iPage) {
return pPage;
}
+void CPDF_Document::SetPageObjNum(int iPage, uint32_t objNum) {
+ m_PageList.SetAt(iPage, objNum);
+}
+
int CPDF_Document::FindPageIndex(CPDF_Dictionary* pNode,
uint32_t& skip_count,
uint32_t objnum,
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_data_avail.cpp ('k') | core/fpdfapi/fpdf_parser/include/cpdf_document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698