Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: xfa/fxfa/parser/xfa_parser_imp.h

Issue 2031873003: Get rid of NULLs in xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@nullptr_fpdfsdk
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « xfa/fxfa/parser/xfa_parser.h ('k') | xfa/fxfa/parser/xfa_parser_imp.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #ifndef XFA_FXFA_PARSER_XFA_PARSER_IMP_H_ 7 #ifndef XFA_FXFA_PARSER_XFA_PARSER_IMP_H_
8 #define XFA_FXFA_PARSER_XFA_PARSER_IMP_H_ 8 #define XFA_FXFA_PARSER_XFA_PARSER_IMP_H_
9 9
10 #include "xfa/fde/xml/fde_xml_imp.h" 10 #include "xfa/fde/xml/fde_xml_imp.h"
11 #include "xfa/fxfa/parser/xfa_parser.h" 11 #include "xfa/fxfa/parser/xfa_parser.h"
12 12
13 class CXFA_XMLParser; 13 class CXFA_XMLParser;
14 14
15 class CXFA_SimpleParser : public IXFA_Parser { 15 class CXFA_SimpleParser : public IXFA_Parser {
16 public: 16 public:
17 CXFA_SimpleParser(CXFA_Document* pFactory, FX_BOOL bDocumentParser = FALSE); 17 CXFA_SimpleParser(CXFA_Document* pFactory, FX_BOOL bDocumentParser = FALSE);
18 ~CXFA_SimpleParser() override; 18 ~CXFA_SimpleParser() override;
19 19
20 void Release() override { delete this; } 20 void Release() override { delete this; }
21 21
22 int32_t StartParse(IFX_FileRead* pStream, 22 int32_t StartParse(IFX_FileRead* pStream,
23 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override; 23 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override;
24 int32_t DoParse(IFX_Pause* pPause = NULL) override; 24 int32_t DoParse(IFX_Pause* pPause = nullptr) override;
25 int32_t ParseXMLData(const CFX_WideString& wsXML, 25 int32_t ParseXMLData(const CFX_WideString& wsXML,
26 CFDE_XMLNode*& pXMLNode, 26 CFDE_XMLNode*& pXMLNode,
27 IFX_Pause* pPause = NULL) override; 27 IFX_Pause* pPause = nullptr) override;
28 void ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) override; 28 void ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) override;
29 CXFA_Document* GetFactory() const override { return m_pFactory; } 29 CXFA_Document* GetFactory() const override { return m_pFactory; }
30 CXFA_Node* GetRootNode() const override { return m_pRootNode; } 30 CXFA_Node* GetRootNode() const override { return m_pRootNode; }
31 CFDE_XMLDoc* GetXMLDoc() const override { return m_pXMLDoc; } 31 CFDE_XMLDoc* GetXMLDoc() const override { return m_pXMLDoc; }
32 void CloseParser() override; 32 void CloseParser() override;
33 33
34 protected: 34 protected:
35 CXFA_Node* ParseAsXDPPacket(CFDE_XMLNode* pXMLDocumentNode, 35 CXFA_Node* ParseAsXDPPacket(CFDE_XMLNode* pXMLDocumentNode,
36 XFA_XDPPACKET ePacketID); 36 XFA_XDPPACKET ePacketID);
37 CXFA_Node* ParseAsXDPPacket_XDP(CFDE_XMLNode* pXMLDocumentNode, 37 CXFA_Node* ParseAsXDPPacket_XDP(CFDE_XMLNode* pXMLDocumentNode,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 }; 83 };
84 84
85 class CXFA_DocumentParser : public IXFA_Parser { 85 class CXFA_DocumentParser : public IXFA_Parser {
86 public: 86 public:
87 CXFA_DocumentParser(CXFA_FFNotify* pNotify); 87 CXFA_DocumentParser(CXFA_FFNotify* pNotify);
88 ~CXFA_DocumentParser() override; 88 ~CXFA_DocumentParser() override;
89 89
90 void Release() override { delete this; } 90 void Release() override { delete this; }
91 int32_t StartParse(IFX_FileRead* pStream, 91 int32_t StartParse(IFX_FileRead* pStream,
92 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override; 92 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override;
93 int32_t DoParse(IFX_Pause* pPause = NULL) override; 93 int32_t DoParse(IFX_Pause* pPause = nullptr) override;
94 int32_t ParseXMLData(const CFX_WideString& wsXML, 94 int32_t ParseXMLData(const CFX_WideString& wsXML,
95 CFDE_XMLNode*& pXMLNode, 95 CFDE_XMLNode*& pXMLNode,
96 IFX_Pause* pPause = NULL) override; 96 IFX_Pause* pPause = nullptr) override;
97 void ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) override; 97 void ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) override;
98 CXFA_Document* GetFactory() const override { 98 CXFA_Document* GetFactory() const override {
99 return m_nodeParser.GetFactory(); 99 return m_nodeParser.GetFactory();
100 } 100 }
101 CXFA_Node* GetRootNode() const override { return m_nodeParser.GetRootNode(); } 101 CXFA_Node* GetRootNode() const override { return m_nodeParser.GetRootNode(); }
102 CFDE_XMLDoc* GetXMLDoc() const override { return m_nodeParser.GetXMLDoc(); } 102 CFDE_XMLDoc* GetXMLDoc() const override { return m_nodeParser.GetXMLDoc(); }
103 CXFA_FFNotify* GetNotify() const { return m_pNotify; } 103 CXFA_FFNotify* GetNotify() const { return m_pNotify; }
104 CXFA_Document* GetDocument() const { return m_pDocument; } 104 CXFA_Document* GetDocument() const { return m_pDocument; }
105 void CloseParser() override; 105 void CloseParser() override;
106 106
(...skipping 24 matching lines...) Expand all
131 CFDE_XMLSyntaxParser* m_pParser; 131 CFDE_XMLSyntaxParser* m_pParser;
132 CFDE_XMLNode* m_pParent; 132 CFDE_XMLNode* m_pParent;
133 CFDE_XMLNode* m_pChild; 133 CFDE_XMLNode* m_pChild;
134 CXFA_XMLNodeStack m_NodeStack; 134 CXFA_XMLNodeStack m_NodeStack;
135 CFX_WideString m_ws1; 135 CFX_WideString m_ws1;
136 CFX_WideString m_ws2; 136 CFX_WideString m_ws2;
137 FDE_XmlSyntaxResult m_syntaxParserResult; 137 FDE_XmlSyntaxResult m_syntaxParserResult;
138 }; 138 };
139 139
140 #endif // XFA_FXFA_PARSER_XFA_PARSER_IMP_H_ 140 #endif // XFA_FXFA_PARSER_XFA_PARSER_IMP_H_
OLDNEW
« no previous file with comments | « xfa/fxfa/parser/xfa_parser.h ('k') | xfa/fxfa/parser/xfa_parser_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698