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/fpdfapi/fpdf_parser/include/cpdf_object.h

Issue 1879683002: Remove CPDF_Object::GetConstString and overrides (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Move bLuminosity down. Created 4 years, 8 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 28 matching lines...) Expand all
39 uint32_t GetObjNum() const { return m_ObjNum; } 39 uint32_t GetObjNum() const { return m_ObjNum; }
40 uint32_t GetGenNum() const { return m_GenNum; } 40 uint32_t GetGenNum() const { return m_GenNum; }
41 41
42 virtual CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const = 0; 42 virtual CPDF_Object* Clone(FX_BOOL bDirect = FALSE) const = 0;
43 virtual CPDF_Object* GetDirect() const; 43 virtual CPDF_Object* GetDirect() const;
44 44
45 FX_BOOL IsModified() const { return FALSE; } 45 FX_BOOL IsModified() const { return FALSE; }
46 void Release(); 46 void Release();
47 47
48 virtual CFX_ByteString GetString() const; 48 virtual CFX_ByteString GetString() const;
49
50 // Note: |this| must outlive the use of |GetConstString|'s result.
51 virtual CFX_ByteStringC GetConstString() const;
52 virtual CFX_WideString GetUnicodeText() const; 49 virtual CFX_WideString GetUnicodeText() const;
53 virtual FX_FLOAT GetNumber() const; 50 virtual FX_FLOAT GetNumber() const;
54 virtual int GetInteger() const; 51 virtual int GetInteger() const;
55 virtual CPDF_Dictionary* GetDict() const; 52 virtual CPDF_Dictionary* GetDict() const;
56 virtual CPDF_Array* GetArray() const; 53 virtual CPDF_Array* GetArray() const;
57 54
58 virtual void SetString(const CFX_ByteString& str); 55 virtual void SetString(const CFX_ByteString& str);
59 56
60 virtual bool IsArray() const; 57 virtual bool IsArray() const;
61 virtual bool IsBoolean() const; 58 virtual bool IsBoolean() const;
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 152
156 inline CPDF_Stream* ToStream(CPDF_Object* obj) { 153 inline CPDF_Stream* ToStream(CPDF_Object* obj) {
157 return obj ? obj->AsStream() : nullptr; 154 return obj ? obj->AsStream() : nullptr;
158 } 155 }
159 156
160 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) { 157 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) {
161 return obj ? obj->AsStream() : nullptr; 158 return obj ? obj->AsStream() : nullptr;
162 } 159 }
163 160
164 #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_name.h ('k') | core/fpdfapi/fpdf_parser/include/cpdf_reference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698