OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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_FPDF_EDIT_INCLUDE_CPDF_CREATOR_H_ | 7 #ifndef CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_CREATOR_H_ |
8 #define CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_CREATOR_H_ | 8 #define CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_CREATOR_H_ |
9 | 9 |
10 #include "core/fxcrt/include/fx_basic.h" | 10 #include "core/fxcrt/include/fx_basic.h" |
11 | 11 |
12 class CPDF_Array; | 12 class CPDF_Array; |
| 13 class CPDF_CryptoHandler; |
13 class CPDF_Dictionary; | 14 class CPDF_Dictionary; |
14 class CPDF_Document; | 15 class CPDF_Document; |
15 class CPDF_Object; | 16 class CPDF_Object; |
16 class CPDF_Parser; | 17 class CPDF_Parser; |
17 class CPDF_XRefStream; | 18 class CPDF_XRefStream; |
18 class IPDF_CryptoHandler; | |
19 | 19 |
20 #define FPDFCREATE_INCREMENTAL 1 | 20 #define FPDFCREATE_INCREMENTAL 1 |
21 #define FPDFCREATE_NO_ORIGINAL 2 | 21 #define FPDFCREATE_NO_ORIGINAL 2 |
22 #define FPDFCREATE_PROGRESSIVE 4 | 22 #define FPDFCREATE_PROGRESSIVE 4 |
23 #define FPDFCREATE_OBJECTSTREAM 8 | 23 #define FPDFCREATE_OBJECTSTREAM 8 |
24 | 24 |
25 CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& buf, const CPDF_Object* pObj); | 25 CFX_ByteTextBuf& operator<<(CFX_ByteTextBuf& buf, const CPDF_Object* pObj); |
26 | 26 |
27 class CPDF_Creator { | 27 class CPDF_Creator { |
28 public: | 28 public: |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 const CPDF_Object* pObj, | 62 const CPDF_Object* pObj, |
63 FX_BOOL bEncrypt = TRUE); | 63 FX_BOOL bEncrypt = TRUE); |
64 int32_t WriteIndirectObjectToStream(const CPDF_Object* pObj); | 64 int32_t WriteIndirectObjectToStream(const CPDF_Object* pObj); |
65 int32_t WriteIndirectObj(uint32_t objnum, const CPDF_Object* pObj); | 65 int32_t WriteIndirectObj(uint32_t objnum, const CPDF_Object* pObj); |
66 int32_t WriteIndirectObjectToStream(uint32_t objnum, | 66 int32_t WriteIndirectObjectToStream(uint32_t objnum, |
67 const uint8_t* pBuffer, | 67 const uint8_t* pBuffer, |
68 uint32_t dwSize); | 68 uint32_t dwSize); |
69 | 69 |
70 int32_t WriteStream(const CPDF_Object* pStream, | 70 int32_t WriteStream(const CPDF_Object* pStream, |
71 uint32_t objnum, | 71 uint32_t objnum, |
72 IPDF_CryptoHandler* pCrypto); | 72 CPDF_CryptoHandler* pCrypto); |
73 | 73 |
74 CPDF_Document* m_pDocument; | 74 CPDF_Document* m_pDocument; |
75 CPDF_Parser* m_pParser; | 75 CPDF_Parser* m_pParser; |
76 FX_BOOL m_bCompress; | 76 FX_BOOL m_bCompress; |
77 FX_BOOL m_bSecurityChanged; | 77 FX_BOOL m_bSecurityChanged; |
78 CPDF_Dictionary* m_pEncryptDict; | 78 CPDF_Dictionary* m_pEncryptDict; |
79 uint32_t m_dwEnryptObjNum; | 79 uint32_t m_dwEnryptObjNum; |
80 FX_BOOL m_bEncryptCloned; | 80 FX_BOOL m_bEncryptCloned; |
81 FX_BOOL m_bStandardSecurity; | 81 FX_BOOL m_bStandardSecurity; |
82 IPDF_CryptoHandler* m_pCryptoHandler; | 82 CPDF_CryptoHandler* m_pCryptoHandler; |
83 FX_BOOL m_bNewCrypto; | 83 FX_BOOL m_bNewCrypto; |
84 FX_BOOL m_bEncryptMetadata; | 84 FX_BOOL m_bEncryptMetadata; |
85 CPDF_Object* m_pMetadata; | 85 CPDF_Object* m_pMetadata; |
86 CPDF_XRefStream* m_pXRefStream; | 86 CPDF_XRefStream* m_pXRefStream; |
87 int32_t m_ObjectStreamSize; | 87 int32_t m_ObjectStreamSize; |
88 uint32_t m_dwLastObjNum; | 88 uint32_t m_dwLastObjNum; |
89 CFX_FileBufferArchive m_File; | 89 CFX_FileBufferArchive m_File; |
90 FX_FILESIZE m_Offset; | 90 FX_FILESIZE m_Offset; |
91 int32_t m_iStage; | 91 int32_t m_iStage; |
92 uint32_t m_dwFlags; | 92 uint32_t m_dwFlags; |
93 FX_POSITION m_Pos; | 93 FX_POSITION m_Pos; |
94 FX_FILESIZE m_XrefStart; | 94 FX_FILESIZE m_XrefStart; |
95 CFX_FileSizeListArray m_ObjectOffset; | 95 CFX_FileSizeListArray m_ObjectOffset; |
96 CFX_ArrayTemplate<uint32_t> m_NewObjNumArray; | 96 CFX_ArrayTemplate<uint32_t> m_NewObjNumArray; |
97 CPDF_Array* m_pIDArray; | 97 CPDF_Array* m_pIDArray; |
98 int32_t m_FileVersion; | 98 int32_t m_FileVersion; |
99 }; | 99 }; |
100 | 100 |
101 #endif // CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_CREATOR_H_ | 101 #endif // CORE_FPDFAPI_FPDF_EDIT_INCLUDE_CPDF_CREATOR_H_ |
OLD | NEW |