Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: core/include/fpdfapi/fpdf_serial.h

Issue 1258093002: FX Bool considered harmful, part 3 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/include/fpdfapi/fpdf_resource.h ('k') | core/include/fpdfdoc/fpdf_ap.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_INCLUDE_FPDFAPI_FPDF_SERIAL_H_ 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_SERIAL_H_
8 #define CORE_INCLUDE_FPDFAPI_FPDF_SERIAL_H_ 8 #define CORE_INCLUDE_FPDFAPI_FPDF_SERIAL_H_
9 9
10 #include "fpdf_page.h" 10 #include "fpdf_page.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 class CPDF_Creator 110 class CPDF_Creator
111 { 111 {
112 public: 112 public:
113 113
114 CPDF_Creator(CPDF_Document* pDoc); 114 CPDF_Creator(CPDF_Document* pDoc);
115 115
116 ~CPDF_Creator(); 116 ~CPDF_Creator();
117 117
118 void RemoveSecurity(); 118 void RemoveSecurity();
119 119
120 FX_BOOL» » » » Create(const FX_WCHAR* filename, FX_DWOR D flags = 0); 120 bool» » » » Create(const FX_WCHAR* filename, FX_DWOR D flags = 0);
121 121
122 FX_BOOL» » » » Create(const FX_CHAR* filename, FX_DWORD flags = 0); 122 bool» » » » Create(const FX_CHAR* filename, FX_DWORD flags = 0);
123 123
124 FX_BOOL» » » » Create(IFX_StreamWrite* pFile, FX_DWORD flags = 0); 124 bool» » » » Create(IFX_StreamWrite* pFile, FX_DWORD flags = 0);
125 125
126 int32_t Continue(IFX_Pause *pPause = NULL); 126 int32_t Continue(IFX_Pause *pPause = NULL);
127 127
128 FX_BOOL» » » » SetFileVersion(int32_t fileVersion = 17) ; 128 bool» » » » SetFileVersion(int32_t fileVersion = 17) ;
129 protected: 129 protected:
130 130
131 CPDF_Document* m_pDocument; 131 CPDF_Document* m_pDocument;
132 132
133 CPDF_Parser* m_pParser; 133 CPDF_Parser* m_pParser;
134 134
135 FX_BOOL» » » » m_bCompress; 135 bool» » » » m_bCompress;
136 136
137 FX_BOOL» » » » m_bSecurityChanged; 137 bool» » » » m_bSecurityChanged;
138 138
139 CPDF_Dictionary* m_pEncryptDict; 139 CPDF_Dictionary* m_pEncryptDict;
140 FX_DWORD m_dwEnryptObjNum; 140 FX_DWORD m_dwEnryptObjNum;
141 FX_BOOL» » » » m_bEncryptCloned; 141 bool» » » » m_bEncryptCloned;
142 142
143 FX_BOOL» » » » m_bStandardSecurity; 143 bool» » » » m_bStandardSecurity;
144 144
145 CPDF_CryptoHandler* m_pCryptoHandler; 145 CPDF_CryptoHandler* m_pCryptoHandler;
146 FX_BOOL» » » » m_bNewCrypto; 146 bool» » » » m_bNewCrypto;
147 147
148 FX_BOOL» » » » m_bEncryptMetadata; 148 bool» » » » m_bEncryptMetadata;
149 149
150 CPDF_Object* m_pMetadata; 150 CPDF_Object* m_pMetadata;
151 151
152 CPDF_XRefStream* m_pXRefStream; 152 CPDF_XRefStream* m_pXRefStream;
153 153
154 int32_t m_ObjectStreamSize; 154 int32_t m_ObjectStreamSize;
155 155
156 FX_DWORD m_dwLastObjNum; 156 FX_DWORD m_dwLastObjNum;
157 FX_BOOL» » » » Create(FX_DWORD flags); 157 bool» » » » Create(FX_DWORD flags);
158 void ResetStandardSecurity(); 158 void ResetStandardSecurity();
159 void Clear(); 159 void Clear();
160 int32_t WriteDoc_Stage1(IFX_Pause *pPause); 160 int32_t WriteDoc_Stage1(IFX_Pause *pPause);
161 int32_t WriteDoc_Stage2(IFX_Pause *pPause); 161 int32_t WriteDoc_Stage2(IFX_Pause *pPause);
162 int32_t WriteDoc_Stage3(IFX_Pause *pPause); 162 int32_t WriteDoc_Stage3(IFX_Pause *pPause);
163 int32_t WriteDoc_Stage4(IFX_Pause *pPause); 163 int32_t WriteDoc_Stage4(IFX_Pause *pPause);
164 164
165 CFX_FileBufferArchive m_File; 165 CFX_FileBufferArchive m_File;
166 166
167 FX_FILESIZE m_Offset; 167 FX_FILESIZE m_Offset;
168 void InitOldObjNumOffsets(); 168 void InitOldObjNumOffsets();
169 void InitNewObjNumOffsets(); 169 void InitNewObjNumOffsets();
170 void AppendNewObjNum(FX_DWORD objbum); 170 void AppendNewObjNum(FX_DWORD objbum);
171 int32_t WriteOldIndirectObject(FX_DWORD objnum); 171 int32_t WriteOldIndirectObject(FX_DWORD objnum);
172 int32_t WriteOldObjs(IFX_Pause *pPause); 172 int32_t WriteOldObjs(IFX_Pause *pPause);
173 int32_t» » » WriteNewObjs(FX_BOOL bIncremental, IFX_Pause *pP ause); 173 int32_t» » » WriteNewObjs(bool bIncremental, IFX_Pause *pPaus e);
174 int32_t WriteIndirectObj(const CPDF_Object* pObj); 174 int32_t WriteIndirectObj(const CPDF_Object* pObj);
175 int32_t» » » WriteDirectObj(FX_DWORD objnum, const CPDF_Objec t* pObj, FX_BOOL bEncrypt = TRUE); 175 int32_t» » » WriteDirectObj(FX_DWORD objnum, const CPDF_Objec t* pObj, bool bEncrypt = true);
176 int32_t WriteIndirectObjectToStream(const CPDF_Object* p Obj); 176 int32_t WriteIndirectObjectToStream(const CPDF_Object* p Obj);
177 int32_t WriteIndirectObj(FX_DWORD objnum, const CPDF_Obj ect* pObj); 177 int32_t WriteIndirectObj(FX_DWORD objnum, const CPDF_Obj ect* pObj);
178 int32_t WriteIndirectObjectToStream(FX_DWORD objnum, con st uint8_t* pBuffer, FX_DWORD dwSize); 178 int32_t WriteIndirectObjectToStream(FX_DWORD objnum, con st uint8_t* pBuffer, FX_DWORD dwSize);
179 int32_t AppendObjectNumberToXRef(FX_DWORD objnum); 179 int32_t AppendObjectNumberToXRef(FX_DWORD objnum);
180 void» » » » InitID(FX_BOOL bDefault = TRUE); 180 void» » » » InitID(bool bDefault = true);
181 int32_t WriteStream(const CPDF_Object* pStream, FX_DWORD objnum, CPDF_CryptoHandler* pCrypto); 181 int32_t WriteStream(const CPDF_Object* pStream, FX_DWORD objnum, CPDF_CryptoHandler* pCrypto);
182 182
183 int32_t m_iStage; 183 int32_t m_iStage;
184 FX_DWORD m_dwFlags; 184 FX_DWORD m_dwFlags;
185 FX_POSITION m_Pos; 185 FX_POSITION m_Pos;
186 FX_FILESIZE m_XrefStart; 186 FX_FILESIZE m_XrefStart;
187 187
188 CFX_FileSizeListArray m_ObjectOffset; 188 CFX_FileSizeListArray m_ObjectOffset;
189 189
190 CFX_DWordListArray m_ObjectSize; 190 CFX_DWordListArray m_ObjectSize;
191 CFX_DWordArray m_NewObjNumArray; 191 CFX_DWordArray m_NewObjNumArray;
192 192
193 CPDF_Array* m_pIDArray; 193 CPDF_Array* m_pIDArray;
194 194
195 int32_t m_FileVersion; 195 int32_t m_FileVersion;
196 friend class CPDF_ObjectStream; 196 friend class CPDF_ObjectStream;
197 friend class CPDF_XRefStream; 197 friend class CPDF_XRefStream;
198 }; 198 };
199 199
200 #endif // CORE_INCLUDE_FPDFAPI_FPDF_SERIAL_H_ 200 #endif // CORE_INCLUDE_FPDFAPI_FPDF_SERIAL_H_
OLDNEW
« no previous file with comments | « core/include/fpdfapi/fpdf_resource.h ('k') | core/include/fpdfdoc/fpdf_ap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698