| OLD | NEW |
| 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 #include "core/fpdfapi/parser/cpdf_array.h" | 7 #include "core/fpdfapi/parser/cpdf_array.h" |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 ASSERT(IsArray()); | 189 ASSERT(IsArray()); |
| 190 CHECK(!pObj || pObj->IsInline()); | 190 CHECK(!pObj || pObj->IsInline()); |
| 191 m_Objects.push_back(pObj); | 191 m_Objects.push_back(pObj); |
| 192 } | 192 } |
| 193 | 193 |
| 194 void CPDF_Array::AddName(const CFX_ByteString& str) { | 194 void CPDF_Array::AddName(const CFX_ByteString& str) { |
| 195 Add(new CPDF_Name(str)); | 195 Add(new CPDF_Name(str)); |
| 196 } | 196 } |
| 197 | 197 |
| 198 void CPDF_Array::AddString(const CFX_ByteString& str) { | 198 void CPDF_Array::AddString(const CFX_ByteString& str) { |
| 199 Add(new CPDF_String(str, FALSE)); | 199 Add(new CPDF_String(str, false)); |
| 200 } | 200 } |
| 201 | 201 |
| 202 void CPDF_Array::AddInteger(int i) { | 202 void CPDF_Array::AddInteger(int i) { |
| 203 Add(new CPDF_Number(i)); | 203 Add(new CPDF_Number(i)); |
| 204 } | 204 } |
| 205 | 205 |
| 206 void CPDF_Array::AddNumber(FX_FLOAT f) { | 206 void CPDF_Array::AddNumber(FX_FLOAT f) { |
| 207 Add(new CPDF_Number(f)); | 207 Add(new CPDF_Number(f)); |
| 208 } | 208 } |
| 209 | 209 |
| 210 void CPDF_Array::AddReference(CPDF_IndirectObjectHolder* pDoc, | 210 void CPDF_Array::AddReference(CPDF_IndirectObjectHolder* pDoc, |
| 211 uint32_t objnum) { | 211 uint32_t objnum) { |
| 212 Add(new CPDF_Reference(pDoc, objnum)); | 212 Add(new CPDF_Reference(pDoc, objnum)); |
| 213 } | 213 } |
| OLD | NEW |