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