| 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 "../fxcrt/fx_ext.h" | 10 #include "../fxcrt/fx_ext.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #define FPDFPERM_PRINT_HIGH 0x0800 | 44 #define FPDFPERM_PRINT_HIGH 0x0800 |
| 45 #define FPDF_PAGE_MAX_NUM 0xFFFFF | 45 #define FPDF_PAGE_MAX_NUM 0xFFFFF |
| 46 | 46 |
| 47 // Indexed by 8-bit character code, contains either: | 47 // Indexed by 8-bit character code, contains either: |
| 48 // 'W' - for whitespace: NUL, TAB, CR, LF, FF, 0x80, 0xff | 48 // 'W' - for whitespace: NUL, TAB, CR, LF, FF, 0x80, 0xff |
| 49 // 'N' - for numeric: 0123456789+-. | 49 // 'N' - for numeric: 0123456789+-. |
| 50 // 'D' - for delimiter: %()/<>[]{} | 50 // 'D' - for delimiter: %()/<>[]{} |
| 51 // 'R' - otherwise. | 51 // 'R' - otherwise. |
| 52 extern const char PDF_CharType[256]; | 52 extern const char PDF_CharType[256]; |
| 53 | 53 |
| 54 class IPDF_EnumPageHandler | |
| 55 { | |
| 56 public: | |
| 57 virtual ~IPDF_EnumPageHandler() { } | |
| 58 virtual FX_BOOL EnumPage(CPDF_Dictionary* pPageDict) = 0; | |
| 59 }; | |
| 60 class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjects | 54 class CPDF_Document : public CFX_PrivateData, public CPDF_IndirectObjects |
| 61 { | 55 { |
| 62 public: | 56 public: |
| 63 CPDF_Document(); | 57 CPDF_Document(); |
| 64 explicit CPDF_Document(CPDF_Parser* pParser); | 58 explicit CPDF_Document(CPDF_Parser* pParser); |
| 65 | 59 |
| 66 ~CPDF_Document(); | 60 ~CPDF_Document(); |
| 67 | 61 |
| 68 CPDF_Parser* GetParser() const | 62 CPDF_Parser* GetParser() const |
| 69 { | 63 { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 85 id1 = m_ID1; | 79 id1 = m_ID1; |
| 86 id2 = m_ID2; | 80 id2 = m_ID2; |
| 87 } | 81 } |
| 88 | 82 |
| 89 int GetPageCount() const; | 83 int GetPageCount() const; |
| 90 | 84 |
| 91 CPDF_Dictionary* GetPage(int iPage); | 85 CPDF_Dictionary* GetPage(int iPage); |
| 92 | 86 |
| 93 int GetPageIndex(FX_DWORD objnum); | 87 int GetPageIndex(FX_DWORD objnum); |
| 94 | 88 |
| 95 void EnumPages(IPDF_EnumPageHandler*
pHandler); | |
| 96 | |
| 97 FX_DWORD GetUserPermissions(FX_BOOL bCheckRevisio
n = FALSE) const; | 89 FX_DWORD GetUserPermissions(FX_BOOL bCheckRevisio
n = FALSE) const; |
| 98 | 90 |
| 99 FX_BOOL IsOwner() const; | 91 FX_BOOL IsOwner() const; |
| 100 | 92 |
| 101 | 93 |
| 102 | 94 |
| 103 CPDF_DocPageData* GetPageData() | 95 CPDF_DocPageData* GetPageData() |
| 104 { | 96 { |
| 105 return GetValidatePageData(); | 97 return GetValidatePageData(); |
| 106 } | 98 } |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 917 PDF_DATAAVAIL_PAGE, | 909 PDF_DATAAVAIL_PAGE, |
| 918 PDF_DATAAVAIL_PAGE_LATERLOAD, | 910 PDF_DATAAVAIL_PAGE_LATERLOAD, |
| 919 PDF_DATAAVAIL_RESOURCES, | 911 PDF_DATAAVAIL_RESOURCES, |
| 920 PDF_DATAAVAIL_DONE, | 912 PDF_DATAAVAIL_DONE, |
| 921 PDF_DATAAVAIL_ERROR, | 913 PDF_DATAAVAIL_ERROR, |
| 922 PDF_DATAAVAIL_LOADALLFILE, | 914 PDF_DATAAVAIL_LOADALLFILE, |
| 923 PDF_DATAAVAIL_TRAILER_APPEND | 915 PDF_DATAAVAIL_TRAILER_APPEND |
| 924 }; | 916 }; |
| 925 | 917 |
| 926 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ | 918 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ |
| OLD | NEW |