From 876efaa771afe7ebd7a97dc748abdbb5b266a99b Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 12 Apr 2018 13:39:28 +0000 Subject: Rename CXFA_SimpleParser to CXFA_DocumentParser The CXFA_SimpleParser is handling the XFA document parsing. This CL renames the class to make it clearer that this is the XFA document parser. Change-Id: Ia290df2671fba9efa221ae997156ee4846749b02 Reviewed-on: https://pdfium-review.googlesource.com/30231 Reviewed-by: Henrique Nakashima Commit-Queue: dsinclair --- xfa/fxfa/parser/cxfa_simple_parser.h | 83 ------------------------------------ 1 file changed, 83 deletions(-) delete mode 100644 xfa/fxfa/parser/cxfa_simple_parser.h (limited to 'xfa/fxfa/parser/cxfa_simple_parser.h') diff --git a/xfa/fxfa/parser/cxfa_simple_parser.h b/xfa/fxfa/parser/cxfa_simple_parser.h deleted file mode 100644 index 157983fe8e..0000000000 --- a/xfa/fxfa/parser/cxfa_simple_parser.h +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef XFA_FXFA_PARSER_CXFA_SIMPLE_PARSER_H_ -#define XFA_FXFA_PARSER_CXFA_SIMPLE_PARSER_H_ - -#include -#include - -#include "core/fxcrt/xml/cfx_xmlnode.h" -#include "xfa/fxfa/fxfa_basic.h" - -class CXFA_Document; -class CXFA_Node; -class CFX_XMLDoc; -class CFX_XMLInstruction; -class IFX_SeekableStream; -class CFX_SeekableStreamProxy; - -class CXFA_SimpleParser { - public: - CXFA_SimpleParser(); - explicit CXFA_SimpleParser(CXFA_Document* pFactory); - ~CXFA_SimpleParser(); - - bool Parse(const RetainPtr& pStream, - XFA_PacketType ePacketID); - - CFX_XMLNode* ParseXMLData(const ByteString& wsXML); - void ConstructXFANode(CXFA_Node* pXFANode, CFX_XMLNode* pXMLNode); - - std::unique_ptr GetXMLRoot() { return std::move(m_pNodeTree); } - CXFA_Node* GetRootNode() const; - - // Called later for the ctor with no parameters. - void SetFactory(CXFA_Document* pFactory); - - private: - CXFA_Node* ParseAsXDPPacket(CFX_XMLNode* pXMLDocumentNode, - XFA_PacketType ePacketID); - CXFA_Node* ParseAsXDPPacket_XDP(CFX_XMLNode* pXMLDocumentNode); - CXFA_Node* ParseAsXDPPacket_Config(CFX_XMLNode* pXMLDocumentNode); - CXFA_Node* ParseAsXDPPacket_Template(CFX_XMLNode* pXMLDocumentNode); - CXFA_Node* ParseAsXDPPacket_Form(CFX_XMLNode* pXMLDocumentNode); - CXFA_Node* ParseAsXDPPacket_Data(CFX_XMLNode* pXMLDocumentNode); - CXFA_Node* ParseAsXDPPacket_LocaleConnectionSourceSet( - CFX_XMLNode* pXMLDocumentNode, - XFA_PacketType packet_type, - XFA_Element element); - CXFA_Node* ParseAsXDPPacket_Xdc(CFX_XMLNode* pXMLDocumentNode); - CXFA_Node* ParseAsXDPPacket_User(CFX_XMLNode* pXMLDocumentNode); - CXFA_Node* NormalLoader(CXFA_Node* pXFANode, - CFX_XMLNode* pXMLDoc, - XFA_PacketType ePacketID, - bool bUseAttribute); - CXFA_Node* DataLoader(CXFA_Node* pXFANode, - CFX_XMLNode* pXMLDoc, - bool bDoTransform); - CXFA_Node* UserPacketLoader(CXFA_Node* pXFANode, CFX_XMLNode* pXMLDoc); - void ParseContentNode(CXFA_Node* pXFANode, - CFX_XMLNode* pXMLNode, - XFA_PacketType ePacketID); - void ParseDataValue(CXFA_Node* pXFANode, - CFX_XMLNode* pXMLNode, - XFA_PacketType ePacketID); - void ParseDataGroup(CXFA_Node* pXFANode, - CFX_XMLNode* pXMLNode, - XFA_PacketType ePacketID); - void ParseInstruction(CXFA_Node* pXFANode, - CFX_XMLInstruction* pXMLInstruction, - XFA_PacketType ePacketID); - - UnownedPtr m_pFactory; - std::unique_ptr m_pNodeTree; - // TODO(dsinclair): Figure out who owns this. - CXFA_Node* m_pRootNode = nullptr; - const bool m_bDocumentParser; -}; - -#endif // XFA_FXFA_PARSER_CXFA_SIMPLE_PARSER_H_ -- cgit v1.2.3