summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/Field.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-11-10 09:38:57 -0800
committerLei Zhang <thestig@chromium.org>2015-11-10 09:38:57 -0800
commitd88a364c1c79b294b980c20ebc9356ea42635bff (patch)
treebb44b0a75a3671ba3e305e3d812dcc098144e851 /fpdfsdk/src/javascript/Field.h
parentb553bcb6a8e69de61f3b4abd257ee3161aa752c6 (diff)
downloadpdfium-d88a364c1c79b294b980c20ebc9356ea42635bff.tar.xz
Merge to XFA: Remove CFX_PtrArray usage in fpdfsdk.
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1430213002 . (cherry picked from commit 8deeacd23872ecc132a0a678e344a018b5114a3a) Review URL: https://codereview.chromium.org/1416113010 .
Diffstat (limited to 'fpdfsdk/src/javascript/Field.h')
-rw-r--r--fpdfsdk/src/javascript/Field.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/fpdfsdk/src/javascript/Field.h b/fpdfsdk/src/javascript/Field.h
index 21ae04c960..d0ee490e80 100644
--- a/fpdfsdk/src/javascript/Field.h
+++ b/fpdfsdk/src/javascript/Field.h
@@ -89,7 +89,7 @@ struct CJS_DelayData {
class Field : public CJS_EmbedObj {
public:
- Field(CJS_Object* pJSObject);
+ explicit Field(CJS_Object* pJSObject);
~Field() override;
FX_BOOL alignment(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError);
@@ -292,7 +292,6 @@ class Field : public CJS_EmbedObj {
CJS_Value& vRet,
CFX_WideString& sError);
- public:
static void SetAlignment(CPDFSDK_Document* pDocument,
const CFX_WideString& swFieldName,
int nControlIndex,
@@ -432,14 +431,12 @@ class Field : public CJS_EmbedObj {
int nControlIndex,
const CJS_WideStringArray& strArray);
- public:
static void AddField(CPDFSDK_Document* pDocument,
int nPageIndex,
int nFieldType,
const CFX_WideString& sName,
const CPDF_Rect& rcCoords);
- public:
static void UpdateFormField(CPDFSDK_Document* pDocument,
CPDF_FormField* pFormField,
FX_BOOL bChangeMark,
@@ -453,13 +450,12 @@ class Field : public CJS_EmbedObj {
static CPDFSDK_Widget* GetWidget(CPDFSDK_Document* pDocument,
CPDF_FormControl* pFormControl);
- static void GetFormFields(CPDFSDK_Document* pDocument,
- const CFX_WideString& csFieldName,
- CFX_PtrArray& FieldsArray);
+ static std::vector<CPDF_FormField*> GetFormFields(
+ CPDFSDK_Document* pDocument,
+ const CFX_WideString& csFieldName);
static void DoDelay(CPDFSDK_Document* pDocument, CJS_DelayData* pData);
- public:
FX_BOOL AttachField(Document* pDocument, const CFX_WideString& csFieldName);
void SetDelay(FX_BOOL bDelay);
void SetIsolate(v8::Isolate* isolate) { m_isolate = isolate; }
@@ -468,8 +464,8 @@ class Field : public CJS_EmbedObj {
void ParseFieldName(const std::wstring& strFieldNameParsed,
std::wstring& strFieldName,
int& iControlNo);
- void GetFormFields(const CFX_WideString& csFieldName,
- CFX_PtrArray& FieldsArray);
+ std::vector<CPDF_FormField*> GetFormFields(
+ const CFX_WideString& csFieldName) const;
CPDF_FormControl* GetSmartFieldControl(CPDF_FormField* pFormField);
FX_BOOL ValueIsOccur(CPDF_FormField* pFormField, CFX_WideString csOptLabel);
@@ -498,7 +494,7 @@ class Field : public CJS_EmbedObj {
class CJS_Field : public CJS_Object {
public:
- CJS_Field(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
+ explicit CJS_Field(v8::Local<v8::Object> pObject) : CJS_Object(pObject) {}
~CJS_Field(void) override {}
void InitInstance(IJS_Runtime* pIRuntime) override;