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_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ | 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ |
8 #define CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ | 8 #define CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ |
9 | 9 |
10 #include "../fxcrt/fx_coordinates.h" | 10 #include "../fxcrt/fx_coordinates.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 FX_DWORD GetObjNum() const | 50 FX_DWORD GetObjNum() const |
51 { | 51 { |
52 return m_ObjNum; | 52 return m_ObjNum; |
53 } | 53 } |
54 | 54 |
55 FX_DWORD GetGenNum() const | 55 FX_DWORD GetGenNum() const |
56 { | 56 { |
57 return m_GenNum; | 57 return m_GenNum; |
58 } | 58 } |
59 | 59 |
60 FX_BOOL IsIdentical(CPDF_Object* pObj) const; | 60 bool IsIdentical(CPDF_Object* pObj) const; |
61 | 61 |
62 CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const; | 62 CPDF_Object* Clone(bool bDirect = false) const; |
63 | 63 |
64 CPDF_Object* CloneRef(CPDF_IndirectObjects* pObjs) co
nst; | 64 CPDF_Object* CloneRef(CPDF_IndirectObjects* pObjs) co
nst; |
65 | 65 |
66 CPDF_Object* GetDirect() const; | 66 CPDF_Object* GetDirect() const; |
67 | 67 |
68 void Release(); | 68 void Release(); |
69 | 69 |
70 CFX_ByteString GetString() const; | 70 CFX_ByteString GetString() const; |
71 | 71 |
72 CFX_ByteStringC GetConstString() const; | 72 CFX_ByteStringC GetConstString() const; |
73 | 73 |
74 CFX_WideString GetUnicodeText(CFX_CharMap* pCharMap = N
ULL) const; | 74 CFX_WideString GetUnicodeText(CFX_CharMap* pCharMap = N
ULL) const; |
75 FX_FLOAT GetNumber() const; | 75 FX_FLOAT GetNumber() const; |
76 | 76 |
77 FX_FLOAT GetNumber16() const; | 77 FX_FLOAT GetNumber16() const; |
78 | 78 |
79 int GetInteger() const; | 79 int GetInteger() const; |
80 | 80 |
81 CPDF_Dictionary* GetDict() const; | 81 CPDF_Dictionary* GetDict() const; |
82 | 82 |
83 CPDF_Array* GetArray() const; | 83 CPDF_Array* GetArray() const; |
84 | 84 |
85 void SetString(const CFX_ByteString& str); | 85 void SetString(const CFX_ByteString& str); |
86 | 86 |
87 void SetUnicodeText(const FX_WCHAR* pUnicodes
, int len = -1); | 87 void SetUnicodeText(const FX_WCHAR* pUnicodes
, int len = -1); |
88 | 88 |
89 int GetDirectType() const; | 89 int GetDirectType() const; |
90 | 90 |
91 FX_BOOL IsModified() const | 91 bool IsModified() const |
92 { | 92 { |
93 return FALSE; | 93 return false; |
94 } | 94 } |
95 protected: | 95 protected: |
96 CPDF_Object(FX_DWORD type) : m_Type(type), m_ObjNum(0), m_GenNum(0) { } | 96 CPDF_Object(FX_DWORD type) : m_Type(type), m_ObjNum(0), m_GenNum(0) { } |
97 ~CPDF_Object() { } | 97 ~CPDF_Object() { } |
98 void Destroy(); | 98 void Destroy(); |
99 | 99 |
100 static const int OBJECT_REF_MAX_DEPTH = 128; | 100 static const int OBJECT_REF_MAX_DEPTH = 128; |
101 static int s_nCurRefDepth; | 101 static int s_nCurRefDepth; |
102 FX_DWORD m_Type; | 102 FX_DWORD m_Type; |
103 FX_DWORD m_ObjNum; | 103 FX_DWORD m_ObjNum; |
104 FX_DWORD m_GenNum; | 104 FX_DWORD m_GenNum; |
105 | 105 |
106 friend class CPDF_IndirectObjects; | 106 friend class CPDF_IndirectObjects; |
107 friend class CPDF_Parser; | 107 friend class CPDF_Parser; |
108 friend class CPDF_SyntaxParser; | 108 friend class CPDF_SyntaxParser; |
109 private: | 109 private: |
110 CPDF_Object(const CPDF_Object& src) {} | 110 CPDF_Object(const CPDF_Object& src) {} |
111 CPDF_Object* CloneInternal(FX_BOOL bDirect, CFX_MapPtrToPtr* visited) const; | 111 CPDF_Object* CloneInternal(bool bDirect, CFX_MapPtrToPtr* visited) const; |
112 }; | 112 }; |
113 class CPDF_Boolean : public CPDF_Object | 113 class CPDF_Boolean : public CPDF_Object |
114 { | 114 { |
115 public: | 115 public: |
116 | 116 |
117 static CPDF_Boolean*» Create(FX_BOOL value) | 117 static CPDF_Boolean*» Create(bool value) |
118 { | 118 { |
119 return new CPDF_Boolean(value); | 119 return new CPDF_Boolean(value); |
120 } | 120 } |
121 | 121 |
122 CPDF_Boolean() : CPDF_Object(PDFOBJ_BOOLEAN), m_bValue(false) { } | 122 CPDF_Boolean() : CPDF_Object(PDFOBJ_BOOLEAN), m_bValue(false) { } |
123 CPDF_Boolean(FX_BOOL value) : CPDF_Object(PDFOBJ_BOOLEAN), m_bValue(value) {
} | 123 CPDF_Boolean(bool value) : CPDF_Object(PDFOBJ_BOOLEAN), m_bValue(value) { } |
124 | 124 |
125 FX_BOOL» » » » » Identical(CPDF_Boolean* pOther)
const | 125 bool» » » » » Identical(CPDF_Boolean* pOther)
const |
126 { | 126 { |
127 return m_bValue == pOther->m_bValue; | 127 return m_bValue == pOther->m_bValue; |
128 } | 128 } |
129 protected: | 129 protected: |
130 | 130 |
131 FX_BOOL» » » » » m_bValue; | 131 bool» » » » » m_bValue; |
132 friend class CPDF_Object; | 132 friend class CPDF_Object; |
133 }; | 133 }; |
134 class CPDF_Number : public CPDF_Object | 134 class CPDF_Number : public CPDF_Object |
135 { | 135 { |
136 public: | 136 public: |
137 | 137 |
138 static CPDF_Number* Create(int value) | 138 static CPDF_Number* Create(int value) |
139 { | 139 { |
140 return new CPDF_Number(value); | 140 return new CPDF_Number(value); |
141 } | 141 } |
142 | 142 |
143 static CPDF_Number* Create(FX_FLOAT value) | 143 static CPDF_Number* Create(FX_FLOAT value) |
144 { | 144 { |
145 return new CPDF_Number(value); | 145 return new CPDF_Number(value); |
146 } | 146 } |
147 | 147 |
148 static CPDF_Number* Create(const CFX_ByteStringC& str) | 148 static CPDF_Number* Create(const CFX_ByteStringC& str) |
149 { | 149 { |
150 return new CPDF_Number(str); | 150 return new CPDF_Number(str); |
151 } | 151 } |
152 | 152 |
153 static CPDF_Number*»» Create(FX_BOOL bInteger, void* pData) | 153 static CPDF_Number*»» Create(bool bInteger, void* pData) |
154 { | 154 { |
155 return new CPDF_Number(bInteger, pData); | 155 return new CPDF_Number(bInteger, pData); |
156 } | 156 } |
157 | 157 |
158 CPDF_Number() : CPDF_Object(PDFOBJ_NUMBER), m_bInteger(false), m_Integer(0)
{ } | 158 CPDF_Number() : CPDF_Object(PDFOBJ_NUMBER), m_bInteger(false), m_Integer(0)
{ } |
159 | 159 |
160 CPDF_Number(FX_BOOL bInteger, void* pData); | 160 CPDF_Number(bool bInteger, void* pData); |
161 | 161 |
162 CPDF_Number(int value); | 162 CPDF_Number(int value); |
163 | 163 |
164 CPDF_Number(FX_FLOAT value); | 164 CPDF_Number(FX_FLOAT value); |
165 | 165 |
166 CPDF_Number(const CFX_ByteStringC& str); | 166 CPDF_Number(const CFX_ByteStringC& str); |
167 | 167 |
168 FX_BOOL» » » » » Identical(CPDF_Number* pOther) c
onst; | 168 bool» » » » » Identical(CPDF_Number* pOther) c
onst; |
169 | 169 |
170 CFX_ByteString GetString() const; | 170 CFX_ByteString GetString() const; |
171 | 171 |
172 void SetString(const CFX_ByteStringC&
str); | 172 void SetString(const CFX_ByteStringC&
str); |
173 | 173 |
174 FX_BOOL» » » » » IsInteger() const | 174 bool» » » » » IsInteger() const |
175 { | 175 { |
176 return m_bInteger; | 176 return m_bInteger; |
177 } | 177 } |
178 | 178 |
179 int GetInteger() const | 179 int GetInteger() const |
180 { | 180 { |
181 return m_bInteger ? m_Integer : (int)m_Float; | 181 return m_bInteger ? m_Integer : (int)m_Float; |
182 } | 182 } |
183 | 183 |
184 FX_FLOAT GetNumber() const | 184 FX_FLOAT GetNumber() const |
185 { | 185 { |
186 return m_bInteger ? (FX_FLOAT)m_Integer : m_Float; | 186 return m_bInteger ? (FX_FLOAT)m_Integer : m_Float; |
187 } | 187 } |
188 | 188 |
189 void SetNumber(FX_FLOAT value); | 189 void SetNumber(FX_FLOAT value); |
190 | 190 |
191 FX_FLOAT GetNumber16() const | 191 FX_FLOAT GetNumber16() const |
192 { | 192 { |
193 return GetNumber(); | 193 return GetNumber(); |
194 } | 194 } |
195 | 195 |
196 FX_FLOAT GetFloat() const | 196 FX_FLOAT GetFloat() const |
197 { | 197 { |
198 return m_bInteger ? (FX_FLOAT)m_Integer : m_Float; | 198 return m_bInteger ? (FX_FLOAT)m_Integer : m_Float; |
199 } | 199 } |
200 protected: | 200 protected: |
201 | 201 |
202 FX_BOOL» » » » » m_bInteger; | 202 bool» » » » » m_bInteger; |
203 | 203 |
204 union { | 204 union { |
205 | 205 |
206 int m_Integer; | 206 int m_Integer; |
207 | 207 |
208 FX_FLOAT m_Float; | 208 FX_FLOAT m_Float; |
209 }; | 209 }; |
210 friend class CPDF_Object; | 210 friend class CPDF_Object; |
211 }; | 211 }; |
212 class CPDF_String : public CPDF_Object | 212 class CPDF_String : public CPDF_Object |
213 { | 213 { |
214 public: | 214 public: |
215 | 215 |
216 static CPDF_String*»» Create(const CFX_ByteString& str, FX_BOOL bHex =
FALSE) | 216 static CPDF_String*»» Create(const CFX_ByteString& str, bool bHex = fa
lse) |
217 { | 217 { |
218 return new CPDF_String(str, bHex); | 218 return new CPDF_String(str, bHex); |
219 } | 219 } |
220 | 220 |
221 static CPDF_String* Create(const CFX_WideString& str) | 221 static CPDF_String* Create(const CFX_WideString& str) |
222 { | 222 { |
223 return new CPDF_String(str); | 223 return new CPDF_String(str); |
224 } | 224 } |
225 | 225 |
226 CPDF_String() : CPDF_Object(PDFOBJ_STRING), m_bHex(FALSE) { } | 226 CPDF_String() : CPDF_Object(PDFOBJ_STRING), m_bHex(false) { } |
227 | 227 |
228 CPDF_String(const CFX_ByteString& str, FX_BOOL bHex = FALSE) | 228 CPDF_String(const CFX_ByteString& str, bool bHex = false) |
229 : CPDF_Object(PDFOBJ_STRING), m_String(str), m_bHex(bHex) { | 229 : CPDF_Object(PDFOBJ_STRING), m_String(str), m_bHex(bHex) { |
230 } | 230 } |
231 | 231 |
232 CPDF_String(const CFX_WideString& str); | 232 CPDF_String(const CFX_WideString& str); |
233 | 233 |
234 CFX_ByteString& GetString() | 234 CFX_ByteString& GetString() |
235 { | 235 { |
236 return m_String; | 236 return m_String; |
237 } | 237 } |
238 | 238 |
239 FX_BOOL» » » » » Identical(CPDF_String* pOther) c
onst | 239 bool» » » » » Identical(CPDF_String* pOther) c
onst |
240 { | 240 { |
241 return m_String == pOther->m_String; | 241 return m_String == pOther->m_String; |
242 } | 242 } |
243 | 243 |
244 FX_BOOL» » » » » IsHex() const | 244 bool» » » » » IsHex() const |
245 { | 245 { |
246 return m_bHex; | 246 return m_bHex; |
247 } | 247 } |
248 protected: | 248 protected: |
249 | 249 |
250 CFX_ByteString m_String; | 250 CFX_ByteString m_String; |
251 | 251 |
252 FX_BOOL» » » » » m_bHex; | 252 bool» » » » » m_bHex; |
253 friend class CPDF_Object; | 253 friend class CPDF_Object; |
254 }; | 254 }; |
255 class CPDF_Name : public CPDF_Object | 255 class CPDF_Name : public CPDF_Object |
256 { | 256 { |
257 public: | 257 public: |
258 | 258 |
259 static CPDF_Name* Create(const CFX_ByteString& str) | 259 static CPDF_Name* Create(const CFX_ByteString& str) |
260 { | 260 { |
261 return new CPDF_Name(str); | 261 return new CPDF_Name(str); |
262 } | 262 } |
(...skipping 10 matching lines...) Expand all Loading... |
273 | 273 |
274 CPDF_Name(const CFX_ByteString& str) : CPDF_Object(PDFOBJ_NAME), m_Name(str)
{ } | 274 CPDF_Name(const CFX_ByteString& str) : CPDF_Object(PDFOBJ_NAME), m_Name(str)
{ } |
275 CPDF_Name(const CFX_ByteStringC& str) : CPDF_Object(PDFOBJ_NAME), m_Name(str
) { } | 275 CPDF_Name(const CFX_ByteStringC& str) : CPDF_Object(PDFOBJ_NAME), m_Name(str
) { } |
276 CPDF_Name(const FX_CHAR* str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { } | 276 CPDF_Name(const FX_CHAR* str) : CPDF_Object(PDFOBJ_NAME), m_Name(str) { } |
277 | 277 |
278 CFX_ByteString& GetString() | 278 CFX_ByteString& GetString() |
279 { | 279 { |
280 return m_Name; | 280 return m_Name; |
281 } | 281 } |
282 | 282 |
283 FX_BOOL» » » » » Identical(CPDF_Name* pOther) con
st | 283 bool» » » » » Identical(CPDF_Name* pOther) con
st |
284 { | 284 { |
285 return m_Name == pOther->m_Name; | 285 return m_Name == pOther->m_Name; |
286 } | 286 } |
287 protected: | 287 protected: |
288 | 288 |
289 CFX_ByteString m_Name; | 289 CFX_ByteString m_Name; |
290 friend class CPDF_Object; | 290 friend class CPDF_Object; |
291 }; | 291 }; |
292 class CPDF_Array : public CPDF_Object | 292 class CPDF_Array : public CPDF_Object |
293 { | 293 { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 FX_FLOAT GetNumber16(FX_DWORD index) const | 371 FX_FLOAT GetNumber16(FX_DWORD index) const |
372 { | 372 { |
373 return GetNumber(index); | 373 return GetNumber(index); |
374 } | 374 } |
375 | 375 |
376 void AddNumber16(FX_FLOAT value) | 376 void AddNumber16(FX_FLOAT value) |
377 { | 377 { |
378 AddNumber(value); | 378 AddNumber(value); |
379 } | 379 } |
380 | 380 |
381 FX_BOOL» » » » » Identical(CPDF_Array* pOther) co
nst; | 381 bool» » » » » Identical(CPDF_Array* pOther) co
nst; |
382 protected: | 382 protected: |
383 | 383 |
384 ~CPDF_Array(); | 384 ~CPDF_Array(); |
385 | 385 |
386 CFX_PtrArray m_Objects; | 386 CFX_PtrArray m_Objects; |
387 friend class CPDF_Object; | 387 friend class CPDF_Object; |
388 }; | 388 }; |
389 class CPDF_Dictionary : public CPDF_Object | 389 class CPDF_Dictionary : public CPDF_Object |
390 { | 390 { |
391 public: | 391 public: |
(...skipping 20 matching lines...) Expand all Loading... |
412 CFX_ByteString GetString(const CFX_ByteStringC& key, co
nst CFX_ByteStringC& default_str) const; | 412 CFX_ByteString GetString(const CFX_ByteStringC& key, co
nst CFX_ByteStringC& default_str) const; |
413 | 413 |
414 CFX_ByteStringC GetConstString(const CFX_ByteStringC& ke
y, const CFX_ByteStringC& default_str) const; | 414 CFX_ByteStringC GetConstString(const CFX_ByteStringC& ke
y, const CFX_ByteStringC& default_str) const; |
415 | 415 |
416 CFX_WideString GetUnicodeText(const CFX_ByteStringC& ke
y, CFX_CharMap* pCharMap = NULL) const; | 416 CFX_WideString GetUnicodeText(const CFX_ByteStringC& ke
y, CFX_CharMap* pCharMap = NULL) const; |
417 | 417 |
418 int GetInteger(const CFX_ByteStringC
& key) const; | 418 int GetInteger(const CFX_ByteStringC
& key) const; |
419 | 419 |
420 int GetInteger(const CFX_ByteStringC
& key, int default_int) const; | 420 int GetInteger(const CFX_ByteStringC
& key, int default_int) const; |
421 | 421 |
422 FX_BOOL» » » » » GetBoolean(const CFX_ByteStringC
& key, FX_BOOL bDefault = FALSE) const; | 422 bool» » » » » GetBoolean(const CFX_ByteStringC
& key, bool bDefault = false) const; |
423 | 423 |
424 FX_FLOAT GetNumber(const CFX_ByteStringC& key) co
nst; | 424 FX_FLOAT GetNumber(const CFX_ByteStringC& key) co
nst; |
425 | 425 |
426 CPDF_Dictionary* GetDict(const CFX_ByteStringC& key) const; | 426 CPDF_Dictionary* GetDict(const CFX_ByteStringC& key) const; |
427 | 427 |
428 CPDF_Stream* GetStream(const CFX_ByteStringC& key) co
nst; | 428 CPDF_Stream* GetStream(const CFX_ByteStringC& key) co
nst; |
429 | 429 |
430 CPDF_Array* GetArray(const CFX_ByteStringC& key) con
st; | 430 CPDF_Array* GetArray(const CFX_ByteStringC& key) con
st; |
431 | 431 |
432 CFX_FloatRect GetRect(const CFX_ByteStringC& key) cons
t; | 432 CFX_FloatRect GetRect(const CFX_ByteStringC& key) cons
t; |
433 | 433 |
434 CFX_AffineMatrix GetMatrix(const CFX_ByteStringC& key) const; | 434 CFX_AffineMatrix GetMatrix(const CFX_ByteStringC& key) const; |
435 | 435 |
436 FX_FLOAT GetFloat(const CFX_ByteStringC& key) con
st | 436 FX_FLOAT GetFloat(const CFX_ByteStringC& key) con
st |
437 { | 437 { |
438 return GetNumber(key); | 438 return GetNumber(key); |
439 } | 439 } |
440 | 440 |
441 | 441 |
442 FX_BOOL» » » » » KeyExist(const CFX_ByteStringC&
key) const; | 442 bool» » » » » KeyExist(const CFX_ByteStringC&
key) const; |
443 | 443 |
444 FX_POSITION GetStartPos() const; | 444 FX_POSITION GetStartPos() const; |
445 | 445 |
446 CPDF_Object* GetNextElement(FX_POSITION& pos, CFX_Byt
eString& key) const; | 446 CPDF_Object* GetNextElement(FX_POSITION& pos, CFX_Byt
eString& key) const; |
447 | 447 |
448 void SetAt(const CFX_ByteStringC& key
, CPDF_Object* pObj, CPDF_IndirectObjects* pObjs = NULL); | 448 void SetAt(const CFX_ByteStringC& key
, CPDF_Object* pObj, CPDF_IndirectObjects* pObjs = NULL); |
449 | 449 |
450 | 450 |
451 | 451 |
452 void SetAtName(const CFX_ByteStringC&
key, const CFX_ByteString& name); | 452 void SetAtName(const CFX_ByteStringC&
key, const CFX_ByteString& name); |
(...skipping 18 matching lines...) Expand all Loading... |
471 | 471 |
472 void AddReference(const CFX_ByteStrin
gC& key, CPDF_IndirectObjects* pDoc, CPDF_Object* obj) | 472 void AddReference(const CFX_ByteStrin
gC& key, CPDF_IndirectObjects* pDoc, CPDF_Object* obj) |
473 { | 473 { |
474 AddReference(key, pDoc, obj->GetObjNum()); | 474 AddReference(key, pDoc, obj->GetObjNum()); |
475 } | 475 } |
476 | 476 |
477 void SetAtRect(const CFX_ByteStringC&
key, const CFX_FloatRect& rect); | 477 void SetAtRect(const CFX_ByteStringC&
key, const CFX_FloatRect& rect); |
478 | 478 |
479 void SetAtMatrix(const CFX_ByteString
C& key, const CFX_AffineMatrix& matrix); | 479 void SetAtMatrix(const CFX_ByteString
C& key, const CFX_AffineMatrix& matrix); |
480 | 480 |
481 void» » » » » SetAtBoolean(const CFX_ByteStrin
gC& key, FX_BOOL bValue); | 481 void» » » » » SetAtBoolean(const CFX_ByteStrin
gC& key, bool bValue); |
482 | 482 |
483 | 483 |
484 | 484 |
485 void RemoveAt(const CFX_ByteStringC&
key); | 485 void RemoveAt(const CFX_ByteStringC&
key); |
486 | 486 |
487 | 487 |
488 void ReplaceKey(const CFX_ByteStringC
& oldkey, const CFX_ByteStringC& newkey); | 488 void ReplaceKey(const CFX_ByteStringC
& oldkey, const CFX_ByteStringC& newkey); |
489 | 489 |
490 FX_BOOL» » » » » Identical(CPDF_Dictionary* pDict
) const; | 490 bool» » » » » Identical(CPDF_Dictionary* pDict
) const; |
491 | 491 |
492 int GetCount() const | 492 int GetCount() const |
493 { | 493 { |
494 return m_Map.GetCount(); | 494 return m_Map.GetCount(); |
495 } | 495 } |
496 | 496 |
497 void AddValue(const CFX_ByteStringC&
key, CPDF_Object* pObj); | 497 void AddValue(const CFX_ByteStringC&
key, CPDF_Object* pObj); |
498 protected: | 498 protected: |
499 | 499 |
500 ~CPDF_Dictionary(); | 500 ~CPDF_Dictionary(); |
(...skipping 11 matching lines...) Expand all Loading... |
512 return new CPDF_Stream(pData, size, pDict); | 512 return new CPDF_Stream(pData, size, pDict); |
513 } | 513 } |
514 | 514 |
515 CPDF_Stream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict); | 515 CPDF_Stream(uint8_t* pData, FX_DWORD size, CPDF_Dictionary* pDict); |
516 | 516 |
517 CPDF_Dictionary* GetDict() const | 517 CPDF_Dictionary* GetDict() const |
518 { | 518 { |
519 return m_pDict; | 519 return m_pDict; |
520 } | 520 } |
521 | 521 |
522 void» » » » » SetData(const uint8_t* pData, FX
_DWORD size, FX_BOOL bCompressed, FX_BOOL bKeepBuf); | 522 void» » » » » SetData(const uint8_t* pData, FX
_DWORD size, bool bCompressed, bool bKeepBuf); |
523 | 523 |
524 void InitStream(uint8_t* pData, FX_DW
ORD size, CPDF_Dictionary* pDict); | 524 void InitStream(uint8_t* pData, FX_DW
ORD size, CPDF_Dictionary* pDict); |
525 | 525 |
526 void InitStream(IFX_FileRead *pFile,
CPDF_Dictionary* pDict); | 526 void InitStream(IFX_FileRead *pFile,
CPDF_Dictionary* pDict); |
527 | 527 |
528 FX_BOOL» » » » » Identical(CPDF_Stream* pOther) c
onst; | 528 bool» » » » » Identical(CPDF_Stream* pOther) c
onst; |
529 | 529 |
530 CPDF_StreamFilter*» » GetStreamFilter(FX_BOOL bRaw = FALSE) const; | 530 CPDF_StreamFilter*» » GetStreamFilter(bool bRaw = false) const; |
531 | 531 |
532 | 532 |
533 | 533 |
534 FX_DWORD GetRawSize() const | 534 FX_DWORD GetRawSize() const |
535 { | 535 { |
536 return m_dwSize; | 536 return m_dwSize; |
537 } | 537 } |
538 | 538 |
539 FX_BOOL» » » » » ReadRawData(FX_FILESIZE start_po
s, uint8_t* pBuf, FX_DWORD buf_size) const; | 539 bool» » » » » ReadRawData(FX_FILESIZE start_po
s, uint8_t* pBuf, FX_DWORD buf_size) const; |
540 | 540 |
541 | 541 |
542 FX_BOOL» » » » » IsMemoryBased() const | 542 bool» » » » » IsMemoryBased() const |
543 { | 543 { |
544 return m_GenNum == (FX_DWORD) - 1; | 544 return m_GenNum == (FX_DWORD) - 1; |
545 } | 545 } |
546 | 546 |
547 CPDF_Stream*» » » Clone(FX_BOOL bDirect, FPDF_LPFCloneStre
amCallback lpfCallback, void* pUserData) const; | 547 CPDF_Stream*» » » Clone(bool bDirect, FPDF_LPFCloneStreamC
allback lpfCallback, void* pUserData) const; |
548 protected: | 548 protected: |
549 | 549 |
550 ~CPDF_Stream(); | 550 ~CPDF_Stream(); |
551 | 551 |
552 CPDF_Dictionary* m_pDict; | 552 CPDF_Dictionary* m_pDict; |
553 | 553 |
554 FX_DWORD m_dwSize; | 554 FX_DWORD m_dwSize; |
555 | 555 |
556 FX_DWORD m_GenNum; | 556 FX_DWORD m_GenNum; |
557 | 557 |
(...skipping 14 matching lines...) Expand all Loading... |
572 friend class CPDF_AttachmentAcc; | 572 friend class CPDF_AttachmentAcc; |
573 }; | 573 }; |
574 class CPDF_StreamAcc | 574 class CPDF_StreamAcc |
575 { | 575 { |
576 public: | 576 public: |
577 | 577 |
578 CPDF_StreamAcc(); | 578 CPDF_StreamAcc(); |
579 | 579 |
580 ~CPDF_StreamAcc(); | 580 ~CPDF_StreamAcc(); |
581 | 581 |
582 void» » » » » LoadAllData(const CPDF_Stream* p
Stream, FX_BOOL bRawAccess = FALSE, | 582 void» » » » » LoadAllData(const CPDF_Stream* p
Stream, bool bRawAccess = false, |
583 FX_DWORD estimated_size = 0, FX_BOOL bIm
ageAcc = FALSE); | 583 FX_DWORD estimated_size = 0, bool bImage
Acc = false); |
584 | 584 |
585 const CPDF_Stream* GetStream() const | 585 const CPDF_Stream* GetStream() const |
586 { | 586 { |
587 return m_pStream; | 587 return m_pStream; |
588 } | 588 } |
589 | 589 |
590 CPDF_Dictionary* GetDict() const | 590 CPDF_Dictionary* GetDict() const |
591 { | 591 { |
592 return m_pStream? m_pStream->GetDict() : NULL; | 592 return m_pStream? m_pStream->GetDict() : NULL; |
593 } | 593 } |
(...skipping 12 matching lines...) Expand all Loading... |
606 const CPDF_Dictionary* GetImageParam() | 606 const CPDF_Dictionary* GetImageParam() |
607 { | 607 { |
608 return m_pImageParam; | 608 return m_pImageParam; |
609 } | 609 } |
610 protected: | 610 protected: |
611 | 611 |
612 uint8_t* m_pData; | 612 uint8_t* m_pData; |
613 | 613 |
614 FX_DWORD m_dwSize; | 614 FX_DWORD m_dwSize; |
615 | 615 |
616 FX_BOOL» » » » » m_bNewBuf; | 616 bool» » » » » m_bNewBuf; |
617 | 617 |
618 CFX_ByteString m_ImageDecoder; | 618 CFX_ByteString m_ImageDecoder; |
619 | 619 |
620 CPDF_Dictionary* m_pImageParam; | 620 CPDF_Dictionary* m_pImageParam; |
621 | 621 |
622 const CPDF_Stream* m_pStream; | 622 const CPDF_Stream* m_pStream; |
623 | 623 |
624 uint8_t* m_pSrcData; | 624 uint8_t* m_pSrcData; |
625 }; | 625 }; |
626 CFX_DataFilter* FPDF_CreateFilter(const CFX_ByteStringC& name, const CPDF_Dictio
nary* pParam, int width = 0, int height = 0); | 626 CFX_DataFilter* FPDF_CreateFilter(const CFX_ByteStringC& name, const CPDF_Dictio
nary* pParam, int width = 0, int height = 0); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 return m_pObjList; | 684 return m_pObjList; |
685 } | 685 } |
686 | 686 |
687 FX_DWORD GetRefObjNum() const | 687 FX_DWORD GetRefObjNum() const |
688 { | 688 { |
689 return m_RefObjNum; | 689 return m_RefObjNum; |
690 } | 690 } |
691 | 691 |
692 void SetRef(CPDF_IndirectObjects* pDo
c, FX_DWORD objnum); | 692 void SetRef(CPDF_IndirectObjects* pDo
c, FX_DWORD objnum); |
693 | 693 |
694 FX_BOOL» » » » » Identical(CPDF_Reference* pOther
) const | 694 bool» » » » » Identical(CPDF_Reference* pOther
) const |
695 { | 695 { |
696 return m_RefObjNum == pOther->m_RefObjNum; | 696 return m_RefObjNum == pOther->m_RefObjNum; |
697 } | 697 } |
698 protected: | 698 protected: |
699 | 699 |
700 CPDF_IndirectObjects* m_pObjList; | 700 CPDF_IndirectObjects* m_pObjList; |
701 | 701 |
702 FX_DWORD m_RefObjNum; | 702 FX_DWORD m_RefObjNum; |
703 friend class CPDF_Object; | 703 friend class CPDF_Object; |
704 }; | 704 }; |
(...skipping 29 matching lines...) Expand all Loading... |
734 protected: | 734 protected: |
735 | 735 |
736 CFX_MapPtrToPtr m_IndirectObjs; | 736 CFX_MapPtrToPtr m_IndirectObjs; |
737 | 737 |
738 CPDF_Parser* m_pParser; | 738 CPDF_Parser* m_pParser; |
739 | 739 |
740 FX_DWORD m_LastObjNum; | 740 FX_DWORD m_LastObjNum; |
741 }; | 741 }; |
742 | 742 |
743 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ | 743 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ |
OLD | NEW |