summaryrefslogtreecommitdiff
path: root/xfa/fxfa/parser/xfa_parser_imp.h
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa/parser/xfa_parser_imp.h')
-rw-r--r--xfa/fxfa/parser/xfa_parser_imp.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/xfa/fxfa/parser/xfa_parser_imp.h b/xfa/fxfa/parser/xfa_parser_imp.h
index eb98966398..2485ddfcd2 100644
--- a/xfa/fxfa/parser/xfa_parser_imp.h
+++ b/xfa/fxfa/parser/xfa_parser_imp.h
@@ -7,18 +7,18 @@
#ifndef XFA_FXFA_PARSER_XFA_PARSER_IMP_H_
#define XFA_FXFA_PARSER_XFA_PARSER_IMP_H_
-#include <memory>
-
#include "xfa/fde/xml/fde_xml_imp.h"
#include "xfa/fxfa/parser/xfa_parser.h"
class CXFA_XMLParser;
-class CXFA_SimpleParser final : public IXFA_Parser {
+class CXFA_SimpleParser : public IXFA_Parser {
public:
CXFA_SimpleParser(CXFA_Document* pFactory, FX_BOOL bDocumentParser = FALSE);
~CXFA_SimpleParser() override;
+ void Release() override { delete this; }
+
int32_t StartParse(IFX_FileRead* pStream,
XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override;
int32_t DoParse(IFX_Pause* pPause = NULL) override;
@@ -82,11 +82,12 @@ class CXFA_SimpleParser final : public IXFA_Parser {
friend class CXFA_DocumentParser;
};
-class CXFA_DocumentParser final : public IXFA_Parser {
+class CXFA_DocumentParser : public IXFA_Parser {
public:
CXFA_DocumentParser(CXFA_FFNotify* pNotify);
~CXFA_DocumentParser() override;
+ void Release() override { delete this; }
int32_t StartParse(IFX_FileRead* pStream,
XFA_XDPPACKET ePacketID = XFA_XDPPACKET_XDP) override;
int32_t DoParse(IFX_Pause* pPause = NULL) override;
@@ -110,12 +111,13 @@ class CXFA_DocumentParser final : public IXFA_Parser {
};
typedef CFX_StackTemplate<CFDE_XMLNode*> CXFA_XMLNodeStack;
-class CXFA_XMLParser : public IFDE_XMLParser {
+class CXFA_XMLParser : public CFDE_XMLParser {
public:
CXFA_XMLParser(CFDE_XMLNode* pRoot, IFX_Stream* pStream);
- ~CXFA_XMLParser() override;
+ ~CXFA_XMLParser();
- int32_t DoParser(IFX_Pause* pPause) override;
+ virtual void Release() { delete this; }
+ virtual int32_t DoParser(IFX_Pause* pPause);
FX_FILESIZE m_nStart[2];
size_t m_nSize[2];
@@ -126,7 +128,7 @@ class CXFA_XMLParser : public IFDE_XMLParser {
protected:
CFDE_XMLNode* m_pRoot;
IFX_Stream* m_pStream;
- std::unique_ptr<CFDE_XMLSyntaxParser> m_pParser;
+ CFDE_XMLSyntaxParser* m_pParser;
CFDE_XMLNode* m_pParent;
CFDE_XMLNode* m_pChild;
CXFA_XMLNodeStack m_NodeStack;