| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 #ifndef XFA_FXFA_PARSER_XFA_OBJECT_H_ | 7 #ifndef XFA_FXFA_PARSER_XFA_OBJECT_H_ |
| 8 #define XFA_FXFA_PARSER_XFA_OBJECT_H_ | 8 #define XFA_FXFA_PARSER_XFA_OBJECT_H_ |
| 9 | 9 |
| 10 #include <map> |
| 10 #include <unordered_set> | 11 #include <unordered_set> |
| 11 | 12 |
| 12 #include "fxjs/cfxjse_arguments.h" | 13 #include "fxjs/cfxjse_arguments.h" |
| 13 #include "xfa/fde/xml/fde_xml.h" | 14 #include "xfa/fde/xml/fde_xml.h" |
| 14 #include "xfa/fxfa/parser/xfa_utils.h" | 15 #include "xfa/fxfa/parser/xfa_utils.h" |
| 15 | 16 |
| 16 class CXFA_Document; | 17 class CXFA_Document; |
| 17 class CXFA_Node; | 18 class CXFA_Node; |
| 18 class CXFA_NodeList; | 19 class CXFA_NodeList; |
| 19 | 20 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 struct XFA_MAPDATABLOCK { | 138 struct XFA_MAPDATABLOCK { |
| 138 uint8_t* GetData() const { return (uint8_t*)this + sizeof(XFA_MAPDATABLOCK); } | 139 uint8_t* GetData() const { return (uint8_t*)this + sizeof(XFA_MAPDATABLOCK); } |
| 139 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo; | 140 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo; |
| 140 int32_t iBytes; | 141 int32_t iBytes; |
| 141 }; | 142 }; |
| 142 | 143 |
| 143 struct XFA_MAPMODULEDATA { | 144 struct XFA_MAPMODULEDATA { |
| 144 XFA_MAPMODULEDATA(); | 145 XFA_MAPMODULEDATA(); |
| 145 ~XFA_MAPMODULEDATA(); | 146 ~XFA_MAPMODULEDATA(); |
| 146 | 147 |
| 147 CFX_MapPtrToPtr m_ValueMap; | 148 std::map<void*, void*> m_ValueMap; |
| 148 CFX_MapPtrTemplate<void*, XFA_MAPDATABLOCK*> m_BufferMap; | 149 std::map<void*, XFA_MAPDATABLOCK*> m_BufferMap; |
| 149 }; | 150 }; |
| 150 | 151 |
| 151 #define XFA_CalcRefCount (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'R') | 152 #define XFA_CalcRefCount (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'R') |
| 152 #define XFA_CalcData (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'C') | 153 #define XFA_CalcData (void*)(uintptr_t) FXBSTR_ID('X', 'F', 'A', 'C') |
| 153 #define XFA_LAYOUTITEMKEY (void*)(uintptr_t) FXBSTR_ID('L', 'Y', 'I', 'M') | 154 #define XFA_LAYOUTITEMKEY (void*)(uintptr_t) FXBSTR_ID('L', 'Y', 'I', 'M') |
| 154 | 155 |
| 155 class CXFA_Node : public CXFA_Object { | 156 class CXFA_Node : public CXFA_Object { |
| 156 public: | 157 public: |
| 157 uint32_t GetPacketID() const { return m_ePacket; } | 158 uint32_t GetPacketID() const { return m_ePacket; } |
| 158 | 159 |
| (...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 void* pKey, | 659 void* pKey, |
| 659 void* pValue, | 660 void* pValue, |
| 660 int32_t iBytes, | 661 int32_t iBytes, |
| 661 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = nullptr); | 662 XFA_MAPDATABLOCKCALLBACKINFO* pCallbackInfo = nullptr); |
| 662 bool GetMapModuleBuffer(void* pKey, | 663 bool GetMapModuleBuffer(void* pKey, |
| 663 void*& pValue, | 664 void*& pValue, |
| 664 int32_t& iBytes, | 665 int32_t& iBytes, |
| 665 bool bProtoAlso = true) const; | 666 bool bProtoAlso = true) const; |
| 666 bool HasMapModuleKey(void* pKey, bool bProtoAlso = false); | 667 bool HasMapModuleKey(void* pKey, bool bProtoAlso = false); |
| 667 void RemoveMapModuleKey(void* pKey = nullptr); | 668 void RemoveMapModuleKey(void* pKey = nullptr); |
| 668 void MergeAllData(void* pDstModule, bool bUseSrcAttr = true); | 669 void MergeAllData(void* pDstModule); |
| 669 void MoveBufferMapData(CXFA_Node* pDstModule, void* pKey); | 670 void MoveBufferMapData(CXFA_Node* pDstModule, void* pKey); |
| 670 void MoveBufferMapData(CXFA_Node* pSrcModule, | 671 void MoveBufferMapData(CXFA_Node* pSrcModule, |
| 671 CXFA_Node* pDstModule, | 672 CXFA_Node* pDstModule, |
| 672 void* pKey, | 673 void* pKey, |
| 673 bool bRecursive = false); | 674 bool bRecursive = false); |
| 674 | 675 |
| 675 CXFA_Node* m_pNext; | 676 CXFA_Node* m_pNext; |
| 676 CXFA_Node* m_pChild; | 677 CXFA_Node* m_pChild; |
| 677 CXFA_Node* m_pLastChild; | 678 CXFA_Node* m_pLastChild; |
| 678 CXFA_Node* m_pParent; | 679 CXFA_Node* m_pParent; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 | 812 |
| 812 inline CXFA_Node* ToNode(CXFA_Object* pObj) { | 813 inline CXFA_Node* ToNode(CXFA_Object* pObj) { |
| 813 return pObj ? pObj->AsNode() : nullptr; | 814 return pObj ? pObj->AsNode() : nullptr; |
| 814 } | 815 } |
| 815 | 816 |
| 816 inline const CXFA_Node* ToNode(const CXFA_Object* pObj) { | 817 inline const CXFA_Node* ToNode(const CXFA_Object* pObj) { |
| 817 return pObj ? pObj->AsNode() : nullptr; | 818 return pObj ? pObj->AsNode() : nullptr; |
| 818 } | 819 } |
| 819 | 820 |
| 820 #endif // XFA_FXFA_PARSER_XFA_OBJECT_H_ | 821 #endif // XFA_FXFA_PARSER_XFA_OBJECT_H_ |
| OLD | NEW |