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

Side by Side Diff: core/src/fpdfdoc/tagged_int.h

Issue 1518593002: Get rid of most uses of CFX_PtrArray. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix botch. Created 5 years 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/src/fpdfdoc/doc_formfield.cpp ('k') | core/src/fpdftext/fpdf_text.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_SRC_FPDFDOC_TAGGED_INT_H_ 7 #ifndef CORE_SRC_FPDFDOC_TAGGED_INT_H_
8 #define CORE_SRC_FPDFDOC_TAGGED_INT_H_ 8 #define CORE_SRC_FPDFDOC_TAGGED_INT_H_
9 9
10 #include "core/include/fpdfdoc/fpdf_tagged.h" 10 #include "core/include/fpdfdoc/fpdf_tagged.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 // CPDF_StructTreeImpl 47 // CPDF_StructTreeImpl
48 CPDF_StructTree* GetTree() const override { return m_pTree; } 48 CPDF_StructTree* GetTree() const override { return m_pTree; }
49 const CFX_ByteString& GetType() const override { return m_Type; } 49 const CFX_ByteString& GetType() const override { return m_Type; }
50 CPDF_StructElement* GetParent() const override { return m_pParent; } 50 CPDF_StructElement* GetParent() const override { return m_pParent; }
51 CPDF_Dictionary* GetDict() const override { return m_pDict; } 51 CPDF_Dictionary* GetDict() const override { return m_pDict; }
52 int CountKids() const override { return m_Kids.GetSize(); } 52 int CountKids() const override { return m_Kids.GetSize(); }
53 const CPDF_StructKid& GetKid(int index) const override { 53 const CPDF_StructKid& GetKid(int index) const override {
54 return m_Kids.GetData()[index]; 54 return m_Kids.GetData()[index];
55 } 55 }
56 CFX_PtrArray* GetObjectArray() override { return &m_ObjectArray; }
57 CPDF_Object* GetAttr(const CFX_ByteStringC& owner, 56 CPDF_Object* GetAttr(const CFX_ByteStringC& owner,
58 const CFX_ByteStringC& name, 57 const CFX_ByteStringC& name,
59 FX_BOOL bInheritable = FALSE, 58 FX_BOOL bInheritable = FALSE,
60 FX_FLOAT fLevel = 0.0F) override; 59 FX_FLOAT fLevel = 0.0F) override;
61 CFX_ByteString GetName(const CFX_ByteStringC& owner, 60 CFX_ByteString GetName(const CFX_ByteStringC& owner,
62 const CFX_ByteStringC& name, 61 const CFX_ByteStringC& name,
63 const CFX_ByteStringC& default_value, 62 const CFX_ByteStringC& default_value,
64 FX_BOOL bInheritable = FALSE, 63 FX_BOOL bInheritable = FALSE,
65 int subindex = -1) override; 64 int subindex = -1) override;
66 FX_ARGB GetColor(const CFX_ByteStringC& owner, 65 FX_ARGB GetColor(const CFX_ByteStringC& owner,
67 const CFX_ByteStringC& name, 66 const CFX_ByteStringC& name,
68 FX_ARGB default_value, 67 FX_ARGB default_value,
69 FX_BOOL bInheritable = FALSE, 68 FX_BOOL bInheritable = FALSE,
70 int subindex = -1) override; 69 int subindex = -1) override;
71 FX_FLOAT GetNumber(const CFX_ByteStringC& owner, 70 FX_FLOAT GetNumber(const CFX_ByteStringC& owner,
72 const CFX_ByteStringC& name, 71 const CFX_ByteStringC& name,
73 FX_FLOAT default_value, 72 FX_FLOAT default_value,
74 FX_BOOL bInheritable = FALSE, 73 FX_BOOL bInheritable = FALSE,
75 int subindex = -1) override; 74 int subindex = -1) override;
76 int GetInteger(const CFX_ByteStringC& owner, 75 int GetInteger(const CFX_ByteStringC& owner,
77 const CFX_ByteStringC& name, 76 const CFX_ByteStringC& name,
78 int default_value, 77 int default_value,
79 FX_BOOL bInheritable = FALSE, 78 FX_BOOL bInheritable = FALSE,
80 int subindex = -1) override; 79 int subindex = -1) override;
81 80
82 CFX_PtrArray m_ObjectArray;
83 void LoadKids(CPDF_Dictionary* pDict); 81 void LoadKids(CPDF_Dictionary* pDict);
84 void LoadKid(FX_DWORD PageObjNum, CPDF_Object* pObj, CPDF_StructKid* pKid); 82 void LoadKid(FX_DWORD PageObjNum, CPDF_Object* pObj, CPDF_StructKid* pKid);
85 CPDF_Object* GetAttr(const CFX_ByteStringC& owner, 83 CPDF_Object* GetAttr(const CFX_ByteStringC& owner,
86 const CFX_ByteStringC& name, 84 const CFX_ByteStringC& name,
87 FX_BOOL bInheritable, 85 FX_BOOL bInheritable,
88 int subindex); 86 int subindex);
89 CPDF_StructElementImpl* Retain(); 87 CPDF_StructElementImpl* Retain();
90 void Release(); 88 void Release();
91 89
92 protected: 90 protected:
93 ~CPDF_StructElementImpl() override; 91 ~CPDF_StructElementImpl() override;
94 92
95 CPDF_StructTreeImpl* m_pTree; 93 CPDF_StructTreeImpl* m_pTree;
96 CFX_ByteString m_Type; 94 CFX_ByteString m_Type;
97 CPDF_StructElementImpl* m_pParent; 95 CPDF_StructElementImpl* m_pParent;
98 CPDF_Dictionary* m_pDict; 96 CPDF_Dictionary* m_pDict;
99 CFX_ArrayTemplate<CPDF_StructKid> m_Kids; 97 CFX_ArrayTemplate<CPDF_StructKid> m_Kids;
100 int m_RefCount; 98 int m_RefCount;
101 99
102 friend class CPDF_StructTreeImpl; 100 friend class CPDF_StructTreeImpl;
103 }; 101 };
104 102
105 #endif // CORE_SRC_FPDFDOC_TAGGED_INT_H_ 103 #endif // CORE_SRC_FPDFDOC_TAGGED_INT_H_
OLDNEW
« no previous file with comments | « core/src/fpdfdoc/doc_formfield.cpp ('k') | core/src/fpdftext/fpdf_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698