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

Side by Side Diff: core/src/fpdfapi/fpdf_parser/parser_int.h

Issue 1671113002: Remove CFX_FileSizeArray. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add size_t cast Created 4 years, 10 months 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 | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | no next file » | 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_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ 7 #ifndef CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_
8 #define CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ 8 #define CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_
9 9
10 #include <vector>
11
10 #include "core/include/fxcrt/fx_basic.h" 12 #include "core/include/fxcrt/fx_basic.h"
11 #include "core/include/fxcrt/fx_stream.h" 13 #include "core/include/fxcrt/fx_stream.h"
12 14
13 class CFX_BitStream; 15 class CFX_BitStream;
14 class CPDF_DataAvail; 16 class CPDF_DataAvail;
15 class CPDF_Dictionary; 17 class CPDF_Dictionary;
16 class CPDF_Stream; 18 class CPDF_Stream;
17 class IFX_DownloadHints; 19 class IFX_DownloadHints;
18 20
19 class CPDF_HintTables { 21 class CPDF_HintTables {
20 public: 22 public:
21 CPDF_HintTables(CPDF_DataAvail* pDataAvail, CPDF_Dictionary* pLinearized) 23 CPDF_HintTables(CPDF_DataAvail* pDataAvail, CPDF_Dictionary* pLinearized)
22 : m_pLinearizedDict(pLinearized), 24 : m_pLinearizedDict(pLinearized),
23 m_pDataAvail(pDataAvail), 25 m_pDataAvail(pDataAvail),
24 m_nFirstPageSharedObjs(0), 26 m_nFirstPageSharedObjs(0),
25 m_szFirstPageObjOffset(0) {} 27 m_szFirstPageObjOffset(0) {}
26 ~CPDF_HintTables(); 28 ~CPDF_HintTables();
27 29
28 FX_BOOL GetPagePos(int index, 30 FX_BOOL GetPagePos(int index,
29 FX_FILESIZE& szPageStartPos, 31 FX_FILESIZE& szPageStartPos,
30 FX_FILESIZE& szPageLength, 32 FX_FILESIZE& szPageLength,
31 FX_DWORD& dwObjNum); 33 FX_DWORD& dwObjNum);
32 IPDF_DataAvail::DocAvailStatus CheckPage(int index, 34 IPDF_DataAvail::DocAvailStatus CheckPage(int index,
33 IFX_DownloadHints* pHints); 35 IFX_DownloadHints* pHints);
34 FX_BOOL LoadHintStream(CPDF_Stream* pHintStream); 36 FX_BOOL LoadHintStream(CPDF_Stream* pHintStream);
35 37
36 protected: 38 protected:
37 FX_BOOL ReadPageHintTable(CFX_BitStream* hStream); 39 FX_BOOL ReadPageHintTable(CFX_BitStream* hStream);
38 FX_BOOL ReadSharedObjHintTable(CFX_BitStream* hStream, FX_DWORD offset); 40 FX_BOOL ReadSharedObjHintTable(CFX_BitStream* hStream, FX_DWORD offset);
39 FX_DWORD GetItemLength(int index, const CFX_FileSizeArray& szArray); 41 FX_DWORD GetItemLength(int index, const std::vector<FX_FILESIZE>& szArray);
40 42
41 private: 43 private:
42 int ReadPrimaryHintStreamOffset() const; 44 int ReadPrimaryHintStreamOffset() const;
43 int ReadPrimaryHintStreamLength() const; 45 int ReadPrimaryHintStreamLength() const;
44 46
45 CPDF_Dictionary* m_pLinearizedDict; 47 CPDF_Dictionary* m_pLinearizedDict;
46 CPDF_DataAvail* m_pDataAvail; 48 CPDF_DataAvail* m_pDataAvail;
47 FX_DWORD m_nFirstPageSharedObjs; 49 FX_DWORD m_nFirstPageSharedObjs;
48 FX_FILESIZE m_szFirstPageObjOffset; 50 FX_FILESIZE m_szFirstPageObjOffset;
49 CFX_DWordArray m_dwDeltaNObjsArray; 51 CFX_DWordArray m_dwDeltaNObjsArray;
50 CFX_DWordArray m_dwNSharedObjsArray; 52 CFX_DWordArray m_dwNSharedObjsArray;
51 CFX_DWordArray m_dwSharedObjNumArray; 53 CFX_DWordArray m_dwSharedObjNumArray;
52 CFX_DWordArray m_dwIdentifierArray; 54 CFX_DWordArray m_dwIdentifierArray;
53 CFX_FileSizeArray m_szPageOffsetArray; 55 std::vector<FX_FILESIZE> m_szPageOffsetArray;
54 CFX_FileSizeArray m_szSharedObjOffsetArray; 56 std::vector<FX_FILESIZE> m_szSharedObjOffsetArray;
55 }; 57 };
56 58
57 #endif // CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_ 59 #endif // CORE_SRC_FPDFAPI_FPDF_PARSER_PARSER_INT_H_
OLDNEW
« no previous file with comments | « core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698