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

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

Issue 1853233002: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix CPDF_Name::GetConstString() 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
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp ('k') | core/fpdfdoc/cpvt_color.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 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.
49 virtual CFX_ByteStringC GetConstString() const; 51 virtual CFX_ByteStringC GetConstString() const;
50 virtual CFX_WideString GetUnicodeText() const; 52 virtual CFX_WideString GetUnicodeText() const;
51 virtual FX_FLOAT GetNumber() const; 53 virtual FX_FLOAT GetNumber() const;
52 virtual int GetInteger() const; 54 virtual int GetInteger() const;
53 virtual CPDF_Dictionary* GetDict() const; 55 virtual CPDF_Dictionary* GetDict() const;
54 virtual CPDF_Array* GetArray() const; 56 virtual CPDF_Array* GetArray() const;
55 57
56 virtual void SetString(const CFX_ByteString& str); 58 virtual void SetString(const CFX_ByteString& str);
57 59
58 virtual bool IsArray() const; 60 virtual bool IsArray() const;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 155
154 inline CPDF_Stream* ToStream(CPDF_Object* obj) { 156 inline CPDF_Stream* ToStream(CPDF_Object* obj) {
155 return obj ? obj->AsStream() : nullptr; 157 return obj ? obj->AsStream() : nullptr;
156 } 158 }
157 159
158 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) { 160 inline const CPDF_Stream* ToStream(const CPDF_Object* obj) {
159 return obj ? obj->AsStream() : nullptr; 161 return obj ? obj->AsStream() : nullptr;
160 } 162 }
161 163
162 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_ 164 #endif // CORE_FPDFAPI_FPDF_PARSER_INCLUDE_CPDF_OBJECT_H_
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_parser/cpdf_syntax_parser.cpp ('k') | core/fpdfdoc/cpvt_color.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698