diff options
Diffstat (limited to 'xfa/fxfa/parser')
-rw-r--r-- | xfa/fxfa/parser/cxfa_dataimporter.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_document_parser.cpp | 4 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_document_parser.h | 3 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_layoutprocessor.cpp | 7 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_layoutprocessor.h | 3 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_node.cpp | 2 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_simple_parser.cpp | 9 | ||||
-rw-r--r-- | xfa/fxfa/parser/cxfa_simple_parser.h | 5 |
8 files changed, 15 insertions, 20 deletions
diff --git a/xfa/fxfa/parser/cxfa_dataimporter.cpp b/xfa/fxfa/parser/cxfa_dataimporter.cpp index cb5a42c428..d83b92b08d 100644 --- a/xfa/fxfa/parser/cxfa_dataimporter.cpp +++ b/xfa/fxfa/parser/cxfa_dataimporter.cpp @@ -30,7 +30,7 @@ bool CXFA_DataImporter::ImportData( XFA_PARSESTATUS_Ready) { return false; } - if (pDataDocumentParser->DoParse(nullptr) < XFA_PARSESTATUS_Done) + if (pDataDocumentParser->DoParse() < XFA_PARSESTATUS_Done) return false; CXFA_Node* pImportDataRoot = pDataDocumentParser->GetRootNode(); diff --git a/xfa/fxfa/parser/cxfa_document_parser.cpp b/xfa/fxfa/parser/cxfa_document_parser.cpp index eb7cadc01c..99b36749d1 100644 --- a/xfa/fxfa/parser/cxfa_document_parser.cpp +++ b/xfa/fxfa/parser/cxfa_document_parser.cpp @@ -31,8 +31,8 @@ int32_t CXFA_DocumentParser::StartParse( return nRetStatus; } -int32_t CXFA_DocumentParser::DoParse(IFX_Pause* pPause) { - int32_t nRetStatus = m_nodeParser.DoParse(pPause); +int32_t CXFA_DocumentParser::DoParse() { + int32_t nRetStatus = m_nodeParser.DoParse(); if (nRetStatus >= XFA_PARSESTATUS_Done) { ASSERT(m_pDocument); m_pDocument->SetRoot(m_nodeParser.GetRootNode()); diff --git a/xfa/fxfa/parser/cxfa_document_parser.h b/xfa/fxfa/parser/cxfa_document_parser.h index d876244e35..ad3f17f8e8 100644 --- a/xfa/fxfa/parser/cxfa_document_parser.h +++ b/xfa/fxfa/parser/cxfa_document_parser.h @@ -16,7 +16,6 @@ class CXFA_Document; class CXFA_FFNotify; class CXFA_Notify; class IFX_SeekableStream; -class IFX_Pause; class CXFA_DocumentParser { public: @@ -25,7 +24,7 @@ class CXFA_DocumentParser { int32_t StartParse(const CFX_RetainPtr<IFX_SeekableStream>& pStream, XFA_XDPPACKET ePacketID); - int32_t DoParse(IFX_Pause* pPause); + int32_t DoParse(); CFX_XMLDoc* GetXMLDoc() const; CXFA_FFNotify* GetNotify() const; diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp index 2e919dbc84..0fbae9e368 100644 --- a/xfa/fxfa/parser/cxfa_layoutprocessor.cpp +++ b/xfa/fxfa/parser/cxfa_layoutprocessor.cpp @@ -57,7 +57,7 @@ int32_t CXFA_LayoutProcessor::StartLayout(bool bForceRestart) { return 0; } -int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) { +int32_t CXFA_LayoutProcessor::DoLayout() { if (m_nProgressCounter < 1) return -1; @@ -78,8 +78,7 @@ int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) { pLayoutItem->m_sPos = CFX_PointF(fPosX, fPosY); m_pLayoutPageMgr->SubmitContentItem(pLayoutItem, eStatus); - } while (eStatus != XFA_ItemLayoutProcessorResult::Done && - (!pPause || !pPause->NeedToPauseNow())); + } while (eStatus != XFA_ItemLayoutProcessorResult::Done); if (eStatus == XFA_ItemLayoutProcessorResult::Done) { m_pLayoutPageMgr->FinishPaginatedPageSets(); @@ -96,7 +95,7 @@ int32_t CXFA_LayoutProcessor::DoLayout(IFX_Pause* pPause) { bool CXFA_LayoutProcessor::IncrementLayout() { if (m_bNeedLayout) { StartLayout(true); - return DoLayout(nullptr) == 100; + return DoLayout() == 100; } for (CXFA_Node* pNode : m_rgChangedContainers) { CXFA_Node* pParentNode = diff --git a/xfa/fxfa/parser/cxfa_layoutprocessor.h b/xfa/fxfa/parser/cxfa_layoutprocessor.h index 75bf2597c5..5a48560f26 100644 --- a/xfa/fxfa/parser/cxfa_layoutprocessor.h +++ b/xfa/fxfa/parser/cxfa_layoutprocessor.h @@ -18,7 +18,6 @@ class CXFA_ItemLayoutProcessor; class CXFA_LayoutItem; class CXFA_LayoutPageMgr; class CXFA_Node; -class IFX_Pause; class CXFA_LayoutProcessor { public: @@ -27,7 +26,7 @@ class CXFA_LayoutProcessor { CXFA_Document* GetDocument() const; int32_t StartLayout(bool bForceRestart = false); - int32_t DoLayout(IFX_Pause* pPause = nullptr); + int32_t DoLayout(); bool IncrementLayout(); int32_t CountPages() const; CXFA_ContainerLayoutItem* GetPage(int32_t index) const; diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 9fae4a43aa..e136814e9f 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -1284,7 +1284,7 @@ void CXFA_Node::Script_NodeClass_LoadXML(CFXJSE_Arguments* pArguments) { auto pParser = pdfium::MakeUnique<CXFA_SimpleParser>(m_pDocument, false); if (!pParser) return; - CFX_XMLNode* pXMLNode = pParser->ParseXMLData(wsExpression, nullptr); + CFX_XMLNode* pXMLNode = pParser->ParseXMLData(wsExpression); if (!pXMLNode) return; if (bIgnoreRoot && diff --git a/xfa/fxfa/parser/cxfa_simple_parser.cpp b/xfa/fxfa/parser/cxfa_simple_parser.cpp index 4773fda22a..3cbcd26100 100644 --- a/xfa/fxfa/parser/cxfa_simple_parser.cpp +++ b/xfa/fxfa/parser/cxfa_simple_parser.cpp @@ -293,11 +293,11 @@ int32_t CXFA_SimpleParser::StartParse( return XFA_PARSESTATUS_Ready; } -int32_t CXFA_SimpleParser::DoParse(IFX_Pause* pPause) { +int32_t CXFA_SimpleParser::DoParse() { if (!m_pXMLDoc || m_ePacketID == XFA_XDPPACKET_UNKNOWN) return XFA_PARSESTATUS_StatusErr; - int32_t iRet = m_pXMLDoc->DoLoad(pPause); + int32_t iRet = m_pXMLDoc->DoLoad(); if (iRet < 0) return XFA_PARSESTATUS_SyntaxErr; if (iRet < 100) @@ -313,8 +313,7 @@ int32_t CXFA_SimpleParser::DoParse(IFX_Pause* pPause) { return XFA_PARSESTATUS_Done; } -CFX_XMLNode* CXFA_SimpleParser::ParseXMLData(const CFX_ByteString& wsXML, - IFX_Pause* pPause) { +CFX_XMLNode* CXFA_SimpleParser::ParseXMLData(const CFX_ByteString& wsXML) { CloseParser(); m_pXMLDoc = pdfium::MakeUnique<CFX_XMLDoc>(); @@ -326,7 +325,7 @@ CFX_XMLNode* CXFA_SimpleParser::ParseXMLData(const CFX_ByteString& wsXML, if (!m_pXMLDoc->LoadXML(std::move(pParser))) return nullptr; - int32_t iRet = m_pXMLDoc->DoLoad(pPause); + int32_t iRet = m_pXMLDoc->DoLoad(); if (iRet < 0 || iRet >= 100) m_pXMLDoc->CloseXML(); return iRet < 100 ? nullptr : GetDocumentNode(m_pXMLDoc.get()); diff --git a/xfa/fxfa/parser/cxfa_simple_parser.h b/xfa/fxfa/parser/cxfa_simple_parser.h index cb1efcc1d5..705b6bde5c 100644 --- a/xfa/fxfa/parser/cxfa_simple_parser.h +++ b/xfa/fxfa/parser/cxfa_simple_parser.h @@ -18,7 +18,6 @@ class CFX_XMLInstruction; class CFX_XMLNode; class CFX_XMLParser; class IFX_SeekableStream; -class IFX_Pause; class CFX_SeekableStreamProxy; class CXFA_SimpleParser { @@ -28,8 +27,8 @@ class CXFA_SimpleParser { int32_t StartParse(const CFX_RetainPtr<IFX_SeekableStream>& pStream, XFA_XDPPACKET ePacketID); - int32_t DoParse(IFX_Pause* pPause); - CFX_XMLNode* ParseXMLData(const CFX_ByteString& wsXML, IFX_Pause* pPause); + int32_t DoParse(); + CFX_XMLNode* ParseXMLData(const CFX_ByteString& wsXML); void ConstructXFANode(CXFA_Node* pXFANode, CFX_XMLNode* pXMLNode); CXFA_Node* GetRootNode() const; CFX_XMLDoc* GetXMLDoc() const; |