| 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 "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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |