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

Unified Diff: core/fpdfdoc/cpdf_formfield.h

Issue 2625483002: Remove some CFX_ArrayTemplate in fpdfapi and fpdfdoc (Closed)
Patch Set: 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
Index: core/fpdfdoc/cpdf_formfield.h
diff --git a/core/fpdfdoc/cpdf_formfield.h b/core/fpdfdoc/cpdf_formfield.h
index 37f17c3a8acae609d08b19dbd6b0540fb123d976..920aa09c1e8fadd3163ffb28d881cda1d3b1c139 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;
@@ -152,7 +155,7 @@ class CPDF_FormField {
uint32_t m_Flags;
CPDF_InterForm* m_pForm;
dsinclair 2017/01/10 14:11:11 const?
Tom Sepez 2017/01/10 18:06:27 Done.
CPDF_Dictionary* m_pDict;
- CFX_ArrayTemplate<CPDF_FormControl*> m_ControlList;
+ std::vector<CPDF_FormControl*> m_ControlList;
dsinclair 2017/01/10 14:11:11 It looks like the InterForm owns the control? Shou
Tom Sepez 2017/01/10 18:06:27 Not sure. Just leaving this alone for the moment.
FX_FLOAT m_FontSize;
CPDF_Font* m_pFont;
};

Powered by Google App Engine
This is Rietveld 408576698