diff options
author | dsinclair <dsinclair@chromium.org> | 2016-09-20 13:05:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-20 13:05:23 -0700 |
commit | 0d726c0c9931979d9b0594d56b52c861e08e09ba (patch) | |
tree | 05f1a5fe612b31075e5141688dcc822e97c97e9a /core/fpdfapi/fpdf_parser | |
parent | 8bd542690c3a0f56e20cd46e96c1ed7fed480690 (diff) | |
download | pdfium-0d726c0c9931979d9b0594d56b52c861e08e09ba.tar.xz |
CPDF_Document friend cleanup
Remove CPDF_Creator and CPDF_Parser as friends of CPDF_Document. Move all
member variables to the private section, and add CPDF_TestDocument as a
private friend.
Review-Url: https://codereview.chromium.org/2349353003
Diffstat (limited to 'core/fpdfapi/fpdf_parser')
-rw-r--r-- | core/fpdfapi/fpdf_parser/include/cpdf_document.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/core/fpdfapi/fpdf_parser/include/cpdf_document.h b/core/fpdfapi/fpdf_parser/include/cpdf_document.h index 4bbbb277d4..1cc32dc3b2 100644 --- a/core/fpdfapi/fpdf_parser/include/cpdf_document.h +++ b/core/fpdfapi/fpdf_parser/include/cpdf_document.h @@ -97,9 +97,8 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { FX_BOOL bTranslateName = FALSE); #endif - protected: - friend class CPDF_Creator; - friend class CPDF_Parser; + private: + friend class CPDF_TestDocument; // Retrieve page count information by getting count value from the tree nodes int RetrievePageCount() const; @@ -113,6 +112,15 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { int& index, int level = 0); CPDF_Object* ParseIndirectObject(uint32_t objnum) override; + void LoadDocInternal(); + size_t CalculateEncodingDict(int charset, CPDF_Dictionary* pBaseDict); + CPDF_Dictionary* GetPagesDict() const; + CPDF_Dictionary* ProcessbCJK( + CPDF_Dictionary* pBaseDict, + int charset, + FX_BOOL bVert, + CFX_ByteString basefont, + std::function<void(FX_WCHAR, FX_WCHAR, CPDF_Array*)> Insert); std::unique_ptr<CPDF_Parser> m_pParser; CPDF_Dictionary* m_pRootDict; @@ -125,18 +133,6 @@ class CPDF_Document : public CPDF_IndirectObjectHolder { std::unique_ptr<CPDF_DocRenderData> m_pDocRender; std::unique_ptr<JBig2_DocumentContext> m_pCodecContext; std::unique_ptr<CPDF_LinkList> m_pLinksContext; - - private: - void LoadDocInternal(); - size_t CalculateEncodingDict(int charset, CPDF_Dictionary* pBaseDict); - CPDF_Dictionary* GetPagesDict() const; - CPDF_Dictionary* ProcessbCJK( - CPDF_Dictionary* pBaseDict, - int charset, - FX_BOOL bVert, - CFX_ByteString basefont, - std::function<void(FX_WCHAR, FX_WCHAR, CPDF_Array*)> Insert); - CFX_ArrayTemplate<uint32_t> m_PageList; }; |