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/include/fpdfapi/cpdf_array.h" | 7 #include "core/fpdfapi/fpdf_parser/include/cpdf_array.h" |
8 | 8 |
9 #include "core/include/fpdfapi/cpdf_name.h" | 9 #include "core/fpdfapi/fpdf_parser/include/cpdf_name.h" |
10 #include "core/include/fpdfapi/cpdf_number.h" | 10 #include "core/fpdfapi/fpdf_parser/include/cpdf_number.h" |
11 #include "core/include/fpdfapi/cpdf_reference.h" | 11 #include "core/fpdfapi/fpdf_parser/include/cpdf_reference.h" |
12 #include "core/include/fpdfapi/cpdf_stream.h" | 12 #include "core/fpdfapi/fpdf_parser/include/cpdf_stream.h" |
13 #include "core/include/fpdfapi/cpdf_string.h" | 13 #include "core/fpdfapi/fpdf_parser/include/cpdf_string.h" |
14 | 14 |
15 CPDF_Array::CPDF_Array() {} | 15 CPDF_Array::CPDF_Array() {} |
16 | 16 |
17 CPDF_Array::~CPDF_Array() { | 17 CPDF_Array::~CPDF_Array() { |
18 int size = m_Objects.GetSize(); | 18 int size = m_Objects.GetSize(); |
19 CPDF_Object** pList = m_Objects.GetData(); | 19 CPDF_Object** pList = m_Objects.GetData(); |
20 for (int i = 0; i < size; i++) { | 20 for (int i = 0; i < size; i++) { |
21 if (pList[i]) | 21 if (pList[i]) |
22 pList[i]->Release(); | 22 pList[i]->Release(); |
23 } | 23 } |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 ASSERT(IsArray()); | 198 ASSERT(IsArray()); |
199 CPDF_Number* pNumber = new CPDF_Number(f); | 199 CPDF_Number* pNumber = new CPDF_Number(f); |
200 Add(pNumber); | 200 Add(pNumber); |
201 } | 201 } |
202 | 202 |
203 void CPDF_Array::AddReference(CPDF_IndirectObjectHolder* pDoc, | 203 void CPDF_Array::AddReference(CPDF_IndirectObjectHolder* pDoc, |
204 FX_DWORD objnum) { | 204 FX_DWORD objnum) { |
205 ASSERT(IsArray()); | 205 ASSERT(IsArray()); |
206 Add(new CPDF_Reference(pDoc, objnum)); | 206 Add(new CPDF_Reference(pDoc, objnum)); |
207 } | 207 } |
OLD | NEW |