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

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

Issue 2071683002: Make code compile with clang_use_chrome_plugin (part V) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: clean up 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_object_imp.cpp ('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 // IXFA_Parser
21 21 void Release() override;
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 = NULL) 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 = NULL) 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;
30 CXFA_Node* GetRootNode() const override { return m_pRootNode; } 30 CXFA_Node* GetRootNode() const override;
31 CFDE_XMLDoc* GetXMLDoc() const override { return m_pXMLDoc; } 31 CFDE_XMLDoc* GetXMLDoc() const override;
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,
38 XFA_XDPPACKET ePacketID); 38 XFA_XDPPACKET ePacketID);
39 CXFA_Node* ParseAsXDPPacket_Config(CFDE_XMLNode* pXMLDocumentNode, 39 CXFA_Node* ParseAsXDPPacket_Config(CFDE_XMLNode* pXMLDocumentNode,
40 XFA_XDPPACKET ePacketID); 40 XFA_XDPPACKET ePacketID);
41 CXFA_Node* ParseAsXDPPacket_TemplateForm(CFDE_XMLNode* pXMLDocumentNode, 41 CXFA_Node* ParseAsXDPPacket_TemplateForm(CFDE_XMLNode* pXMLDocumentNode,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 XFA_XDPPACKET m_ePacketID; 80 XFA_XDPPACKET m_ePacketID;
81 FX_BOOL m_bDocumentParser; 81 FX_BOOL m_bDocumentParser;
82 friend class CXFA_DocumentParser; 82 friend class CXFA_DocumentParser;
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 // IXFA_Parser
91 void Release() override;
91 int32_t StartParse(IFX_FileRead* pStream, 92 int32_t StartParse(IFX_FileRead* pStream,
92 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override; 93 XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override;
93 int32_t DoParse(IFX_Pause* pPause = NULL) override; 94 int32_t DoParse(IFX_Pause* pPause = NULL) override;
94 int32_t ParseXMLData(const CFX_WideString& wsXML, 95 int32_t ParseXMLData(const CFX_WideString& wsXML,
95 CFDE_XMLNode*& pXMLNode, 96 CFDE_XMLNode*& pXMLNode,
96 IFX_Pause* pPause = NULL) override; 97 IFX_Pause* pPause = NULL) override;
97 void ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) override; 98 void ConstructXFANode(CXFA_Node* pXFANode, CFDE_XMLNode* pXMLNode) override;
98 CXFA_Document* GetFactory() const override { 99 CXFA_Document* GetFactory() const override;
99 return m_nodeParser.GetFactory(); 100 CXFA_Node* GetRootNode() const override;
100 } 101 CFDE_XMLDoc* GetXMLDoc() const override;
101 CXFA_Node* GetRootNode() const override { return m_nodeParser.GetRootNode(); } 102 CXFA_FFNotify* GetNotify() const;
102 CFDE_XMLDoc* GetXMLDoc() const override { return m_nodeParser.GetXMLDoc(); } 103 CXFA_Document* GetDocument() const;
103 CXFA_FFNotify* GetNotify() const { return m_pNotify; }
104 CXFA_Document* GetDocument() const { return m_pDocument; }
105 void CloseParser() override; 104 void CloseParser() override;
106 105
107 protected: 106 protected:
108 CXFA_SimpleParser m_nodeParser; 107 CXFA_SimpleParser m_nodeParser;
109 CXFA_FFNotify* m_pNotify; 108 CXFA_FFNotify* m_pNotify;
110 CXFA_Document* m_pDocument; 109 CXFA_Document* m_pDocument;
111 }; 110 };
112 typedef CFX_StackTemplate<CFDE_XMLNode*> CXFA_XMLNodeStack; 111 typedef CFX_StackTemplate<CFDE_XMLNode*> CXFA_XMLNodeStack;
113 112
114 class CXFA_XMLParser : public CFDE_XMLParser { 113 class CXFA_XMLParser : public CFDE_XMLParser {
115 public: 114 public:
116 CXFA_XMLParser(CFDE_XMLNode* pRoot, IFX_Stream* pStream); 115 CXFA_XMLParser(CFDE_XMLNode* pRoot, IFX_Stream* pStream);
117 ~CXFA_XMLParser(); 116 ~CXFA_XMLParser() override;
118 117
119 virtual void Release() { delete this; } 118 // CFDE_XMLParser
120 virtual int32_t DoParser(IFX_Pause* pPause); 119 void Release() override;
120 int32_t DoParser(IFX_Pause* pPause) override;
121 121
122 FX_FILESIZE m_nStart[2]; 122 FX_FILESIZE m_nStart[2];
123 size_t m_nSize[2]; 123 size_t m_nSize[2];
124 FX_FILESIZE m_nElementStart; 124 FX_FILESIZE m_nElementStart;
125 uint16_t m_dwCheckStatus; 125 uint16_t m_dwCheckStatus;
126 uint16_t m_dwCurrentCheckStatus; 126 uint16_t m_dwCurrentCheckStatus;
127 127
128 protected: 128 protected:
129 CFDE_XMLNode* m_pRoot; 129 CFDE_XMLNode* m_pRoot;
130 IFX_Stream* m_pStream; 130 IFX_Stream* m_pStream;
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_object_imp.cpp ('k') | xfa/fxfa/parser/xfa_parser_imp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698