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

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

Issue 2083453003: Split the XFA_OBJECTTYPE enum into two parts. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix == nullptr 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 | « xfa/fxfa/parser/xfa_basic_data.cpp ('k') | xfa/fxfa/parser/xfa_document_datamerger_imp.cpp » ('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 "xfa/fxfa/parser/xfa_doclayout.h" 7 #include "xfa/fxfa/parser/xfa_doclayout.h"
8 #include "xfa/fxfa/parser/xfa_document.h" 8 #include "xfa/fxfa/parser/xfa_document.h"
9 #include "xfa/fxfa/parser/xfa_localemgr.h" 9 #include "xfa/fxfa/parser/xfa_localemgr.h"
10 #include "xfa/fxfa/parser/xfa_object.h" 10 #include "xfa/fxfa/parser/xfa_object.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 return NULL; 71 return NULL;
72 } 72 }
73 CXFA_Node* pParentDDNode = pDataParent->GetDataDescriptionNode(); 73 CXFA_Node* pParentDDNode = pDataParent->GetDataDescriptionNode();
74 if (!pParentDDNode) { 74 if (!pParentDDNode) {
75 CXFA_Node* pDataNode = 75 CXFA_Node* pDataNode =
76 pDocument->CreateNode(XFA_XDPPACKET_Datasets, eNodeType); 76 pDocument->CreateNode(XFA_XDPPACKET_Datasets, eNodeType);
77 ASSERT(pDataNode); 77 ASSERT(pDataNode);
78 pDataNode->SetCData(XFA_ATTRIBUTE_Name, wsName); 78 pDataNode->SetCData(XFA_ATTRIBUTE_Name, wsName);
79 pDataNode->CreateXMLMappingNode(); 79 pDataNode->CreateXMLMappingNode();
80 pDataParent->InsertChild(pDataNode); 80 pDataParent->InsertChild(pDataNode);
81 pDataNode->SetFlag(XFA_NODEFLAG_Initialized, false); 81 pDataNode->SetFlag(XFA_NodeFlag_Initialized, false);
82 return pDataNode; 82 return pDataNode;
83 } else { 83 } else {
84 CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_DDGroup> 84 CXFA_NodeIteratorTemplate<CXFA_Node, CXFA_TraverseStrategy_DDGroup>
85 sIterator(pParentDDNode); 85 sIterator(pParentDDNode);
86 for (CXFA_Node* pDDGroupNode = sIterator.GetCurrent(); pDDGroupNode; 86 for (CXFA_Node* pDDGroupNode = sIterator.GetCurrent(); pDDGroupNode;
87 pDDGroupNode = sIterator.MoveToNext()) { 87 pDDGroupNode = sIterator.MoveToNext()) {
88 if (pDDGroupNode != pParentDDNode) { 88 if (pDDGroupNode != pParentDDNode) {
89 if (pDDGroupNode->GetClassID() != XFA_ELEMENT_DataGroup) { 89 if (pDDGroupNode->GetClassID() != XFA_ELEMENT_DataGroup) {
90 continue; 90 continue;
91 } 91 }
(...skipping 16 matching lines...) Expand all
108 ASSERT(pDataNode); 108 ASSERT(pDataNode);
109 pDataNode->SetCData(XFA_ATTRIBUTE_Name, wsName); 109 pDataNode->SetCData(XFA_ATTRIBUTE_Name, wsName);
110 pDataNode->CreateXMLMappingNode(); 110 pDataNode->CreateXMLMappingNode();
111 if (eNodeType == XFA_ELEMENT_DataValue && 111 if (eNodeType == XFA_ELEMENT_DataValue &&
112 pDDNode->GetEnum(XFA_ATTRIBUTE_Contains) == 112 pDDNode->GetEnum(XFA_ATTRIBUTE_Contains) ==
113 XFA_ATTRIBUTEENUM_MetaData) { 113 XFA_ATTRIBUTEENUM_MetaData) {
114 pDataNode->SetEnum(XFA_ATTRIBUTE_Contains, XFA_ATTRIBUTEENUM_MetaData); 114 pDataNode->SetEnum(XFA_ATTRIBUTE_Contains, XFA_ATTRIBUTEENUM_MetaData);
115 } 115 }
116 pDataParent->InsertChild(pDataNode); 116 pDataParent->InsertChild(pDataNode);
117 pDataNode->SetDataDescriptionNode(pDDNode); 117 pDataNode->SetDataDescriptionNode(pDDNode);
118 pDataNode->SetFlag(XFA_NODEFLAG_Initialized, false); 118 pDataNode->SetFlag(XFA_NodeFlag_Initialized, false);
119 return pDataNode; 119 return pDataNode;
120 } 120 }
121 return NULL; 121 return NULL;
122 } 122 }
123 } 123 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_basic_data.cpp ('k') | xfa/fxfa/parser/xfa_document_datamerger_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698