Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: xfa/fxfa/parser/xfa_document_imp.cpp

Issue 2092853002: Pass needed value to CXFA_Node constructor (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | xfa/fxfa/parser/xfa_object.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return CreateNode(XFA_GetPacketByID(dwPacket), eElement); 155 return CreateNode(XFA_GetPacketByID(dwPacket), eElement);
156 } 156 }
157 157
158 CXFA_Node* CXFA_Document::CreateNode(const XFA_PACKETINFO* pPacket, 158 CXFA_Node* CXFA_Document::CreateNode(const XFA_PACKETINFO* pPacket,
159 XFA_Element eElement) { 159 XFA_Element eElement) {
160 if (!pPacket) 160 if (!pPacket)
161 return nullptr; 161 return nullptr;
162 162
163 const XFA_ELEMENTINFO* pElement = XFA_GetElementByID(eElement); 163 const XFA_ELEMENTINFO* pElement = XFA_GetElementByID(eElement);
164 if (pElement && (pElement->dwPackets & pPacket->eName)) { 164 if (pElement && (pElement->dwPackets & pPacket->eName)) {
165 CXFA_Node* pNode = new CXFA_Node(this, pPacket->eName, pElement->eName); 165 CXFA_Node* pNode = new CXFA_Node(this, pPacket->eName,
166 pElement->eObjectType, pElement->eName);
166 AddPurgeNode(pNode); 167 AddPurgeNode(pNode);
167 return pNode; 168 return pNode;
168 } 169 }
169 170
170 return nullptr; 171 return nullptr;
171 } 172 }
172 173
173 void CXFA_Document::AddPurgeNode(CXFA_Node* pNode) { 174 void CXFA_Document::AddPurgeNode(CXFA_Node* pNode) {
174 m_PurgeNodes.insert(pNode); 175 m_PurgeNodes.insert(pNode);
175 } 176 }
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) { 408 if (!mIDMap.Lookup(FX_HashCode_GetW(wsID, false), pProtoNode)) {
408 continue; 409 continue;
409 } 410 }
410 } 411 }
411 if (!pProtoNode) { 412 if (!pProtoNode) {
412 continue; 413 continue;
413 } 414 }
414 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode); 415 XFA_ProtoMerge_MergeNode(this, pUseHrefNode, pProtoNode);
415 } 416 }
416 } 417 }
OLDNEW
« no previous file with comments | « no previous file | xfa/fxfa/parser/xfa_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698