summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_parser/cpdf_document.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-09-20 12:35:36 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-20 12:35:36 -0700
commit23e173ad2c48e2683cd6e5f76da3fa188d85bcb8 (patch)
tree15eb27d28b96713b49974d1d2fd9428874c11346 /core/fpdfapi/fpdf_parser/cpdf_document.cpp
parent9f206f05eccf51089fe8a30bf52dc063ea5e2633 (diff)
downloadpdfium-23e173ad2c48e2683cd6e5f76da3fa188d85bcb8.tar.xz
CPDF_Document and CPDF_DataAvail are no longer friends
Remove the friendship between these two classes and replace with accessor methods. Review-Url: https://codereview.chromium.org/2355813002
Diffstat (limited to 'core/fpdfapi/fpdf_parser/cpdf_document.cpp')
-rw-r--r--core/fpdfapi/fpdf_parser/cpdf_document.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.cpp b/core/fpdfapi/fpdf_parser/cpdf_document.cpp
index d3909ceaec..020e3544e9 100644
--- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp
+++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp
@@ -512,6 +512,10 @@ CPDF_Dictionary* CPDF_Document::GetPagesDict() const {
return pRoot ? pRoot->GetDictFor("Pages") : nullptr;
}
+bool CPDF_Document::IsPageLoaded(int iPage) const {
+ return !!m_PageList.GetAt(iPage);
+}
+
CPDF_Dictionary* CPDF_Document::GetPage(int iPage) {
if (iPage < 0 || iPage >= m_PageList.GetSize())
return nullptr;
@@ -541,6 +545,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,