summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/cpdf_contentparser.cpp13
-rw-r--r--core/fpdfapi/page/cpdf_form.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_page.cpp2
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.cpp10
-rw-r--r--core/fpdfapi/page/cpdf_pageobjectholder.h6
5 files changed, 16 insertions, 17 deletions
diff --git a/core/fpdfapi/page/cpdf_contentparser.cpp b/core/fpdfapi/page/cpdf_contentparser.cpp
index 29b5f122bd..77cfade1da 100644
--- a/core/fpdfapi/page/cpdf_contentparser.cpp
+++ b/core/fpdfapi/page/cpdf_contentparser.cpp
@@ -25,12 +25,12 @@
CPDF_ContentParser::CPDF_ContentParser(CPDF_Page* pPage)
: m_CurrentStage(Stage::kGetContent), m_pObjectHolder(pPage) {
ASSERT(pPage);
- if (!pPage->GetDocument() || !pPage->GetFormDict()) {
+ if (!pPage->GetDocument() || !pPage->GetDict()) {
m_CurrentStage = Stage::kComplete;
return;
}
- CPDF_Object* pContent = pPage->GetFormDict()->GetDirectObjectFor("Contents");
+ CPDF_Object* pContent = pPage->GetDict()->GetDirectObjectFor("Contents");
if (!pContent) {
m_CurrentStage = Stage::kComplete;
return;
@@ -67,11 +67,11 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Form* pForm,
m_pObjectHolder(pForm),
m_pType3Char(pType3Char) {
ASSERT(pForm);
- CFX_Matrix form_matrix = pForm->GetFormDict()->GetMatrixFor("Matrix");
+ CFX_Matrix form_matrix = pForm->GetDict()->GetMatrixFor("Matrix");
if (pGraphicStates)
form_matrix.Concat(pGraphicStates->m_CTM);
- CPDF_Array* pBBox = pForm->GetFormDict()->GetArrayFor("BBox");
+ CPDF_Array* pBBox = pForm->GetDict()->GetArrayFor("BBox");
CFX_FloatRect form_bbox;
CPDF_Path ClipPath;
if (pBBox) {
@@ -88,7 +88,7 @@ CPDF_ContentParser::CPDF_ContentParser(CPDF_Form* pForm,
form_bbox = pParentMatrix->TransformRect(form_bbox);
}
- CPDF_Dictionary* pResources = pForm->GetFormDict()->GetDictFor("Resources");
+ CPDF_Dictionary* pResources = pForm->GetDict()->GetDictFor("Resources");
m_pParser = pdfium::MakeUnique<CPDF_StreamContentParser>(
pForm->GetDocument(), pForm->m_pPageResources.Get(),
pForm->m_pResources.Get(), pParentMatrix, pForm, pResources, form_bbox,
@@ -141,8 +141,7 @@ bool CPDF_ContentParser::Continue(PauseIndicatorIface* pPause) {
}
CPDF_ContentParser::Stage CPDF_ContentParser::GetContent() {
- CPDF_Array* pContent =
- m_pObjectHolder->GetFormDict()->GetArrayFor("Contents");
+ CPDF_Array* pContent = m_pObjectHolder->GetDict()->GetArrayFor("Contents");
CPDF_Stream* pStreamObj = ToStream(
pContent ? pContent->GetDirectObjectAt(m_CurrentOffset) : nullptr);
m_StreamArray[m_CurrentOffset] =
diff --git a/core/fpdfapi/page/cpdf_form.cpp b/core/fpdfapi/page/cpdf_form.cpp
index e73f1dfa43..ca24f85b11 100644
--- a/core/fpdfapi/page/cpdf_form.cpp
+++ b/core/fpdfapi/page/cpdf_form.cpp
@@ -19,7 +19,7 @@ CPDF_Form::CPDF_Form(CPDF_Document* pDoc,
CPDF_Dictionary* pParentResources)
: CPDF_PageObjectHolder(pDoc, pFormStream->GetDict()) {
m_pFormStream = pFormStream;
- m_pResources = GetFormDict()->GetDictFor("Resources");
+ m_pResources = GetDict()->GetDictFor("Resources");
m_pPageResources = pPageResources;
if (!m_pResources)
m_pResources = pParentResources;
diff --git a/core/fpdfapi/page/cpdf_page.cpp b/core/fpdfapi/page/cpdf_page.cpp
index 019c2b6418..10463510a3 100644
--- a/core/fpdfapi/page/cpdf_page.cpp
+++ b/core/fpdfapi/page/cpdf_page.cpp
@@ -95,7 +95,7 @@ void CPDF_Page::SetRenderContext(
}
CPDF_Object* CPDF_Page::GetPageAttr(const ByteString& name) const {
- CPDF_Dictionary* pPageDict = GetFormDict();
+ CPDF_Dictionary* pPageDict = GetDict();
std::set<CPDF_Dictionary*> visited;
while (1) {
visited.insert(pPageDict);
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.cpp b/core/fpdfapi/page/cpdf_pageobjectholder.cpp
index 81ee6e2e11..cca7565a68 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.cpp
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.cpp
@@ -17,9 +17,9 @@
#include "core/fpdfapi/parser/cpdf_document.h"
CPDF_PageObjectHolder::CPDF_PageObjectHolder(CPDF_Document* pDoc,
- CPDF_Dictionary* pFormDict)
- : m_pFormDict(pFormDict), m_pDocument(pDoc) {
- // TODO(thestig): Check if |m_pFormDict| is never a nullptr and simplify
+ CPDF_Dictionary* pDict)
+ : m_pDict(pDict), m_pDocument(pDoc) {
+ // TODO(thestig): Check if |m_pDict| is never a nullptr and simplify
// callers that checks for that.
}
@@ -79,10 +79,10 @@ CFX_FloatRect CPDF_PageObjectHolder::CalcBoundingBox() const {
}
void CPDF_PageObjectHolder::LoadTransInfo() {
- if (!m_pFormDict)
+ if (!m_pDict)
return;
- CPDF_Dictionary* pGroup = m_pFormDict->GetDictFor("Group");
+ CPDF_Dictionary* pGroup = m_pDict->GetDictFor("Group");
if (!pGroup)
return;
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h
index 79b2166d52..1c427913ea 100644
--- a/core/fpdfapi/page/cpdf_pageobjectholder.h
+++ b/core/fpdfapi/page/cpdf_pageobjectholder.h
@@ -43,7 +43,7 @@ class CPDF_PageObjectHolder {
public:
enum class ParseState : uint8_t { kNotParsed, kParsing, kParsed };
- CPDF_PageObjectHolder(CPDF_Document* pDoc, CPDF_Dictionary* pFormDict);
+ CPDF_PageObjectHolder(CPDF_Document* pDoc, CPDF_Dictionary* pDict);
virtual ~CPDF_PageObjectHolder();
virtual bool IsPage() const;
@@ -56,7 +56,7 @@ class CPDF_PageObjectHolder {
// TODO(thestig): Can this return nullptr? If not, audit callers and simplify
// the ones that assume it can.
- CPDF_Dictionary* GetFormDict() const { return m_pFormDict.Get(); }
+ CPDF_Dictionary* GetDict() const { return m_pDict.Get(); }
const CPDF_PageObjectList* GetPageObjectList() const {
return &m_PageObjectList;
@@ -99,7 +99,7 @@ class CPDF_PageObjectHolder {
private:
bool m_bBackgroundAlphaNeeded = false;
ParseState m_ParseState = ParseState::kNotParsed;
- const UnownedPtr<CPDF_Dictionary> m_pFormDict;
+ const UnownedPtr<CPDF_Dictionary> m_pDict;
UnownedPtr<CPDF_Document> m_pDocument;
std::vector<CFX_FloatRect> m_MaskBoundingBoxes;
std::unique_ptr<CPDF_ContentParser> m_pParser;