Index: xfa/fxfa/parser/xfa_document_imp.cpp |
diff --git a/xfa/fxfa/parser/xfa_document_imp.cpp b/xfa/fxfa/parser/xfa_document_imp.cpp |
index 45102c8fb64fc22f49c872faf09337ccfe90cf13..c785747df8482ed9954a63ac696804d3491557ad 100644 |
--- a/xfa/fxfa/parser/xfa_document_imp.cpp |
+++ b/xfa/fxfa/parser/xfa_document_imp.cpp |
@@ -83,7 +83,7 @@ CXFA_Object* CXFA_Document::GetXFAObject(XFA_HashCode dwNodeNameHash) { |
case XFA_HASHCODE_Data: { |
CXFA_Node* pDatasetsNode = ToNode(GetXFAObject(XFA_HASHCODE_Datasets)); |
if (!pDatasetsNode) { |
- return NULL; |
+ return nullptr; |
} |
for (CXFA_Node* pDatasetsChild = |
pDatasetsNode->GetFirstChildByClass(XFA_Element::DataGroup); |
@@ -106,43 +106,44 @@ CXFA_Object* CXFA_Document::GetXFAObject(XFA_HashCode dwNodeNameHash) { |
} |
} |
} |
- return NULL; |
+ return nullptr; |
Lei Zhang
2016/06/23 18:27:41
Funny indentation heer.
dsinclair
2016/06/23 18:46:54
It's the wacky {} thing they do were they put the
|
case XFA_HASHCODE_Record: { |
CXFA_Node* pData = ToNode(GetXFAObject(XFA_HASHCODE_Data)); |
- return pData ? pData->GetFirstChildByClass(XFA_Element::DataGroup) : NULL; |
+ return pData ? pData->GetFirstChildByClass(XFA_Element::DataGroup) |
+ : nullptr; |
} |
case XFA_HASHCODE_DataWindow: { |
- if (m_pScriptDataWindow == NULL) { |
+ if (!m_pScriptDataWindow) { |
m_pScriptDataWindow = new CScript_DataWindow(this); |
} |
return m_pScriptDataWindow; |
} |
case XFA_HASHCODE_Event: { |
- if (m_pScriptEvent == NULL) { |
+ if (!m_pScriptEvent) { |
m_pScriptEvent = new CScript_EventPseudoModel(this); |
} |
return m_pScriptEvent; |
} |
case XFA_HASHCODE_Host: { |
- if (m_pScriptHost == NULL) { |
+ if (!m_pScriptHost) { |
m_pScriptHost = new CScript_HostPseudoModel(this); |
} |
return m_pScriptHost; |
} |
case XFA_HASHCODE_Log: { |
- if (m_pScriptLog == NULL) { |
+ if (!m_pScriptLog) { |
m_pScriptLog = new CScript_LogPseudoModel(this); |
} |
return m_pScriptLog; |
} |
case XFA_HASHCODE_Signature: { |
- if (m_pScriptSignature == NULL) { |
+ if (!m_pScriptSignature) { |
m_pScriptSignature = new CScript_SignaturePseudoModel(this); |
} |
return m_pScriptSignature; |
} |
case XFA_HASHCODE_Layout: { |
- if (m_pScriptLayout == NULL) { |
+ if (!m_pScriptLayout) { |
m_pScriptLayout = new CScript_LayoutPseudoModel(this); |
} |
return m_pScriptLayout; |
@@ -268,7 +269,7 @@ XFA_VERSION CXFA_Document::RecognizeXFAVersionNumber( |
CXFA_Node* CXFA_Document::GetNodeByID(CXFA_Node* pRoot, |
const CFX_WideStringC& wsID) { |
if (!pRoot || wsID.IsEmpty()) { |
- return NULL; |
+ return nullptr; |
} |
CXFA_NodeIterator sIterator(pRoot); |
for (CXFA_Node* pNode = sIterator.GetCurrent(); pNode; |
@@ -280,12 +281,12 @@ CXFA_Node* CXFA_Document::GetNodeByID(CXFA_Node* pRoot, |
} |
} |
} |
- return NULL; |
+ return nullptr; |
} |
static void XFA_ProtoMerge_MergeNodeRecurse(CXFA_Document* pDocument, |
CXFA_Node* pDestNodeParent, |
CXFA_Node* pProtoNode) { |
- CXFA_Node* pExistingNode = NULL; |
+ CXFA_Node* pExistingNode = nullptr; |
for (CXFA_Node* pFormChild = |
pDestNodeParent->GetNodeItem(XFA_NODEITEM_FirstChild); |
pFormChild; |
@@ -310,7 +311,7 @@ static void XFA_ProtoMerge_MergeNodeRecurse(CXFA_Document* pDocument, |
} |
CXFA_Node* pNewNode = pProtoNode->Clone(TRUE); |
pNewNode->SetTemplateNode(pProtoNode); |
- pDestNodeParent->InsertChild(pNewNode, NULL); |
+ pDestNodeParent->InsertChild(pNewNode, nullptr); |
} |
static void XFA_ProtoMerge_MergeNode(CXFA_Document* pDocument, |
CXFA_Node* pDestNode, |
@@ -392,7 +393,7 @@ void CXFA_Document::DoProtoMerge() { |
if (!wsURI.IsEmpty() && wsURI != FX_WSTRC(L".")) { |
continue; |
} |
- CXFA_Node* pProtoNode = NULL; |
+ CXFA_Node* pProtoNode = nullptr; |
if (!wsSOM.IsEmpty()) { |
uint32_t dwFlag = XFA_RESOLVENODE_Children | XFA_RESOLVENODE_Attributes | |
XFA_RESOLVENODE_Properties | XFA_RESOLVENODE_Parent | |