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

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

Issue 1832173003: Remove FX_DWORD from core/ and delete definition (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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
OLDNEW
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_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ 7 #ifndef CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_
8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ 8 #define CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_
9 9
10 #include "core/fxcrt/include/fx_string.h" 10 #include "core/fxcrt/include/fx_string.h"
(...skipping 17 matching lines...) Expand all
28 STRING, 28 STRING,
29 NAME, 29 NAME,
30 ARRAY, 30 ARRAY,
31 DICTIONARY, 31 DICTIONARY,
32 STREAM, 32 STREAM,
33 NULLOBJ, 33 NULLOBJ,
34 REFERENCE 34 REFERENCE
35 }; 35 };
36 36
37 virtual Type GetType() const = 0; 37 virtual Type GetType() const = 0;
38 FX_DWORD GetObjNum() const { return m_ObjNum; } 38 uint32_t GetObjNum() const { return m_ObjNum; }
39 FX_DWORD GetGenNum() const { return m_GenNum; } 39 uint32_t GetGenNum() const { return m_GenNum; }
40 40
41 virtual CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const = 0; 41 virtual CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const = 0;
42 virtual CPDF_Object* GetDirect() const; 42 virtual CPDF_Object* GetDirect() const;
43 43
44 FX_BOOL IsModified() const { return FALSE; } 44 FX_BOOL IsModified() const { return FALSE; }
45 void Release(); 45 void Release();
46 46
47 virtual CFX_ByteString GetString() const; 47 virtual CFX_ByteString GetString() const;
48 virtual CFX_ByteStringC GetConstString() const; 48 virtual CFX_ByteStringC GetConstString() const;
49 virtual CFX_WideString GetUnicodeText() const; 49 virtual CFX_WideString GetUnicodeText() const;
(...skipping 28 matching lines...) Expand all
78 virtual CPDF_Stream* AsStream(); 78 virtual CPDF_Stream* AsStream();
79 virtual const CPDF_Stream* AsStream() const; 79 virtual const CPDF_Stream* AsStream() const;
80 virtual CPDF_String* AsString(); 80 virtual CPDF_String* AsString();
81 virtual const CPDF_String* AsString() const; 81 virtual const CPDF_String* AsString() const;
82 82
83 protected: 83 protected:
84 CPDF_Object() : m_ObjNum(0), m_GenNum(0) {} 84 CPDF_Object() : m_ObjNum(0), m_GenNum(0) {}
85 virtual ~CPDF_Object(); 85 virtual ~CPDF_Object();
86 void Destroy() { delete this; } 86 void Destroy() { delete this; }
87 87
88 FX_DWORD m_ObjNum; 88 uint32_t m_ObjNum;
89 FX_DWORD m_GenNum; 89 uint32_t m_GenNum;
90 90
91 friend class CPDF_IndirectObjectHolder; 91 friend class CPDF_IndirectObjectHolder;
92 friend class CPDF_Parser; 92 friend class CPDF_Parser;
93 93
94 private: 94 private:
95 CPDF_Object(const CPDF_Object& src) {} 95 CPDF_Object(const CPDF_Object& src) {}
96 }; 96 };
97 97
98 inline CPDF_Boolean* ToBoolean(CPDF_Object* obj) { 98 inline CPDF_Boolean* ToBoolean(CPDF_Object* obj) {
99 return obj ? obj->AsBoolean() : nullptr; 99 return obj ? obj->AsBoolean() : nullptr;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 inline CPDF_Stream* ToStream(CPDF_Object* obj) { 153 inline CPDF_Stream* ToStream(CPDF_Object* obj) {
154 return obj ? obj->AsStream() : nullptr; 154 return obj ? obj->AsStream() : nullptr;
155 } 155 }
156 156
157 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) { 157 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) {
158 return obj ? obj->AsStream() : nullptr; 158 return obj ? obj->AsStream() : nullptr;
159 } 159 }
160 160
161 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ 161 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_parser/include/cpdf_indirect_object_holder.h ('k') | core/fpdfapi/fpdf_parser/include/cpdf_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698