| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 break; | 61 break; |
| 62 } | 62 } |
| 63 } | 63 } |
| 64 } | 64 } |
| 65 CXFA_Node* XFA_DataDescription_MaybeCreateDataNode( | 65 CXFA_Node* XFA_DataDescription_MaybeCreateDataNode( |
| 66 CXFA_Document* pDocument, | 66 CXFA_Document* pDocument, |
| 67 CXFA_Node* pDataParent, | 67 CXFA_Node* pDataParent, |
| 68 XFA_ELEMENT eNodeType, | 68 XFA_ELEMENT eNodeType, |
| 69 const CFX_WideString& wsName) { | 69 const CFX_WideString& wsName) { |
| 70 if (!pDataParent) { | 70 if (!pDataParent) { |
| 71 return NULL; | 71 return nullptr; |
| 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); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 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 nullptr; |
| 122 } | 122 } |
| 123 } | 123 } |
| OLD | NEW |