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

Unified Diff: core/fpdfdoc/cpdf_formfield.h

Issue 2625483002: Remove some CFX_ArrayTemplate in fpdfapi and fpdfdoc (Closed)
Patch Set: coments Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfdoc/cpdf_formcontrol.h ('k') | core/fpdfdoc/cpdf_formfield.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfdoc/cpdf_formfield.h
diff --git a/core/fpdfdoc/cpdf_formfield.h b/core/fpdfdoc/cpdf_formfield.h
index 37f17c3a8acae609d08b19dbd6b0540fb123d976..9a1ddc4599732e0690ec9f50b05e6ecf3823a908 100644
--- a/core/fpdfdoc/cpdf_formfield.h
+++ b/core/fpdfdoc/cpdf_formfield.h
@@ -7,11 +7,14 @@
#ifndef CORE_FPDFDOC_CPDF_FORMFIELD_H_
#define CORE_FPDFDOC_CPDF_FORMFIELD_H_
+#include <vector>
+
#include "core/fpdfdoc/cpdf_aaction.h"
#include "core/fpdfdoc/cpdf_formfield.h"
#include "core/fxcrt/fx_basic.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/fx_system.h"
+#include "third_party/base/stl_util.h"
#define FIELDTYPE_UNKNOWN 0
#define FIELDTYPE_PUSHBUTTON 1
@@ -58,12 +61,12 @@ class CPDF_FormField {
bool ResetField(bool bNotify = false);
- int CountControls() const { return m_ControlList.GetSize(); }
-
- CPDF_FormControl* GetControl(int index) const {
- return m_ControlList.GetAt(index);
+ int CountControls() const {
+ return pdfium::CollectionSize<int>(m_ControlList);
}
+ CPDF_FormControl* GetControl(int index) const { return m_ControlList[index]; }
+
int GetControlIndex(const CPDF_FormControl* pControl) const;
int GetFieldType() const;
@@ -150,9 +153,9 @@ class CPDF_FormField {
CPDF_FormField::Type m_Type;
uint32_t m_Flags;
- CPDF_InterForm* m_pForm;
+ CPDF_InterForm* const m_pForm;
CPDF_Dictionary* m_pDict;
- CFX_ArrayTemplate<CPDF_FormControl*> m_ControlList;
+ std::vector<CPDF_FormControl*> m_ControlList; // Owned by InterForm parent.
FX_FLOAT m_FontSize;
CPDF_Font* m_pFont;
};
« no previous file with comments | « core/fpdfdoc/cpdf_formcontrol.h ('k') | core/fpdfdoc/cpdf_formfield.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698