diff options
author | Tom Sepez <tsepez@chromium.org> | 2017-03-14 12:13:22 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-14 19:59:49 +0000 |
commit | f8a943908a414836271a1b7d7e4a97635d941b7f (patch) | |
tree | 7f900d57e21c72a67a0347e4f25d0784bdad7c83 /xfa/fxfa/parser/xfa_object.h | |
parent | 05df075154a832fcb476e1dfcfb865722d0ea898 (diff) | |
download | pdfium-f8a943908a414836271a1b7d7e4a97635d941b7f.tar.xz |
Replace CXFA_{Object,Node}Array with std::vector
These two ought to happen at the same time as they are
intertwined in spots. Remove blatant casts between the
two along the way.
Change-Id: I9ce5d2faadf1e38aba7cade316560d24a66d8669
Reviewed-on: https://pdfium-review.googlesource.com/2933
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/xfa_object.h')
-rw-r--r-- | xfa/fxfa/parser/xfa_object.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h index 2300cc2209..91b88631ed 100644 --- a/xfa/fxfa/parser/xfa_object.h +++ b/xfa/fxfa/parser/xfa_object.h @@ -8,6 +8,7 @@ #define XFA_FXFA_PARSER_XFA_OBJECT_H_ #include <map> +#include <vector> #include "core/fxcrt/fx_basic.h" #include "fxjs/cfxjse_arguments.h" @@ -107,7 +108,6 @@ class CXFA_Object : public CFXJSE_HostObject { const uint32_t m_elementNameHash; const CFX_WideStringC m_elementName; }; -using CXFA_ObjArray = CFX_ArrayTemplate<CXFA_Object*>; #define XFA_NODEFILTER_Children 0x01 #define XFA_NODEFILTER_Properties 0x02 @@ -125,8 +125,6 @@ enum XFA_SOM_MESSAGETYPE { XFA_SOM_MandatoryMessage }; -using CXFA_NodeArray = CFX_ArrayTemplate<CXFA_Node*>; - typedef void (*PD_CALLBACK_FREEDATA)(void* pData); typedef void (*PD_CALLBACK_DUPLICATEDATA)(void*& pData); @@ -302,11 +300,10 @@ class CXFA_Node : public CXFA_Object { CXFA_Node* Clone(bool bRecursive); CXFA_Node* GetNodeItem(XFA_NODEITEM eItem) const; CXFA_Node* GetNodeItem(XFA_NODEITEM eItem, XFA_ObjectType eType) const; - int32_t GetNodeList(CXFA_NodeArray& nodes, - uint32_t dwTypeFilter = XFA_NODEFILTER_Children | - XFA_NODEFILTER_Properties, - XFA_Element eTypeFilter = XFA_Element::Unknown, - int32_t iLevel = 1); + std::vector<CXFA_Node*> GetNodeList( + uint32_t dwTypeFilter = XFA_NODEFILTER_Children | + XFA_NODEFILTER_Properties, + XFA_Element eTypeFilter = XFA_Element::Unknown); CXFA_Node* CreateSamePacketNode(XFA_Element eType, uint32_t dwFlags = XFA_NodeFlag_Initialized); CXFA_Node* CloneTemplateToForm(bool bRecursive); @@ -315,7 +312,7 @@ class CXFA_Node : public CXFA_Object { CXFA_Node* GetDataDescriptionNode(); void SetDataDescriptionNode(CXFA_Node* pDataDescriptionNode); CXFA_Node* GetBindData(); - int32_t GetBindItems(CXFA_NodeArray& formItems); + std::vector<CXFA_Node*> GetBindItems(); int32_t AddBindItem(CXFA_Node* pFormNode); int32_t RemoveBindItem(CXFA_Node* pFormNode); bool HasBindItem(); @@ -738,10 +735,10 @@ class CXFA_ArrayNodeList : public CXFA_NodeList { bool Remove(CXFA_Node* pNode) override; CXFA_Node* Item(int32_t iIndex) override; - void SetArrayNodeList(const CXFA_NodeArray& srcArray); + void SetArrayNodeList(const std::vector<CXFA_Node*>& srcArray); protected: - CXFA_NodeArray m_array; + std::vector<CXFA_Node*> m_array; }; class CXFA_AttachNodeList : public CXFA_NodeList { |