diff options
author | Jun Fang <jun_fang@foxitsoftware.com> | 2015-10-27 11:38:33 +0800 |
---|---|---|
committer | Jun Fang <jun_fang@foxitsoftware.com> | 2015-10-27 11:38:33 +0800 |
commit | 24967515b8be77a79aa1599f8fbf5d3ecbcd1769 (patch) | |
tree | 13c93fb8555d6ae32d2a363b12fe2f763ce26df9 /xfa/src/fxfa | |
parent | c13090439e1fbfd8a18c358058f137f897a7477b (diff) | |
download | pdfium-24967515b8be77a79aa1599f8fbf5d3ecbcd1769.tar.xz |
Address review comments
Diffstat (limited to 'xfa/src/fxfa')
-rw-r--r-- | xfa/src/fxfa/src/parser/xfa_parser_imp.cpp | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp index e782f064ba..48547d7e9f 100644 --- a/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp +++ b/xfa/src/fxfa/src/parser/xfa_parser_imp.cpp @@ -386,12 +386,12 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( pXMLDocumentNode, XFA_GetPacketByIndex(XFA_PACKET_XDP)->pName,
XFA_GetPacketByIndex(XFA_PACKET_XDP)->pURI,
XFA_GetPacketByIndex(XFA_PACKET_XDP)->eFlags)) {
- return NULL;
+ return nullptr;
}
CXFA_Node* pXFARootNode =
m_pFactory->CreateNode(XFA_XDPPACKET_XDP, XFA_ELEMENT_Xfa);
if (!pXFARootNode) {
- return NULL;
+ return nullptr;
}
m_pRootNode = pXFARootNode;
pXFARootNode->SetCData(XFA_ATTRIBUTE_Name, FX_WSTRC(L"xfa"));
@@ -408,8 +408,8 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( }
}
}
- IFDE_XMLNode* pXMLConfigDOMRoot = NULL;
- CXFA_Node* pXFAConfigDOMRoot = NULL;
+ IFDE_XMLNode* pXMLConfigDOMRoot = nullptr;
+ CXFA_Node* pXFAConfigDOMRoot = nullptr;
{
for (IFDE_XMLNode* pChildItem =
pXMLDocumentNode->GetNodeItem(IFDE_XMLNode::FirstChild);
@@ -423,7 +423,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( }
if (CXFA_Node* pChildNode =
pXFARootNode->GetFirstChildByName(pPacketInfo->uHash)) {
- return NULL;
+ return nullptr;
}
pXMLConfigDOMRoot = pChildItem;
pXFAConfigDOMRoot =
@@ -431,9 +431,9 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( pXFARootNode->InsertChild(pXFAConfigDOMRoot, NULL);
}
}
- IFDE_XMLNode* pXMLDatasetsDOMRoot = NULL;
- IFDE_XMLNode* pXMLFormDOMRoot = NULL;
- IFDE_XMLNode* pXMLTemplateDOMRoot = NULL;
+ IFDE_XMLNode* pXMLDatasetsDOMRoot = nullptr;
+ IFDE_XMLNode* pXMLFormDOMRoot = nullptr;
+ IFDE_XMLNode* pXMLTemplateDOMRoot = nullptr;
{
for (IFDE_XMLNode* pChildItem =
pXMLDocumentNode->GetNodeItem(IFDE_XMLNode::FirstChild);
@@ -454,7 +454,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( if (!XFA_FDEExtension_MatchNodeName(pElement, pPacketInfo->pName,
pPacketInfo->pURI,
pPacketInfo->eFlags)) {
- pPacketInfo = NULL;
+ pPacketInfo = nullptr;
}
}
XFA_XDPPACKET ePacket =
@@ -464,20 +464,18 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( }
if (ePacket == XFA_XDPPACKET_Datasets) {
if (pXMLDatasetsDOMRoot) {
- pXMLDatasetsDOMRoot = NULL;
- return NULL;
+ return nullptr;
}
pXMLDatasetsDOMRoot = pElement;
} else if (ePacket == XFA_XDPPACKET_Form) {
if (pXMLFormDOMRoot) {
- pXMLFormDOMRoot = NULL;
- return NULL;
+ return nullptr;
}
pXMLFormDOMRoot = pElement;
} else if (ePacket == XFA_XDPPACKET_Template) {
if (pXMLTemplateDOMRoot) {
- // Find a duplicate template packet
- return NULL;
+ // Found a duplicate template packet.
+ return nullptr;
}
CXFA_Node* pPacketNode = ParseAsXDPPacket(pElement, ePacket);
if (pPacketNode) {
@@ -490,7 +488,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( if (pPacketInfo &&
(pPacketInfo->eFlags & XFA_XDPPACKET_FLAGS_SUPPORTONE) &&
pXFARootNode->GetFirstChildByName(pPacketInfo->uHash)) {
- return NULL;
+ return nullptr;
}
pXFARootNode->InsertChild(pPacketNode);
}
@@ -499,7 +497,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_XDP( }
if (!pXMLTemplateDOMRoot) {
// No template is found.
- return NULL;
+ return nullptr;
}
if (pXMLDatasetsDOMRoot) {
CXFA_Node* pPacketNode =
|