summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_pageobjectholder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page/cpdf_pageobjectholder.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp
index 5f5597e5ac..1d2b51e959 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp
@@ -13,10 +13,11 @@
#include "core/fpdfapi/page/pageint.h"
#include "core/fpdfapi/parser/cpdf_dictionary.h"
-CPDF_PageObjectHolder::CPDF_PageObjectHolder()
- : m_pFormDict(nullptr),
+CPDF_PageObjectHolder::CPDF_PageObjectHolder(CPDF_Document* pDoc,
+ CPDF_Dictionary* pFormDict)
+ : m_pFormDict(pFormDict),
m_pFormStream(nullptr),
- m_pDocument(nullptr),
+ m_pDocument(pDoc),
m_pPageResources(nullptr),
m_pResources(nullptr),
m_Transparency(0),
@@ -26,14 +27,15 @@ CPDF_PageObjectHolder::CPDF_PageObjectHolder()
CPDF_PageObjectHolder::~CPDF_PageObjectHolder() {}
void CPDF_PageObjectHolder::ContinueParse(IFX_Pause* pPause) {
- if (!m_pParser) {
+ if (!m_pParser)
return;
- }
+
m_pParser->Continue(pPause);
- if (m_pParser->GetStatus() == CPDF_ContentParser::Done) {
- m_ParseState = CONTENT_PARSED;
- m_pParser.reset();
- }
+ if (m_pParser->GetStatus() != CPDF_ContentParser::Done)
+ return;
+
+ m_ParseState = CONTENT_PARSED;
+ m_pParser.reset();
}
void CPDF_PageObjectHolder::AddImageMaskBoundingBox(const CFX_FloatRect& box) {