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_PARSER_H_ | 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ |
8 #define CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ | 8 #define CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ |
9 | 9 |
10 #include <map> | 10 #include <map> |
11 #include <memory> | 11 #include <memory> |
| 12 #include <set> |
12 | 13 |
13 #include "core/include/fpdfapi/fpdf_objects.h" | 14 #include "core/include/fpdfapi/fpdf_objects.h" |
14 #include "core/include/fxcrt/fx_system.h" | 15 #include "core/include/fxcrt/fx_system.h" |
15 | 16 |
16 class CFX_Font; | 17 class CFX_Font; |
17 class CFX_Matrix; | 18 class CFX_Matrix; |
18 class CPDF_ColorSpace; | 19 class CPDF_ColorSpace; |
19 class CPDF_CryptoHandler; | 20 class CPDF_CryptoHandler; |
20 class CPDF_DocPageData; | 21 class CPDF_DocPageData; |
21 class CPDF_DocRenderData; | 22 class CPDF_DocRenderData; |
(...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 CFX_MapPtrToPtr m_ObjectStreamMap; | 530 CFX_MapPtrToPtr m_ObjectStreamMap; |
530 | 531 |
531 // Mapping of object numbers to offsets. The offsets are relative to the first | 532 // Mapping of object numbers to offsets. The offsets are relative to the first |
532 // object in the stream. | 533 // object in the stream. |
533 using StreamObjectCache = std::map<FX_DWORD, FX_DWORD>; | 534 using StreamObjectCache = std::map<FX_DWORD, FX_DWORD>; |
534 | 535 |
535 // Mapping of streams to their object caches. This is valid as long as the | 536 // Mapping of streams to their object caches. This is valid as long as the |
536 // streams in |m_ObjectStreamMap| are valid. | 537 // streams in |m_ObjectStreamMap| are valid. |
537 std::map<CPDF_StreamAcc*, StreamObjectCache> m_ObjCache; | 538 std::map<CPDF_StreamAcc*, StreamObjectCache> m_ObjCache; |
538 | 539 |
| 540 // All indirect object numbers that are being parsed. |
| 541 std::set<FX_DWORD> m_ParsingObjNums; |
| 542 |
539 friend class CPDF_Creator; | 543 friend class CPDF_Creator; |
540 friend class CPDF_DataAvail; | 544 friend class CPDF_DataAvail; |
541 }; | 545 }; |
542 | 546 |
543 #define FXCIPHER_NONE 0 | 547 #define FXCIPHER_NONE 0 |
544 #define FXCIPHER_RC4 1 | 548 #define FXCIPHER_RC4 1 |
545 #define FXCIPHER_AES 2 | 549 #define FXCIPHER_AES 2 |
546 #define FXCIPHER_AES2 3 | 550 #define FXCIPHER_AES2 3 |
547 class CPDF_SecurityHandler { | 551 class CPDF_SecurityHandler { |
548 public: | 552 public: |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 FX_DWORD src_size, | 979 FX_DWORD src_size, |
976 const CPDF_Dictionary* pDict, | 980 const CPDF_Dictionary* pDict, |
977 uint8_t*& dest_buf, | 981 uint8_t*& dest_buf, |
978 FX_DWORD& dest_size, | 982 FX_DWORD& dest_size, |
979 CFX_ByteString& ImageEncoding, | 983 CFX_ByteString& ImageEncoding, |
980 CPDF_Dictionary*& pImageParms, | 984 CPDF_Dictionary*& pImageParms, |
981 FX_DWORD estimated_size, | 985 FX_DWORD estimated_size, |
982 FX_BOOL bImageAcc); | 986 FX_BOOL bImageAcc); |
983 | 987 |
984 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ | 988 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ |
OLD | NEW |