Merge to XFA: Kill CFX_Object.
[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 _FPDF_EDITINT_
8 #define _FPDF_EDITINT_
9 class CPDF_ObjectStream 
10 {
11 public:
12     CPDF_ObjectStream();
13
14     FX_BOOL                             Start();
15
16     FX_INT32                    CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_Object *pObj);
17     FX_INT32                    CompressIndirectObject(FX_DWORD dwObjNum, FX_LPCBYTE pBuffer, FX_DWORD dwSize);
18
19     FX_FILESIZE                 End(CPDF_Creator* pCreator);
20
21     CFX_DWordArray              m_ObjNumArray;
22
23     CFX_ByteTextBuf             m_Buffer;
24     FX_DWORD                    m_dwObjNum;
25     FX_INT32                    m_index;
26 protected:
27
28     CFX_DWordArray              m_OffsetArray;
29 };
30 class CPDF_XRefStream 
31 {
32 public:
33
34     CPDF_XRefStream();
35
36     FX_BOOL                             Start();
37
38     FX_INT32                    CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_Object *pObj, CPDF_Creator *pCreator);
39
40     FX_INT32                    CompressIndirectObject(FX_DWORD dwObjNum, FX_LPCBYTE pBuffer, FX_DWORD dwSize, CPDF_Creator *pCreator);
41
42     FX_BOOL                             End(CPDF_Creator *pCreator, FX_BOOL bEOF = FALSE);
43     FX_BOOL                             AddObjectNumberToIndexArray(FX_DWORD objnum);
44     FX_BOOL                             EndXRefStream(CPDF_Creator* pCreator);
45
46
47     CFX_DWordArray              m_IndexArray;
48
49     FX_FILESIZE                 m_PrevOffset;
50     FX_DWORD                    m_dwTempObjNum;
51
52 protected:
53     FX_INT32                    EndObjectStream(CPDF_Creator *pCreator, FX_BOOL bEOF = TRUE);
54     FX_BOOL                             GenerateXRefStream(CPDF_Creator* pCreator, FX_BOOL bEOF);
55     FX_INT32                    m_iSeg;
56     CPDF_ObjectStream   m_ObjStream;
57     CFX_ByteTextBuf             m_Buffer;
58 };
59 #endif