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

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

Issue 1428763002: Merge to XFA: Add PDFCharIsLineEnding helper (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 1 month 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 | « no previous file | core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('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_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
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
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_
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698