diff options
Diffstat (limited to 'xfa')
-rw-r--r-- | xfa/fxfa/parser/cxfa_document.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_document.h | 3 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 18 | ||||
-rw-r--r-- | xfa/fxfa/parser/xfa_object.h | 3 |
4 files changed, 13 insertions, 13 deletions
diff --git a/xfa/fxfa/parser/cxfa_document.cpp b/xfa/fxfa/parser/cxfa_document.cpp index adb8eb2e0b..b7d429aa4a 100644 --- a/xfa/fxfa/parser/cxfa_document.cpp +++ b/xfa/fxfa/parser/cxfa_document.cpp @@ -361,7 +361,7 @@ void CXFA_Document::DoProtoMerge() { return; std::map<uint32_t, CXFA_Node*> mIDMap; - CXFA_NodeSet sUseNodes; + std::unordered_set<CXFA_Node*> sUseNodes; CXFA_NodeIterator sIterator(pTemplateRoot); for (CXFA_Node* pNode = sIterator.GetCurrent(); pNode; pNode = sIterator.MoveToNext()) { diff --git a/xfa/fxfa/parser/cxfa_document.h b/xfa/fxfa/parser/cxfa_document.h index fdd230dca7..b1ee35f07e 100644 --- a/xfa/fxfa/parser/cxfa_document.h +++ b/xfa/fxfa/parser/cxfa_document.h @@ -8,6 +8,7 @@ #define XFA_FXFA_PARSER_CXFA_DOCUMENT_H_ #include <map> +#include <unordered_set> #include "xfa/fxfa/fxfa.h" #include "xfa/fxfa/parser/xfa_localemgr.h" @@ -118,7 +119,7 @@ class CXFA_Document { CScript_LogPseudoModel* m_pScriptLog; CScript_LayoutPseudoModel* m_pScriptLayout; CScript_SignaturePseudoModel* m_pScriptSignature; - CXFA_NodeSet m_PurgeNodes; + std::unordered_set<CXFA_Node*> m_PurgeNodes; XFA_VERSION m_eCurVersionMode; uint32_t m_dwDocFlags; }; diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 1e508969d1..cd6b84424c 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -8,6 +8,7 @@ #include <map> #include <memory> +#include <unordered_set> #include <utility> #include <vector> @@ -80,7 +81,7 @@ int32_t GetCount(CXFA_Node* pInstMgrNode) { return iCount; } -void SortNodeArrayByDocumentIdx(const CXFA_NodeSet& rgNodeSet, +void SortNodeArrayByDocumentIdx(const std::unordered_set<CXFA_Node*>& rgNodeSet, CXFA_NodeArray& rgNodeArray, CFX_ArrayTemplate<int32_t>& rgIdxArray) { int32_t iCount = pdfium::CollectionSize<int32_t>(rgNodeSet); @@ -105,7 +106,8 @@ void SortNodeArrayByDocumentIdx(const CXFA_NodeSet& rgNodeSet, } } -using CXFA_NodeSetPair = std::pair<CXFA_NodeSet, CXFA_NodeSet>; +using CXFA_NodeSetPair = + std::pair<std::unordered_set<CXFA_Node*>, std::unordered_set<CXFA_Node*>>; using CXFA_NodeSetPairMap = std::map<uint32_t, std::unique_ptr<CXFA_NodeSetPair>>; using CXFA_NodeSetPairMapMap = @@ -128,8 +130,8 @@ CXFA_NodeSetPair* NodeSetPairForNode(CXFA_Node* pNode, return (*pNodeSetPairMap)[dwNameHash].get(); } -void ReorderDataNodes(const CXFA_NodeSet& sSet1, - const CXFA_NodeSet& sSet2, +void ReorderDataNodes(const std::unordered_set<CXFA_Node*>& sSet1, + const std::unordered_set<CXFA_Node*>& sSet2, bool bInsertBefore) { CXFA_NodeSetPairMapMap rgMap; for (CXFA_Node* pNode : sSet1) { @@ -235,8 +237,8 @@ void InsertItem(CXFA_Node* pInstMgrNode, pInstMgrNode->GetNodeItem(XFA_NODEITEM_Parent) ->InsertChild(pNewInstance, pNextSibling); if (bMoveDataBindingNodes) { - CXFA_NodeSet sNew; - CXFA_NodeSet sAfter; + std::unordered_set<CXFA_Node*> sNew; + std::unordered_set<CXFA_Node*> sAfter; CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFAContainerNode> sIteratorNew(pNewInstance); @@ -266,8 +268,8 @@ void InsertItem(CXFA_Node* pInstMgrNode, pInstMgrNode->GetNodeItem(XFA_NODEITEM_Parent) ->InsertChild(pNewInstance, pBeforeInstance); if (bMoveDataBindingNodes) { - CXFA_NodeSet sNew; - CXFA_NodeSet sBefore; + std::unordered_set<CXFA_Node*> sNew; + std::unordered_set<CXFA_Node*> sBefore; CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_XFAContainerNode> sIteratorNew(pNewInstance); diff --git a/xfa/fxfa/parser/xfa_object.h b/xfa/fxfa/parser/xfa_object.h index cc116505e0..8bdd264c92 100644 --- a/xfa/fxfa/parser/xfa_object.h +++ b/xfa/fxfa/parser/xfa_object.h @@ -8,7 +8,6 @@ #define XFA_FXFA_PARSER_XFA_OBJECT_H_ #include <map> -#include <unordered_set> #include "fxjs/cfxjse_arguments.h" #include "xfa/fde/xml/fde_xml.h" @@ -126,8 +125,6 @@ enum XFA_SOM_MESSAGETYPE { }; using CXFA_NodeArray = CFX_ArrayTemplate<CXFA_Node*>; -using CXFA_NodeStack = CFX_StackTemplate<CXFA_Node*>; -using CXFA_NodeSet = std::unordered_set<CXFA_Node*>; typedef void (*PD_CALLBACK_FREEDATA)(void* pData); typedef void (*PD_CALLBACK_DUPLICATEDATA)(void*& pData); |