summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_pageobjectholder.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-04-26 13:50:33 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-26 21:25:42 +0000
commit827db14d7f3d0085253b686587717361ffbcad1b (patch)
treedd2039623b87ba0c40b48f9a0344a463b1f3fb53 /core/fpdfapi/page/cpdf_pageobjectholder.cpp
parente47e0c96009b8633294eebbb9eb0e84caf525c57 (diff)
downloadpdfium-827db14d7f3d0085253b686587717361ffbcad1b.tar.xz
Remove a few more |new|s.
Change-Id: I8a50ed680c1e101f855644fca8d282dd21470577 Reviewed-on: https://pdfium-review.googlesource.com/4533 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
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) {