Cleanup CFX_UnicodeEncoding and remove IFX_FontEncoding.
[pdfium.git] / core / src / fpdfapi / fpdf_edit / editint.h
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_SRC_FPDFAPI_FPDF_EDIT_EDITINT_H_
8 #define CORE_SRC_FPDFAPI_FPDF_EDIT_EDITINT_H_
9
10 class CPDF_ObjectStream {
11  public:
12   CPDF_ObjectStream();
13
14   FX_BOOL Start();
15
16   int32_t CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_Object* pObj);
17   int32_t CompressIndirectObject(FX_DWORD dwObjNum,
18                                  const uint8_t* pBuffer,
19                                  FX_DWORD dwSize);
20
21   FX_FILESIZE End(CPDF_Creator* pCreator);
22
23   CFX_DWordArray m_ObjNumArray;
24
25   CFX_ByteTextBuf m_Buffer;
26   FX_DWORD m_dwObjNum;
27   int32_t m_index;
28
29  protected:
30   CFX_DWordArray m_OffsetArray;
31 };
32 class CPDF_XRefStream {
33  public:
34   CPDF_XRefStream();
35
36   FX_BOOL Start();
37
38   int32_t CompressIndirectObject(FX_DWORD dwObjNum,
39                                  const CPDF_Object* pObj,
40                                  CPDF_Creator* pCreator);
41
42   int32_t CompressIndirectObject(FX_DWORD dwObjNum,
43                                  const uint8_t* pBuffer,
44                                  FX_DWORD dwSize,
45                                  CPDF_Creator* pCreator);
46
47   FX_BOOL End(CPDF_Creator* pCreator, FX_BOOL bEOF = FALSE);
48   FX_BOOL AddObjectNumberToIndexArray(FX_DWORD objnum);
49   FX_BOOL EndXRefStream(CPDF_Creator* pCreator);
50
51   CFX_DWordArray m_IndexArray;
52
53   FX_FILESIZE m_PrevOffset;
54   FX_DWORD m_dwTempObjNum;
55
56  protected:
57   int32_t EndObjectStream(CPDF_Creator* pCreator, FX_BOOL bEOF = TRUE);
58   FX_BOOL GenerateXRefStream(CPDF_Creator* pCreator, FX_BOOL bEOF);
59   int32_t m_iSeg;
60   CPDF_ObjectStream m_ObjStream;
61   CFX_ByteTextBuf m_Buffer;
62 };
63
64 #endif  // CORE_SRC_FPDFAPI_FPDF_EDIT_EDITINT_H_