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

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

Issue 1566553002: Replace CPDF_SortObjNumArray with a std::set. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: nit, rebase Created 4 years, 11 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 | « no previous file | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.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 <map> 10 #include <map>
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 virtual DocLinearizationStatus IsLinearizedPDF() = 0; 908 virtual DocLinearizationStatus IsLinearizedPDF() = 0;
909 virtual void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos, 909 virtual void GetLinearizedMainXRefInfo(FX_FILESIZE* pPos,
910 FX_DWORD* pSize) = 0; 910 FX_DWORD* pSize) = 0;
911 911
912 protected: 912 protected:
913 IPDF_DataAvail(IFX_FileAvail* pFileAvail, IFX_FileRead* pFileRead); 913 IPDF_DataAvail(IFX_FileAvail* pFileAvail, IFX_FileRead* pFileRead);
914 914
915 IFX_FileAvail* m_pFileAvail; 915 IFX_FileAvail* m_pFileAvail;
916 IFX_FileRead* m_pFileRead; 916 IFX_FileRead* m_pFileRead;
917 }; 917 };
918 class CPDF_SortObjNumArray {
919 public:
920 void AddObjNum(FX_DWORD dwObjNum);
921 918
922 FX_BOOL Find(FX_DWORD dwObjNum);
923
924 void RemoveAll() { m_number_array.RemoveAll(); }
925
926 protected:
927 FX_BOOL BinarySearch(FX_DWORD value, int& iNext);
928
929 protected:
930 CFX_DWordArray m_number_array;
931 };
932 enum PDF_PAGENODE_TYPE { 919 enum PDF_PAGENODE_TYPE {
933 PDF_PAGENODE_UNKOWN = 0, 920 PDF_PAGENODE_UNKOWN = 0,
934 PDF_PAGENODE_PAGE, 921 PDF_PAGENODE_PAGE,
935 PDF_PAGENODE_PAGES, 922 PDF_PAGENODE_PAGES,
936 PDF_PAGENODE_ARRAY, 923 PDF_PAGENODE_ARRAY,
937 }; 924 };
938 class CPDF_PageNode { 925 class CPDF_PageNode {
939 public: 926 public:
940 CPDF_PageNode() : m_type(PDF_PAGENODE_UNKOWN) {} 927 CPDF_PageNode() : m_type(PDF_PAGENODE_UNKOWN) {}
941 ~CPDF_PageNode(); 928 ~CPDF_PageNode();
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 FX_DWORD src_size, 977 FX_DWORD src_size,
991 const CPDF_Dictionary* pDict, 978 const CPDF_Dictionary* pDict,
992 uint8_t*& dest_buf, 979 uint8_t*& dest_buf,
993 FX_DWORD& dest_size, 980 FX_DWORD& dest_size,
994 CFX_ByteString& ImageEncoding, 981 CFX_ByteString& ImageEncoding,
995 CPDF_Dictionary*& pImageParms, 982 CPDF_Dictionary*& pImageParms,
996 FX_DWORD estimated_size, 983 FX_DWORD estimated_size,
997 FX_BOOL bImageAcc); 984 FX_BOOL bImageAcc);
998 985
999 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_ 986 #endif // CORE_INCLUDE_FPDFAPI_FPDF_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_parser/fpdf_parser_parser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698