diff options
Diffstat (limited to 'core/fpdfapi/page/cpdf_pageobjectholder.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_pageobjectholder.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp index 4d4fc56ac2..81ee6e2e11 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp +++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp @@ -29,18 +29,23 @@ bool CPDF_PageObjectHolder::IsPage() const { return false; } +void CPDF_PageObjectHolder::StartParse( + std::unique_ptr<CPDF_ContentParser> pParser) { + ASSERT(m_ParseState == ParseState::kNotParsed); + m_pParser = std::move(pParser); + m_ParseState = ParseState::kParsing; +} + void CPDF_PageObjectHolder::ContinueParse(PauseIndicatorIface* pPause) { - if (!m_pParser) { - m_ParseState = CONTENT_PARSED; + if (m_ParseState == ParseState::kParsed) return; - } + ASSERT(m_ParseState == ParseState::kParsing); if (m_pParser->Continue(pPause)) return; - m_ParseState = CONTENT_PARSED; + m_ParseState = ParseState::kParsed; m_pDocument->IncrementParsedPageCount(); - if (m_pParser->GetCurStates()) m_LastCTM = m_pParser->GetCurStates()->m_CTM; |