Chromium Code Reviews| 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 #include <set> |
| 13 | 13 |
| 14 #include "core/include/fpdfapi/fpdf_objects.h" | 14 #include "core/include/fpdfapi/fpdf_objects.h" |
| 15 #include "core/include/fxcrt/fx_system.h" | 15 #include "core/include/fxcrt/fx_basic.h" |
| 16 | 16 |
| 17 class CFX_Font; | 17 class CFX_Font; |
| 18 class CFX_Matrix; | 18 class CFX_Matrix; |
| 19 class CPDF_ColorSpace; | 19 class CPDF_ColorSpace; |
| 20 class CPDF_CryptoHandler; | 20 class CPDF_CryptoHandler; |
| 21 class CPDF_DocPageData; | 21 class CPDF_DocPageData; |
| 22 class CPDF_DocRenderData; | 22 class CPDF_DocRenderData; |
| 23 class CPDF_Font; | 23 class CPDF_Font; |
| 24 class CPDF_FontEncoding; | 24 class CPDF_FontEncoding; |
| 25 class CPDF_IccProfile; | 25 class CPDF_IccProfile; |
| 26 class CPDF_Image; | 26 class CPDF_Image; |
| 27 class CPDF_Object; | 27 class CPDF_Object; |
| 28 class CPDF_Parser; | 28 class CPDF_Parser; |
| 29 class CPDF_Pattern; | 29 class CPDF_Pattern; |
| 30 class CPDF_StandardSecurityHandler; | 30 class CPDF_StandardSecurityHandler; |
| 31 class IFX_FileRead; | |
| 32 class IPDF_SecurityHandler; | 31 class IPDF_SecurityHandler; |
| 33 | 32 |
| 34 #define FPDFPERM_PRINT 0x0004 | 33 #define FPDFPERM_PRINT 0x0004 |
| 35 #define FPDFPERM_MODIFY 0x0008 | 34 #define FPDFPERM_MODIFY 0x0008 |
| 36 #define FPDFPERM_EXTRACT 0x0010 | 35 #define FPDFPERM_EXTRACT 0x0010 |
| 37 #define FPDFPERM_ANNOT_FORM 0x0020 | 36 #define FPDFPERM_ANNOT_FORM 0x0020 |
| 38 #define FPDFPERM_FILL_FORM 0x0100 | 37 #define FPDFPERM_FILL_FORM 0x0100 |
| 39 #define FPDFPERM_EXTRACT_ACCESS 0x0200 | 38 #define FPDFPERM_EXTRACT_ACCESS 0x0200 |
| 40 #define FPDFPERM_ASSEMBLE 0x0400 | 39 #define FPDFPERM_ASSEMBLE 0x0400 |
| 41 #define FPDFPERM_PRINT_HIGH 0x0800 | 40 #define FPDFPERM_PRINT_HIGH 0x0800 |
| 42 #define FPDF_PAGE_MAX_NUM 0xFFFFF | 41 #define FPDF_PAGE_MAX_NUM 0xFFFFF |
| 43 | 42 |
| 43 // TODO(thestig) Using unique_ptr with ReleaseDeleter is still not ideal. | |
|
Lei Zhang
2016/02/05 23:22:43
Shall we move this to fx_stream.h where IFX_FileSt
| |
| 44 // Come up or wait for something better. | |
| 45 using ScopedFileStream = | |
| 46 std::unique_ptr<IFX_FileStream, ReleaseDeleter<IFX_FileStream>>; | |
| 47 | |
| 44 // Use the accessors below instead of directly accessing PDF_CharType. | 48 // Use the accessors below instead of directly accessing PDF_CharType. |
| 45 extern const char PDF_CharType[256]; | 49 extern const char PDF_CharType[256]; |
| 46 | 50 |
| 47 inline bool PDFCharIsWhitespace(uint8_t c) { | 51 inline bool PDFCharIsWhitespace(uint8_t c) { |
| 48 return PDF_CharType[c] == 'W'; | 52 return PDF_CharType[c] == 'W'; |
| 49 } | 53 } |
| 50 inline bool PDFCharIsNumeric(uint8_t c) { | 54 inline bool PDFCharIsNumeric(uint8_t c) { |
| 51 return PDF_CharType[c] == 'N'; | 55 return PDF_CharType[c] == 'N'; |
| 52 } | 56 } |
| 53 inline bool PDFCharIsDelimiter(uint8_t c) { | 57 inline bool PDFCharIsDelimiter(uint8_t c) { |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 881 FX_DWORD src_size, | 885 FX_DWORD src_size, |
| 882 const CPDF_Dictionary* pDict, | 886 const CPDF_Dictionary* pDict, |
| 883 uint8_t*& dest_buf, | 887 uint8_t*& dest_buf, |
| 884 FX_DWORD& dest_size, | 888 FX_DWORD& dest_size, |
| 885 CFX_ByteString& ImageEncoding, | 889 CFX_ByteString& ImageEncoding, |
| 886 CPDF_Dictionary*& pImageParms, | 890 CPDF_Dictionary*& pImageParms, |
| 887 FX_DWORD estimated_size, | 891 FX_DWORD estimated_size, |
| 888 FX_BOOL bImageAcc); | 892 FX_BOOL bImageAcc); |
| 889 | 893 |
| 890 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ | 894 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ |
| OLD | NEW |