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/cxfa_scriptcontext.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/cxfa_scriptcontext.h')
-rw-r--r-- | xfa/fxfa/parser/cxfa_scriptcontext.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/xfa/fxfa/parser/cxfa_scriptcontext.h b/xfa/fxfa/parser/cxfa_scriptcontext.h index 6d4f73a632..3f81bb8ebe 100644 --- a/xfa/fxfa/parser/cxfa_scriptcontext.h +++ b/xfa/fxfa/parser/cxfa_scriptcontext.h @@ -32,9 +32,9 @@ class CXFA_ScriptContext { bool RunScript(XFA_SCRIPTLANGTYPE eScriptType, const CFX_WideStringC& wsScript, CFXJSE_Value* pRetValue, - CXFA_Object* pThisObject = nullptr); + CXFA_Object* pThisObject); - int32_t ResolveObjects(CXFA_Object* refNode, + int32_t ResolveObjects(CXFA_Object* refObject, const CFX_WideStringC& wsExpression, XFA_RESOLVENODE_RS& resolveNodeRS, uint32_t dwStyles = XFA_RESOLVENODE_Children, @@ -48,8 +48,8 @@ class CXFA_ScriptContext { int32_t GetIndexByClassName(CXFA_Node* refNode); void GetSomExpression(CXFA_Node* refNode, CFX_WideString& wsExpression); - void SetNodesOfRunScript(CXFA_NodeArray* pArray); - void AddNodesOfRunScript(const CXFA_NodeArray& nodes); + void SetNodesOfRunScript(std::vector<CXFA_Node*>* pArray); + void AddNodesOfRunScript(const std::vector<CXFA_Node*>& nodes); void AddNodesOfRunScript(CXFA_Node* pNode); CFXJSE_Class* GetJseNormalClass(); @@ -91,7 +91,7 @@ class CXFA_ScriptContext { CXFA_Object* GetVariablesThis(CXFA_Object* pObject, bool bScriptNode = false); bool IsStrictScopeInJavaScript(); XFA_SCRIPTLANGTYPE GetType(); - CXFA_NodeArray& GetUpObjectArray() { return m_upObjectArray; } + std::vector<CXFA_Node*>* GetUpObjectArray() { return &m_upObjectArray; } CXFA_Document* GetDocument() const { return m_pDocument; } static CXFA_Object* ToObject(CFXJSE_Value* pValue, CFXJSE_Class* pClass); @@ -111,10 +111,10 @@ class CXFA_ScriptContext { std::map<CXFA_Object*, std::unique_ptr<CFXJSE_Value>> m_mapObjectToValue; std::map<CXFA_Object*, CFXJSE_Context*> m_mapVariableToContext; CXFA_EventParam m_eventParam; - CXFA_NodeArray m_upObjectArray; + std::vector<CXFA_Node*> m_upObjectArray; // CacheList holds the NodeList items so we can clean them up when we're done. std::vector<std::unique_ptr<CXFA_NodeList>> m_CacheList; - CXFA_NodeArray* m_pScriptNodeArray; + std::vector<CXFA_Node*>* m_pScriptNodeArray; std::unique_ptr<CXFA_ResolveProcessor> m_ResolveProcessor; std::unique_ptr<CXFA_FM2JSContext> m_FM2JSContext; CXFA_Object* m_pThisObject; |