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

Side by Side Diff: core/include/fpdfapi/fpdf_objects.h

Issue 1667873002: Merge to XFA: Complete unit tests for CPDF_Array (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 4 years, 10 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 | « no previous file | core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.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 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 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_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ 7 #ifndef CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_
8 #define CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ 8 #define CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_
9 9
10 #include <map> 10 #include <map>
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 void Add(CPDF_Object* pObj, CPDF_IndirectObjectHolder* pObjs = nullptr); 306 void Add(CPDF_Object* pObj, CPDF_IndirectObjectHolder* pObjs = nullptr);
307 void AddNumber(FX_FLOAT f); 307 void AddNumber(FX_FLOAT f);
308 void AddInteger(int i); 308 void AddInteger(int i);
309 void AddString(const CFX_ByteString& str); 309 void AddString(const CFX_ByteString& str);
310 void AddName(const CFX_ByteString& str); 310 void AddName(const CFX_ByteString& str);
311 void AddReference(CPDF_IndirectObjectHolder* pDoc, FX_DWORD objnum); 311 void AddReference(CPDF_IndirectObjectHolder* pDoc, FX_DWORD objnum);
312 void AddReference(CPDF_IndirectObjectHolder* pDoc, CPDF_Object* obj) { 312 void AddReference(CPDF_IndirectObjectHolder* pDoc, CPDF_Object* obj) {
313 AddReference(pDoc, obj->GetObjNum()); 313 AddReference(pDoc, obj->GetObjNum());
314 } 314 }
315 void AddNumber16(FX_FLOAT value) { AddNumber(value); }
316 315
317 protected: 316 protected:
318 ~CPDF_Array(); 317 ~CPDF_Array();
319 318
320 CFX_ArrayTemplate<CPDF_Object*> m_Objects; 319 CFX_ArrayTemplate<CPDF_Object*> m_Objects;
321 }; 320 };
322 321
323 inline CPDF_Array* ToArray(CPDF_Object* obj) { 322 inline CPDF_Array* ToArray(CPDF_Object* obj) {
324 return obj ? obj->AsArray() : nullptr; 323 return obj ? obj->AsArray() : nullptr;
325 } 324 }
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 iterator end() { return m_IndirectObjs.end(); } 598 iterator end() { return m_IndirectObjs.end(); }
600 const_iterator end() const { return m_IndirectObjs.end(); } 599 const_iterator end() const { return m_IndirectObjs.end(); }
601 600
602 protected: 601 protected:
603 CPDF_Parser* m_pParser; 602 CPDF_Parser* m_pParser;
604 FX_DWORD m_LastObjNum; 603 FX_DWORD m_LastObjNum;
605 std::map<FX_DWORD, CPDF_Object*> m_IndirectObjs; 604 std::map<FX_DWORD, CPDF_Object*> m_IndirectObjs;
606 }; 605 };
607 606
608 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_ 607 #endif // CORE_INCLUDE_FPDFAPI_FPDF_OBJECTS_H_
OLDNEW
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698