summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-07-12 11:00:16 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-12 22:29:15 +0000
commit0b6e9aed1756d19ed812895208be5cae5633325b (patch)
treef39edd3084c93265fc1b056690b74961ba837ec9 /core/fpdfapi/page
parentd10d8777fa0790fd589df1eedaf0643d26260404 (diff)
downloadpdfium-0b6e9aed1756d19ed812895208be5cae5633325b.tar.xz
Nits in CFX_RenderDevice and CPDF_ContentParser
Change-Id: I29f1c4f68356e335cd55e38014699780bf658249 Reviewed-on: https://pdfium-review.googlesource.com/7610 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/cpdf_contentparser.h4
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.cpp4
2 files changed, 5 insertions, 3 deletions
diff --git a/core/fpdfapi/page/cpdf_contentparser.h b/core/fpdfapi/page/cpdf_contentparser.h
index b18e07036c..982a624346 100644
--- a/core/fpdfapi/page/cpdf_contentparser.h
+++ b/core/fpdfapi/page/cpdf_contentparser.h
@@ -29,7 +29,9 @@ class CPDF_ContentParser {
~CPDF_ContentParser();
ParseStatus GetStatus() const { return m_Status; }
- CPDF_StreamContentParser* GetParser() const { return m_pParser.get(); }
+ const CPDF_AllStates* GetCurStates() const {
+ return m_pParser ? m_pParser->GetCurStates() : nullptr;
+ }
void Start(CPDF_Page* pPage);
void Start(CPDF_Form* pForm,
CPDF_AllStates* pGraphicStates,
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp
index 2b7e62b535..138cb0d204 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp
@@ -39,8 +39,8 @@ void CPDF_PageObjectHolder::ContinueParse(IFX_Pause* pPause) {
return;
m_ParseState = CONTENT_PARSED;
- if (m_pParser->GetParser() && m_pParser->GetParser()->GetCurStates())
- m_LastCTM = m_pParser->GetParser()->GetCurStates()->m_CTM;
+ if (m_pParser->GetCurStates())
+ m_LastCTM = m_pParser->GetCurStates()->m_CTM;
m_pParser.reset();
}