OLD | NEW |
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 #include "xfa/fxfa/parser/xfa_parser_imp.h" | 7 #include "xfa/fxfa/parser/xfa_parser_imp.h" |
8 | 8 |
9 #include "xfa/fde/xml/fde_xml_imp.h" | 9 #include "xfa/fde/xml/fde_xml_imp.h" |
10 #include "xfa/fgas/crt/fgas_codepage.h" | 10 #include "xfa/fgas/crt/fgas_codepage.h" |
11 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" | 11 #include "xfa/fxfa/fm2js/xfa_fm2jsapi.h" |
| 12 #include "xfa/fxfa/include/xfa_checksum.h" |
12 #include "xfa/fxfa/parser/xfa_basic_imp.h" | 13 #include "xfa/fxfa/parser/xfa_basic_imp.h" |
13 #include "xfa/fxfa/parser/xfa_docdata.h" | 14 #include "xfa/fxfa/parser/xfa_docdata.h" |
14 #include "xfa/fxfa/parser/xfa_doclayout.h" | 15 #include "xfa/fxfa/parser/xfa_doclayout.h" |
15 #include "xfa/fxfa/parser/xfa_document.h" | 16 #include "xfa/fxfa/parser/xfa_document.h" |
16 #include "xfa/fxfa/parser/xfa_localemgr.h" | 17 #include "xfa/fxfa/parser/xfa_localemgr.h" |
17 #include "xfa/fxfa/parser/xfa_object.h" | 18 #include "xfa/fxfa/parser/xfa_object.h" |
18 #include "xfa/fxfa/parser/xfa_parser.h" | 19 #include "xfa/fxfa/parser/xfa_parser.h" |
19 #include "xfa/fxfa/parser/xfa_script.h" | 20 #include "xfa/fxfa/parser/xfa_script.h" |
20 #include "xfa/fxfa/parser/xfa_utils.h" | 21 #include "xfa/fxfa/parser/xfa_utils.h" |
21 #include "xfa/include/fxfa/xfa_checksum.h" | |
22 | 22 |
23 IXFA_Parser* IXFA_Parser::Create(CXFA_Document* pFactory, | 23 IXFA_Parser* IXFA_Parser::Create(CXFA_Document* pFactory, |
24 FX_BOOL bDocumentParser) { | 24 FX_BOOL bDocumentParser) { |
25 return new CXFA_SimpleParser(pFactory, bDocumentParser); | 25 return new CXFA_SimpleParser(pFactory, bDocumentParser); |
26 } | 26 } |
27 CXFA_SimpleParser::CXFA_SimpleParser(CXFA_Document* pFactory, | 27 CXFA_SimpleParser::CXFA_SimpleParser(CXFA_Document* pFactory, |
28 FX_BOOL bDocumentParser) | 28 FX_BOOL bDocumentParser) |
29 : m_pXMLParser(nullptr), | 29 : m_pXMLParser(nullptr), |
30 m_pXMLDoc(nullptr), | 30 m_pXMLDoc(nullptr), |
31 m_pStream(nullptr), | 31 m_pStream(nullptr), |
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1559 } | 1559 } |
1560 if (pPause && iCount > 500 && pPause->NeedToPauseNow()) { | 1560 if (pPause && iCount > 500 && pPause->NeedToPauseNow()) { |
1561 break; | 1561 break; |
1562 } | 1562 } |
1563 } | 1563 } |
1564 return (m_syntaxParserResult == FDE_XmlSyntaxResult::Error || | 1564 return (m_syntaxParserResult == FDE_XmlSyntaxResult::Error || |
1565 m_NodeStack.GetSize() != 1) | 1565 m_NodeStack.GetSize() != 1) |
1566 ? -1 | 1566 ? -1 |
1567 : m_pParser->GetStatus(); | 1567 : m_pParser->GetStatus(); |
1568 } | 1568 } |
OLD | NEW |