| OLD | NEW |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 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_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ | 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ |
| 8 #define CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ | 8 #define CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ |
| 9 | 9 |
| 10 #include <vector> |
| 11 |
| 10 #include "core/fpdfapi/parser/cpdf_parser.h" | 12 #include "core/fpdfapi/parser/cpdf_parser.h" |
| 11 #include "core/fpdfapi/parser/cpdf_syntax_parser.h" | 13 #include "core/fpdfapi/parser/cpdf_syntax_parser.h" |
| 12 #include "core/fxcrt/fx_basic.h" | 14 #include "core/fxcrt/fx_basic.h" |
| 13 | 15 |
| 14 class CPDF_Dictionary; | 16 class CPDF_Dictionary; |
| 15 class CPDF_HintTables; | 17 class CPDF_HintTables; |
| 16 class CPDF_IndirectObjectHolder; | 18 class CPDF_IndirectObjectHolder; |
| 17 class CPDF_Parser; | 19 class CPDF_Parser; |
| 18 | 20 |
| 19 enum PDF_DATAAVAIL_STATUS { | 21 enum PDF_DATAAVAIL_STATUS { |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 PDF_PAGENODE_TYPE m_type; | 119 PDF_PAGENODE_TYPE m_type; |
| 118 uint32_t m_dwPageNo; | 120 uint32_t m_dwPageNo; |
| 119 CFX_ArrayTemplate<PageNode*> m_childNode; | 121 CFX_ArrayTemplate<PageNode*> m_childNode; |
| 120 }; | 122 }; |
| 121 | 123 |
| 122 static const int kMaxDataAvailRecursionDepth = 64; | 124 static const int kMaxDataAvailRecursionDepth = 64; |
| 123 static int s_CurrentDataAvailRecursionDepth; | 125 static int s_CurrentDataAvailRecursionDepth; |
| 124 static const int kMaxPageRecursionDepth = 1024; | 126 static const int kMaxPageRecursionDepth = 1024; |
| 125 | 127 |
| 126 uint32_t GetObjectSize(uint32_t objnum, FX_FILESIZE& offset); | 128 uint32_t GetObjectSize(uint32_t objnum, FX_FILESIZE& offset); |
| 127 FX_BOOL IsObjectsAvail(CFX_ArrayTemplate<CPDF_Object*>& obj_array, | 129 FX_BOOL AreObjectsAvailable(std::vector<CPDF_Object*>& obj_array, |
| 128 FX_BOOL bParsePage, | 130 FX_BOOL bParsePage, |
| 129 DownloadHints* pHints, | 131 DownloadHints* pHints, |
| 130 CFX_ArrayTemplate<CPDF_Object*>& ret_array); | 132 std::vector<CPDF_Object*>& ret_array); |
| 131 FX_BOOL CheckDocStatus(DownloadHints* pHints); | 133 FX_BOOL CheckDocStatus(DownloadHints* pHints); |
| 132 FX_BOOL CheckHeader(DownloadHints* pHints); | 134 FX_BOOL CheckHeader(DownloadHints* pHints); |
| 133 FX_BOOL CheckFirstPage(DownloadHints* pHints); | 135 FX_BOOL CheckFirstPage(DownloadHints* pHints); |
| 134 FX_BOOL CheckHintTables(DownloadHints* pHints); | 136 FX_BOOL CheckHintTables(DownloadHints* pHints); |
| 135 FX_BOOL CheckEnd(DownloadHints* pHints); | 137 FX_BOOL CheckEnd(DownloadHints* pHints); |
| 136 FX_BOOL CheckCrossRef(DownloadHints* pHints); | 138 FX_BOOL CheckCrossRef(DownloadHints* pHints); |
| 137 FX_BOOL CheckCrossRefItem(DownloadHints* pHints); | 139 FX_BOOL CheckCrossRefItem(DownloadHints* pHints); |
| 138 FX_BOOL CheckTrailer(DownloadHints* pHints); | 140 FX_BOOL CheckTrailer(DownloadHints* pHints); |
| 139 FX_BOOL CheckRoot(DownloadHints* pHints); | 141 FX_BOOL CheckRoot(DownloadHints* pHints); |
| 140 FX_BOOL CheckInfo(DownloadHints* pHints); | 142 FX_BOOL CheckInfo(DownloadHints* pHints); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 FX_BOOL m_bDocAvail; | 204 FX_BOOL m_bDocAvail; |
| 203 FX_FILESIZE m_dwHeaderOffset; | 205 FX_FILESIZE m_dwHeaderOffset; |
| 204 FX_FILESIZE m_dwLastXRefOffset; | 206 FX_FILESIZE m_dwLastXRefOffset; |
| 205 FX_FILESIZE m_dwXRefOffset; | 207 FX_FILESIZE m_dwXRefOffset; |
| 206 FX_FILESIZE m_dwTrailerOffset; | 208 FX_FILESIZE m_dwTrailerOffset; |
| 207 FX_FILESIZE m_dwCurrentOffset; | 209 FX_FILESIZE m_dwCurrentOffset; |
| 208 PDF_DATAAVAIL_STATUS m_docStatus; | 210 PDF_DATAAVAIL_STATUS m_docStatus; |
| 209 FX_FILESIZE m_dwFileLen; | 211 FX_FILESIZE m_dwFileLen; |
| 210 CPDF_Document* m_pDocument; | 212 CPDF_Document* m_pDocument; |
| 211 std::set<uint32_t> m_ObjectSet; | 213 std::set<uint32_t> m_ObjectSet; |
| 212 CFX_ArrayTemplate<CPDF_Object*> m_objs_array; | 214 std::vector<CPDF_Object*> m_objs_array; |
| 213 FX_FILESIZE m_Pos; | 215 FX_FILESIZE m_Pos; |
| 214 FX_FILESIZE m_bufferOffset; | 216 FX_FILESIZE m_bufferOffset; |
| 215 uint32_t m_bufferSize; | 217 uint32_t m_bufferSize; |
| 216 CFX_ByteString m_WordBuf; | 218 CFX_ByteString m_WordBuf; |
| 217 uint8_t m_bufferData[512]; | 219 uint8_t m_bufferData[512]; |
| 218 CFX_ArrayTemplate<uint32_t> m_XRefStreamList; | 220 CFX_ArrayTemplate<uint32_t> m_XRefStreamList; |
| 219 CFX_ArrayTemplate<uint32_t> m_PageObjList; | 221 CFX_ArrayTemplate<uint32_t> m_PageObjList; |
| 220 uint32_t m_PagesObjNum; | 222 uint32_t m_PagesObjNum; |
| 221 FX_BOOL m_bLinearized; | 223 FX_BOOL m_bLinearized; |
| 222 uint32_t m_dwFirstPageNo; | 224 uint32_t m_dwFirstPageNo; |
| 223 FX_BOOL m_bLinearedDataOK; | 225 FX_BOOL m_bLinearedDataOK; |
| 224 FX_BOOL m_bMainXRefLoadTried; | 226 FX_BOOL m_bMainXRefLoadTried; |
| 225 FX_BOOL m_bMainXRefLoadedOK; | 227 FX_BOOL m_bMainXRefLoadedOK; |
| 226 FX_BOOL m_bPagesTreeLoad; | 228 FX_BOOL m_bPagesTreeLoad; |
| 227 FX_BOOL m_bPagesLoad; | 229 FX_BOOL m_bPagesLoad; |
| 228 CPDF_Parser* m_pCurrentParser; | 230 CPDF_Parser* m_pCurrentParser; |
| 229 FX_FILESIZE m_dwCurrentXRefSteam; | 231 FX_FILESIZE m_dwCurrentXRefSteam; |
| 230 FX_BOOL m_bAnnotsLoad; | 232 FX_BOOL m_bAnnotsLoad; |
| 231 FX_BOOL m_bHaveAcroForm; | 233 FX_BOOL m_bHaveAcroForm; |
| 232 uint32_t m_dwAcroFormObjNum; | 234 uint32_t m_dwAcroFormObjNum; |
| 233 FX_BOOL m_bAcroFormLoad; | 235 FX_BOOL m_bAcroFormLoad; |
| 234 CPDF_Object* m_pAcroForm; | 236 CPDF_Object* m_pAcroForm; |
| 235 CFX_ArrayTemplate<CPDF_Object*> m_arrayAcroforms; | 237 std::vector<CPDF_Object*> m_arrayAcroforms; |
| 236 CPDF_Dictionary* m_pPageDict; | 238 CPDF_Dictionary* m_pPageDict; |
| 237 CPDF_Object* m_pPageResource; | 239 CPDF_Object* m_pPageResource; |
| 238 FX_BOOL m_bNeedDownLoadResource; | 240 FX_BOOL m_bNeedDownLoadResource; |
| 239 FX_BOOL m_bPageLoadedOK; | 241 FX_BOOL m_bPageLoadedOK; |
| 240 FX_BOOL m_bLinearizedFormParamLoad; | 242 FX_BOOL m_bLinearizedFormParamLoad; |
| 241 CFX_ArrayTemplate<CPDF_Object*> m_PagesArray; | 243 std::vector<CPDF_Object*> m_PagesArray; |
| 242 uint32_t m_dwEncryptObjNum; | 244 uint32_t m_dwEncryptObjNum; |
| 243 FX_FILESIZE m_dwPrevXRefOffset; | 245 FX_FILESIZE m_dwPrevXRefOffset; |
| 244 FX_BOOL m_bTotalLoadPageTree; | 246 FX_BOOL m_bTotalLoadPageTree; |
| 245 FX_BOOL m_bCurPageDictLoadOK; | 247 FX_BOOL m_bCurPageDictLoadOK; |
| 246 PageNode m_pageNodes; | 248 PageNode m_pageNodes; |
| 247 std::set<uint32_t> m_pageMapCheckState; | 249 std::set<uint32_t> m_pageMapCheckState; |
| 248 std::set<uint32_t> m_pagesLoadState; | 250 std::set<uint32_t> m_pagesLoadState; |
| 249 std::unique_ptr<CPDF_HintTables> m_pHintTables; | 251 std::unique_ptr<CPDF_HintTables> m_pHintTables; |
| 250 FX_BOOL m_bSupportHintTable; | 252 FX_BOOL m_bSupportHintTable; |
| 251 }; | 253 }; |
| 252 | 254 |
| 253 #endif // CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ | 255 #endif // CORE_FPDFAPI_PARSER_CPDF_DATA_AVAIL_H_ |
| OLD | NEW |