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

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

Issue 2095653002: Remove NULL in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase to master 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_imp.cpp ('k') | xfa/fxfa/parser/xfa_document_datamerger_imp.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 "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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 break; 59 break;
60 } 60 }
61 } 61 }
62 } 62 }
63 CXFA_Node* XFA_DataDescription_MaybeCreateDataNode( 63 CXFA_Node* XFA_DataDescription_MaybeCreateDataNode(
64 CXFA_Document* pDocument, 64 CXFA_Document* pDocument,
65 CXFA_Node* pDataParent, 65 CXFA_Node* pDataParent,
66 XFA_Element eNodeType, 66 XFA_Element eNodeType,
67 const CFX_WideString& wsName) { 67 const CFX_WideString& wsName) {
68 if (!pDataParent) { 68 if (!pDataParent) {
69 return NULL; 69 return nullptr;
70 } 70 }
71 CXFA_Node* pParentDDNode = pDataParent->GetDataDescriptionNode(); 71 CXFA_Node* pParentDDNode = pDataParent->GetDataDescriptionNode();
72 if (!pParentDDNode) { 72 if (!pParentDDNode) {
73 CXFA_Node* pDataNode = 73 CXFA_Node* pDataNode =
74 pDocument->CreateNode(XFA_XDPPACKET_Datasets, eNodeType); 74 pDocument->CreateNode(XFA_XDPPACKET_Datasets, eNodeType);
75 ASSERT(pDataNode); 75 ASSERT(pDataNode);
76 pDataNode->SetCData(XFA_ATTRIBUTE_Name, wsName); 76 pDataNode->SetCData(XFA_ATTRIBUTE_Name, wsName);
77 pDataNode->CreateXMLMappingNode(); 77 pDataNode->CreateXMLMappingNode();
78 pDataParent->InsertChild(pDataNode); 78 pDataParent->InsertChild(pDataNode);
79 pDataNode->SetFlag(XFA_NodeFlag_Initialized, false); 79 pDataNode->SetFlag(XFA_NodeFlag_Initialized, false);
(...skipping 29 matching lines...) Expand all
109 if (eNodeType == XFA_Element::DataValue && 109 if (eNodeType == XFA_Element::DataValue &&
110 pDDNode->GetEnum(XFA_ATTRIBUTE_Contains) == 110 pDDNode->GetEnum(XFA_ATTRIBUTE_Contains) ==
111 XFA_ATTRIBUTEENUM_MetaData) { 111 XFA_ATTRIBUTEENUM_MetaData) {
112 pDataNode->SetEnum(XFA_ATTRIBUTE_Contains, XFA_ATTRIBUTEENUM_MetaData); 112 pDataNode->SetEnum(XFA_ATTRIBUTE_Contains, XFA_ATTRIBUTEENUM_MetaData);
113 } 113 }
114 pDataParent->InsertChild(pDataNode); 114 pDataParent->InsertChild(pDataNode);
115 pDataNode->SetDataDescriptionNode(pDDNode); 115 pDataNode->SetDataDescriptionNode(pDDNode);
116 pDataNode->SetFlag(XFA_NodeFlag_Initialized, false); 116 pDataNode->SetFlag(XFA_NodeFlag_Initialized, false);
117 return pDataNode; 117 return pDataNode;
118 } 118 }
119 return NULL; 119 return nullptr;
120 } 120 }
121 } 121 }
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_basic_imp.cpp ('k') | xfa/fxfa/parser/xfa_document_datamerger_imp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698