OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 |
| 7 #include "core/include/fpdfapi/cpdf_name.h" |
| 8 |
| 9 #include "core/include/fpdfapi/fpdf_parser_decode.h" |
| 10 |
| 11 CPDF_Name::~CPDF_Name() {} |
| 12 |
| 13 CPDF_Object::Type CPDF_Name::GetType() const { |
| 14 return NAME; |
| 15 } |
| 16 |
| 17 CPDF_Object* CPDF_Name::Clone(FX_BOOL bDirect) const { |
| 18 return new CPDF_Name(m_Name); |
| 19 } |
| 20 |
| 21 CFX_ByteString CPDF_Name::GetString() const { |
| 22 return m_Name; |
| 23 } |
| 24 |
| 25 CFX_ByteStringC CPDF_Name::GetConstString() const { |
| 26 return CFX_ByteStringC(m_Name); |
| 27 } |
| 28 |
| 29 void CPDF_Name::SetString(const CFX_ByteString& str) { |
| 30 m_Name = str; |
| 31 } |
| 32 |
| 33 bool CPDF_Name::IsName() const { |
| 34 return true; |
| 35 } |
| 36 |
| 37 CPDF_Name* CPDF_Name::AsName() { |
| 38 return this; |
| 39 } |
| 40 |
| 41 const CPDF_Name* CPDF_Name::AsName() const { |
| 42 return this; |
| 43 } |
| 44 |
| 45 CFX_WideString CPDF_Name::GetUnicodeText() const { |
| 46 return PDF_DecodeText(m_Name); |
| 47 } |
OLD | NEW |