From 23e173ad2c48e2683cd6e5f76da3fa188d85bcb8 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Tue, 20 Sep 2016 12:35:36 -0700 Subject: 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 --- core/fpdfapi/fpdf_parser/include/cpdf_document.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'core/fpdfapi/fpdf_parser/include/cpdf_document.h') diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_document.h b/core/fpdfapi/fpdf_parser/include/cpdf_document.h index 5f3b2d277a..83567cd85a 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_document.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_document.h @@ -51,11 +51,14 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { void DeletePage(int iPage); int GetPageCount() const; + bool IsPageLoaded(int iPage) const; CPDF_Dictionary* GetPage(int iPage); int GetPageIndex(uint32_t objnum); uint32_t GetUserPermissions() const; CPDF_DocPageData* GetPageData() const { return m_pDocPage; } + void SetPageObjNum(int iPage, uint32_t objNum); + std::unique_ptr* CodecContext() { return &m_pCodecContext; } @@ -97,7 +100,6 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { protected: friend class CPDF_Creator; friend class CPDF_Parser; - friend class CPDF_DataAvail; friend class CPDF_OCContext; // Retrieve page count information by getting count value from the tree nodes @@ -119,7 +121,6 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { bool m_bLinearized; int m_iFirstPageNo; uint32_t m_dwFirstPageObjNum; - CFX_ArrayTemplate m_PageList; // TODO(thestig): Figure out why this cannot be a std::unique_ptr. CPDF_DocPageData* m_pDocPage; std::unique_ptr m_pDocRender; @@ -136,6 +137,8 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { FX_BOOL bVert, CFX_ByteString basefont, std::function Insert); + + CFX_ArrayTemplate m_PageList; }; #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_DOCUMENT_H_ -- cgit v1.2.3