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 "../../../third_party/base/nonstd_unique_ptr.h" | 10 #include "../../../third_party/base/nonstd_unique_ptr.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 inline bool PDFCharIsNumeric(uint8_t c) { | 54 inline bool PDFCharIsNumeric(uint8_t c) { |
55 return PDF_CharType[c] == 'N'; | 55 return PDF_CharType[c] == 'N'; |
56 } | 56 } |
57 inline bool PDFCharIsDelimiter(uint8_t c) { | 57 inline bool PDFCharIsDelimiter(uint8_t c) { |
58 return PDF_CharType[c] == 'D'; | 58 return PDF_CharType[c] == 'D'; |
59 } | 59 } |
60 inline bool PDFCharIsOther(uint8_t c) { | 60 inline bool PDFCharIsOther(uint8_t c) { |
61 return PDF_CharType[c] == 'R'; | 61 return PDF_CharType[c] == 'R'; |
62 } | 62 } |
63 | 63 |
| 64 inline bool PDFCharIsLineEnding(uint8_t c) { |
| 65 return c == '\r' || c == '\n'; |
| 66 } |
| 67 |
64 // Indexed by 8-bit char code, contains unicode code points. | 68 // Indexed by 8-bit char code, contains unicode code points. |
65 extern const FX_WORD PDFDocEncoding[256]; | 69 extern const FX_WORD PDFDocEncoding[256]; |
66 | 70 |
67 class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjects { | 71 class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjects { |
68 public: | 72 public: |
69 CPDF_Document(); | 73 CPDF_Document(); |
70 explicit CPDF_Document(CPDF_Parser* pParser); | 74 explicit CPDF_Document(CPDF_Parser* pParser); |
71 | 75 |
72 ~CPDF_Document(); | 76 ~CPDF_Document(); |
73 | 77 |
(...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
945 FX_DWORD src_size, | 949 FX_DWORD src_size, |
946 const CPDF_Dictionary* pDict, | 950 const CPDF_Dictionary* pDict, |
947 uint8_t*& dest_buf, | 951 uint8_t*& dest_buf, |
948 FX_DWORD& dest_size, | 952 FX_DWORD& dest_size, |
949 CFX_ByteString& ImageEncoding, | 953 CFX_ByteString& ImageEncoding, |
950 CPDF_Dictionary*& pImageParms, | 954 CPDF_Dictionary*& pImageParms, |
951 FX_DWORD estimated_size, | 955 FX_DWORD estimated_size, |
952 FX_BOOL bImageAcc); | 956 FX_BOOL bImageAcc); |
953 | 957 |
954 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ | 958 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ |
OLD | NEW |