summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/cxfa_simple_parser.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2018-04-12 13:15:59 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-12 13:15:59 +0000
commita995d6fd9b862dbd37aebb9c323766bb5d11d389 (patch)
treedb204479d0c854d1e30840794972d5115cbe80f4 /xfa/fxfa/parser/cxfa_simple_parser.h
parent332139df2c3c0826069fa61bcd436309fcdf5a6f (diff)
downloadpdfium-a995d6fd9b862dbd37aebb9c323766bb5d11d389.tar.xz
Allow retrieving the XML tree from the CFX_XMLDoc
This CL allows the CXFA_SimpleParser to retrieve the XML tree from the CFX_XMLDoc. This way, we don't have to keep the doc around and can store the pointer to the tree in the CXFA_SimpleParser. Change-Id: I5b478acbe61e6f1ca5fa04d03133a2b327a0cb1c Reviewed-on: https://pdfium-review.googlesource.com/30210 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/parser/cxfa_simple_parser.h')
-rw-r--r--xfa/fxfa/parser/cxfa_simple_parser.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/xfa/fxfa/parser/cxfa_simple_parser.h b/xfa/fxfa/parser/cxfa_simple_parser.h
index cef9c9af54..61edf8e8e6 100644
--- a/xfa/fxfa/parser/cxfa_simple_parser.h
+++ b/xfa/fxfa/parser/cxfa_simple_parser.h
@@ -25,13 +25,12 @@ class CXFA_SimpleParser {
explicit CXFA_SimpleParser(CXFA_Document* pFactory);
~CXFA_SimpleParser();
- int32_t Parse(const RetainPtr<IFX_SeekableStream>& pStream,
- XFA_PacketType ePacketID);
+ bool Parse(const RetainPtr<IFX_SeekableStream>& pStream,
+ XFA_PacketType ePacketID);
CFX_XMLNode* ParseXMLData(const ByteString& wsXML);
void ConstructXFANode(CXFA_Node* pXFANode, CFX_XMLNode* pXMLNode);
CXFA_Node* GetRootNode() const;
- void CloseParser();
// Called later for the ctor with no parameters.
void SetFactory(CXFA_Document* pFactory);
@@ -71,10 +70,8 @@ class CXFA_SimpleParser {
CFX_XMLInstruction* pXMLInstruction,
XFA_PacketType ePacketID);
- std::unique_ptr<CFX_XMLDoc> m_pXMLDoc;
- RetainPtr<CFX_SeekableStreamProxy> m_pStream;
- RetainPtr<IFX_SeekableStream> m_pFileRead;
UnownedPtr<CXFA_Document> m_pFactory;
+ std::unique_ptr<CFX_XMLNode> m_pNodeTree;
// TODO(dsinclair): Figure out who owns this.
CXFA_Node* m_pRootNode = nullptr;
const bool m_bDocumentParser;