diff options
author | Nicolas Pena <npm@chromium.org> | 2017-07-12 11:00:16 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-12 22:29:15 +0000 |
commit | 0b6e9aed1756d19ed812895208be5cae5633325b (patch) | |
tree | f39edd3084c93265fc1b056690b74961ba837ec9 /core/fpdfapi/page | |
parent | d10d8777fa0790fd589df1eedaf0643d26260404 (diff) | |
download | pdfium-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.h | 4 | ||||
-rw-r--r-- | core/fpdfapi/page/cpdf_pageobjectholder.cpp | 4 |
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(); } |