From 83cb4369f97a244fc34633b31b3b75abb993a392 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 14 Nov 2017 18:40:53 +0000 Subject: Remove CXFA_Node friend class This CL removes the CXFA_Document friendship with CXFA_Node and adds a CXFA_Node::Create method to create the node objects. Change-Id: If77f9a631b3aa0720803c869446135b8cc17d3c3 Reviewed-on: https://pdfium-review.googlesource.com/18250 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- xfa/fxfa/parser/cxfa_node.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xfa/fxfa/parser/cxfa_node.cpp') diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index a91b87766d..2ab0b18cf5 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -143,6 +143,14 @@ const XFA_ATTRIBUTEENUMINFO* GetAttributeEnumByID(XFA_ATTRIBUTEENUM eName) { return g_XFAEnumData + eName; } +// static +std::unique_ptr CXFA_Node::Create(CXFA_Document* doc, + XFA_XDPPACKET packet, + const XFA_ELEMENTINFO* pElement) { + return std::unique_ptr(new CXFA_Node( + doc, packet, pElement->eObjectType, pElement->eName, pElement->pName)); +} + CXFA_Node::CXFA_Node(CXFA_Document* pDoc, uint16_t ePacket, XFA_ObjectType oType, -- cgit v1.2.3