| 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 #include "core/fxcrt/include/fx_ext.h" | 7 #include "core/fxcrt/include/fx_ext.h" |
| 8 #include "xfa/fxfa/app/xfa_ffnotify.h" | 8 #include "xfa/fxfa/app/xfa_ffnotify.h" |
| 9 #include "xfa/fxfa/parser/xfa_basic_imp.h" | 9 #include "xfa/fxfa/parser/xfa_basic_imp.h" |
| 10 #include "xfa/fxfa/parser/xfa_doclayout.h" | 10 #include "xfa/fxfa/parser/xfa_doclayout.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 return CreateNode(XFA_GetPacketByID(dwPacket), eElement); | 150 return CreateNode(XFA_GetPacketByID(dwPacket), eElement); |
| 151 } | 151 } |
| 152 | 152 |
| 153 CXFA_Node* CXFA_Document::CreateNode(const XFA_PACKETINFO* pPacket, | 153 CXFA_Node* CXFA_Document::CreateNode(const XFA_PACKETINFO* pPacket, |
| 154 XFA_Element eElement) { | 154 XFA_Element eElement) { |
| 155 if (!pPacket) | 155 if (!pPacket) |
| 156 return nullptr; | 156 return nullptr; |
| 157 | 157 |
| 158 const XFA_ELEMENTINFO* pElement = XFA_GetElementByID(eElement); | 158 const XFA_ELEMENTINFO* pElement = XFA_GetElementByID(eElement); |
| 159 if (pElement && (pElement->dwPackets & pPacket->eName)) { | 159 if (pElement && (pElement->dwPackets & pPacket->eName)) { |
| 160 CXFA_Node* pNode = new CXFA_Node(this, pPacket->eName, | 160 CXFA_Node* pNode = |
| 161 pElement->eObjectType, pElement->eName); | 161 new CXFA_Node(this, pPacket->eName, pElement->eObjectType, |
| 162 pElement->eName, pElement->uHash, pElement->pName); |
| 162 AddPurgeNode(pNode); | 163 AddPurgeNode(pNode); |
| 163 return pNode; | 164 return pNode; |
| 164 } | 165 } |
| 165 | 166 |
| 166 return nullptr; | 167 return nullptr; |
| 167 } | 168 } |
| 168 | 169 |
| 169 void CXFA_Document::AddPurgeNode(CXFA_Node* pNode) { | 170 void CXFA_Document::AddPurgeNode(CXFA_Node* pNode) { |
| 170 m_PurgeNodes.insert(pNode); | 171 m_PurgeNodes.insert(pNode); |
| 171 } | 172 } |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 403 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) { | 404 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) { |
| 404 continue; | 405 continue; |
| 405 } | 406 } |
| 406 } | 407 } |
| 407 if (!pProtoNode) { | 408 if (!pProtoNode) { |
| 408 continue; | 409 continue; |
| 409 } | 410 } |
| 410 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode); | 411 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode); |
| 411 } | 412 } |
| 412 } | 413 } |
| OLD | NEW |