From 20eb52e66c565d36a78dc1399f04f7485ccf8fe6 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 13 Feb 2018 21:09:32 +0000 Subject: Cleanup CFX_XMLNode and friends This CL removes unused methods from CFX_XMLNode, adds an AppendChild to handle the case of a -1 index to InsertChildNode, removes the InsertChildNode return value which is unused and cleans up various other things. Change-Id: I3a022e4dc2afffa6893ad11014034dd7ed301f13 Reviewed-on: https://pdfium-review.googlesource.com/26510 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- xfa/fxfa/parser/cxfa_simple_parser.cpp | 2 +- xfa/fxfa/parser/xfa_document_datamerger_imp.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'xfa/fxfa/parser') diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp index 1864532f28..0bce147223 100644 --- a/xfa/fxfa/parser/cxfa_simple_parser.cpp +++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp @@ -768,7 +768,7 @@ CXFA_Node* CXFA_SimpleParser::ParseAsXDPPacket_Data( static_cast(pXMLDocumentNode) ->RemoveAttribute(L"xmlns:xfa"); } - pDataElement->InsertChildNode(pXMLDocumentNode); + pDataElement->AppendChild(pXMLDocumentNode); pDataXMLNode = pDataElement; } diff --git a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp index 5b098cce42..fed59158aa 100644 --- a/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp +++ b/xfa/fxfa/parser/xfa_document_datamerger_imp.cpp @@ -1375,7 +1375,7 @@ void CXFA_Document::DoDataMerge() { CreateNode(XFA_PacketType::Datasets, XFA_Element::DataModel); pDatasetsRoot->JSObject()->SetCData(XFA_Attribute::Name, L"datasets", false, false); - m_pRootNode->GetXMLMappingNode()->InsertChildNode(pDatasetsXMLNode); + m_pRootNode->GetXMLMappingNode()->AppendChild(pDatasetsXMLNode); m_pRootNode->InsertChild(pDatasetsRoot, nullptr); pDatasetsRoot->SetXMLMappingNode(pDatasetsXMLNode); } -- cgit v1.2.3