| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ | 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ |
| 8 #define CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ | 8 #define CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ |
| 9 | 9 |
| 10 #include <functional> | 10 #include <functional> |
| 11 #include <memory> | 11 #include <memory> |
| 12 | 12 |
| 13 #include "core/fpdfapi/parser/cpdf_indirect_object_holder.h" | 13 #include "core/fpdfapi/parser/cpdf_indirect_object_holder.h" |
| 14 #include "core/fpdfapi/parser/cpdf_object.h" | 14 #include "core/fpdfapi/parser/cpdf_object.h" |
| 15 #include "core/fpdfdoc/cpdf_linklist.h" | 15 #include "core/fpdfdoc/cpdf_linklist.h" |
| 16 #include "core/fxcrt/cfx_string_pool_template.h" | 16 #include "core/fxcrt/cfx_string_pool_template.h" |
| 17 #include "core/fxcrt/cfx_weak_ptr.h" | 17 #include "core/fxcrt/cfx_weak_ptr.h" |
| 18 #include "core/fxcrt/fx_basic.h" | 18 #include "core/fxcrt/fx_basic.h" |
| 19 | 19 |
| 20 class CFX_Font; | 20 class CFX_Font; |
| 21 class CFX_Matrix; | 21 class CFX_Matrix; |
| 22 class CPDF_ColorSpace; | 22 class CPDF_ColorSpace; |
| 23 class CPDF_DocPageData; | 23 class CPDF_DocPageData; |
| 24 class CPDF_DocRenderData; | 24 class CPDF_DocRenderData; |
| 25 class CPDF_Font; | 25 class CPDF_Font; |
| 26 class CPDF_FontEncoding; | 26 class CPDF_FontEncoding; |
| 27 class CPDF_IccProfile; | 27 class CPDF_IccProfile; |
| 28 class CPDF_Image; | 28 class CPDF_Image; |
| 29 class CPDF_Linearized; |
| 29 class CPDF_Parser; | 30 class CPDF_Parser; |
| 30 class CPDF_Pattern; | 31 class CPDF_Pattern; |
| 31 class CPDF_StreamAcc; | 32 class CPDF_StreamAcc; |
| 32 class JBig2_DocumentContext; | 33 class JBig2_DocumentContext; |
| 33 | 34 |
| 34 #define FPDFPERM_PRINT 0x0004 | 35 #define FPDFPERM_PRINT 0x0004 |
| 35 #define FPDFPERM_MODIFY 0x0008 | 36 #define FPDFPERM_MODIFY 0x0008 |
| 36 #define FPDFPERM_EXTRACT 0x0010 | 37 #define FPDFPERM_EXTRACT 0x0010 |
| 37 #define FPDFPERM_ANNOT_FORM 0x0020 | 38 #define FPDFPERM_ANNOT_FORM 0x0020 |
| 38 #define FPDFPERM_FILL_FORM 0x0100 | 39 #define FPDFPERM_FILL_FORM 0x0100 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 79 |
| 79 CPDF_Pattern* LoadPattern(CPDF_Object* pObj, | 80 CPDF_Pattern* LoadPattern(CPDF_Object* pObj, |
| 80 bool bShading, | 81 bool bShading, |
| 81 const CFX_Matrix& matrix); | 82 const CFX_Matrix& matrix); |
| 82 | 83 |
| 83 CPDF_Image* LoadImageF(CPDF_Object* pObj); | 84 CPDF_Image* LoadImageF(CPDF_Object* pObj); |
| 84 CPDF_StreamAcc* LoadFontFile(CPDF_Stream* pStream); | 85 CPDF_StreamAcc* LoadFontFile(CPDF_Stream* pStream); |
| 85 CPDF_IccProfile* LoadIccProfile(CPDF_Stream* pStream); | 86 CPDF_IccProfile* LoadIccProfile(CPDF_Stream* pStream); |
| 86 | 87 |
| 87 void LoadDoc(); | 88 void LoadDoc(); |
| 88 void LoadLinearizedDoc(CPDF_Dictionary* pLinearizationParams); | 89 void LoadLinearizedDoc(const CPDF_Linearized* pLinearizationParams); |
| 89 void LoadPages(); | 90 void LoadPages(); |
| 90 | 91 |
| 91 void CreateNewDoc(); | 92 void CreateNewDoc(); |
| 92 CPDF_Dictionary* CreateNewPage(int iPage); | 93 CPDF_Dictionary* CreateNewPage(int iPage); |
| 93 | 94 |
| 94 CPDF_Font* AddStandardFont(const FX_CHAR* font, CPDF_FontEncoding* pEncoding); | 95 CPDF_Font* AddStandardFont(const FX_CHAR* font, CPDF_FontEncoding* pEncoding); |
| 95 CPDF_Font* AddFont(CFX_Font* pFont, int charset, bool bVert); | 96 CPDF_Font* AddFont(CFX_Font* pFont, int charset, bool bVert); |
| 96 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ | 97 #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ |
| 97 CPDF_Font* AddWindowsFont(LOGFONTA* pLogFont, | 98 CPDF_Font* AddWindowsFont(LOGFONTA* pLogFont, |
| 98 bool bVert, | 99 bool bVert, |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 // TODO(thestig): Figure out why this cannot be a std::unique_ptr. | 147 // TODO(thestig): Figure out why this cannot be a std::unique_ptr. |
| 147 CPDF_DocPageData* m_pDocPage; | 148 CPDF_DocPageData* m_pDocPage; |
| 148 std::unique_ptr<CPDF_DocRenderData> m_pDocRender; | 149 std::unique_ptr<CPDF_DocRenderData> m_pDocRender; |
| 149 std::unique_ptr<JBig2_DocumentContext> m_pCodecContext; | 150 std::unique_ptr<JBig2_DocumentContext> m_pCodecContext; |
| 150 std::unique_ptr<CPDF_LinkList> m_pLinksContext; | 151 std::unique_ptr<CPDF_LinkList> m_pLinksContext; |
| 151 CFX_ArrayTemplate<uint32_t> m_PageList; | 152 CFX_ArrayTemplate<uint32_t> m_PageList; |
| 152 CFX_WeakPtr<CFX_ByteStringPool> m_pByteStringPool; | 153 CFX_WeakPtr<CFX_ByteStringPool> m_pByteStringPool; |
| 153 }; | 154 }; |
| 154 | 155 |
| 155 #endif // CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ | 156 #endif // CORE_FPDFAPI_PARSER_CPDF_DOCUMENT_H_ |
| OLD | NEW |