From 888af47eec5784c1919200087769b7e58e5efd02 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Thu, 7 Jun 2018 19:43:42 +0000 Subject: Rename CPDF_PageObjectHolder::GetFormDict() to GetDict(). Renamed the underlying member m_pFormDict as well. These names are misleading, as a page also uses the same field as the page dict. Change-Id: I52e0f1864a917a1e1b863725cb0d4f22faecacb3 Reviewed-on: https://pdfium-review.googlesource.com/34450 Commit-Queue: Henrique Nakashima Reviewed-by: Ryan Harrison --- core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp | 4 ++-- core/fpdfapi/page/cpdf_contentparser.cpp | 13 ++++++------- core/fpdfapi/page/cpdf_form.cpp | 2 +- core/fpdfapi/page/cpdf_page.cpp | 2 +- core/fpdfapi/page/cpdf_pageobjectholder.cpp | 10 +++++----- core/fpdfapi/page/cpdf_pageobjectholder.h | 6 +++--- core/fpdfapi/render/cpdf_renderstatus.cpp | 20 +++++++++----------- core/fpdfdoc/cpdf_annot.cpp | 4 ++-- core/fpdfdoc/cpdf_annotlist.cpp | 4 ++-- core/fpdfdoc/cpdf_interform.cpp | 4 ++-- core/fpdfdoc/cpdf_linklist.cpp | 4 ++-- fpdfsdk/cpdfsdk_annotiterator.cpp | 2 +- fpdfsdk/cpdfsdk_pageview.cpp | 2 +- fpdfsdk/fpdf_annot.cpp | 20 ++++++++++---------- fpdfsdk/fpdf_doc.cpp | 4 ++-- fpdfsdk/fpdf_editpage.cpp | 4 ++-- fpdfsdk/fpdf_flatten.cpp | 2 +- fpdfsdk/fpdf_formfill.cpp | 2 +- fpdfsdk/fpdf_structtree.cpp | 2 +- fpdfsdk/fpdf_transformpage.cpp | 8 ++++---- fpdfsdk/fpdfxfa/cpdfxfa_page.cpp | 2 +- 21 files changed, 59 insertions(+), 62 deletions(-) diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp index 6c284e1d27..ba0aeef373 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp @@ -81,7 +81,7 @@ void CPDF_PageContentGenerator::GenerateContent() { buf << "Q\n"; // Add buffer to a stream in page's 'Contents' - CPDF_Dictionary* pPageDict = m_pObjHolder->GetFormDict(); + CPDF_Dictionary* pPageDict = m_pObjHolder->GetDict(); if (!pPageDict) return; @@ -130,7 +130,7 @@ ByteString CPDF_PageContentGenerator::RealizeResource( ASSERT(dwResourceObjNum); if (!m_pObjHolder->m_pResources) { m_pObjHolder->m_pResources = m_pDocument->NewIndirect(); - m_pObjHolder->GetFormDict()->SetNewFor( + m_pObjHolder->GetDict()->SetNewFor( "Resources", m_pDocument.Get(), m_pObjHolder->m_pResources->GetObjNum()); } 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( 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 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 m_pFormDict; + const UnownedPtr m_pDict; UnownedPtr m_pDocument; std::vector m_MaskBoundingBoxes; std::unique_ptr m_pParser; diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index af976903be..4867464b89 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -1242,7 +1242,7 @@ void CPDF_RenderStatus::DrawObjWithBackground(CPDF_PageObject* pObj, const CPDF_Dictionary* pFormResource = nullptr; const CPDF_FormObject* pFormObj = pObj->AsForm(); if (pFormObj) { - const CPDF_Dictionary* pFormDict = pFormObj->form()->GetFormDict(); + const CPDF_Dictionary* pFormDict = pFormObj->form()->GetDict(); if (pFormDict) pFormResource = pFormDict->GetDictFor("Resources"); } @@ -1259,15 +1259,14 @@ bool CPDF_RenderStatus::ProcessForm(const CPDF_FormObject* pFormObj, #if defined _SKIA_SUPPORT_ DebugVerifyDeviceIsPreMultiplied(); #endif - const CPDF_Dictionary* pOC = - pFormObj->form()->GetFormDict()->GetDictFor("OC"); + const CPDF_Dictionary* pOC = pFormObj->form()->GetDict()->GetDictFor("OC"); if (pOC && m_Options.GetOCContext() && !m_Options.GetOCContext()->CheckOCGVisible(pOC)) { return true; } CFX_Matrix matrix = pFormObj->form_matrix(); matrix.Concat(*pObj2Device); - const CPDF_Dictionary* pFormDict = pFormObj->form()->GetFormDict(); + const CPDF_Dictionary* pFormDict = pFormObj->form()->GetDict(); const CPDF_Dictionary* pResources = pFormDict ? pFormDict->GetDictFor("Resources") : nullptr; CPDF_RenderStatus status; @@ -1491,7 +1490,7 @@ bool CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj, group_alpha = pFormObj->m_GeneralState.GetFillAlpha(); transparency = pFormObj->form()->GetTransparency(); bGroupTransparent = transparency.IsIsolated(); - const CPDF_Dictionary* pFormDict = pFormObj->form()->GetFormDict(); + const CPDF_Dictionary* pFormDict = pFormObj->form()->GetDict(); if (pFormDict) pFormResource = pFormDict->GetDictFor("Resources"); } @@ -1881,9 +1880,8 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj, options.SetFlags(option_flags); const CPDF_Dictionary* pFormResource = nullptr; - if (pType3Char->form() && pType3Char->form()->GetFormDict()) { - pFormResource = - pType3Char->form()->GetFormDict()->GetDictFor("Resources"); + if (pType3Char->form() && pType3Char->form()->GetDict()) { + pFormResource = pType3Char->form()->GetDict()->GetDictFor("Resources"); } if (fill_alpha == 255) { CPDF_RenderStatus status; @@ -2249,7 +2247,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern, if (!pPattern->colored()) pStates = CloneObjStates(pPageObj, bStroke); - const CPDF_Dictionary* pFormDict = pPattern->form()->GetFormDict(); + const CPDF_Dictionary* pFormDict = pPattern->form()->GetDict(); const CPDF_Dictionary* pFormResource = pFormDict ? pFormDict->GetDictFor("Resources") : nullptr; for (int col = min_col; col <= max_col; col++) { @@ -2581,8 +2579,8 @@ RetainPtr CPDF_RenderStatus::LoadSMask( } const CPDF_Dictionary* pFormResource = nullptr; - if (form.GetFormDict()) - pFormResource = form.GetFormDict()->GetDictFor("Resources"); + if (form.GetDict()) + pFormResource = form.GetDict()->GetDictFor("Resources"); CPDF_RenderOptions options; options.SetColorMode(bLuminosity ? CPDF_RenderOptions::kNormal : CPDF_RenderOptions::kAlpha); diff --git a/core/fpdfdoc/cpdf_annot.cpp b/core/fpdfdoc/cpdf_annot.cpp index ee79c21c0d..13bceab695 100644 --- a/core/fpdfdoc/cpdf_annot.cpp +++ b/core/fpdfdoc/cpdf_annot.cpp @@ -53,9 +53,9 @@ CPDF_Form* AnnotGetMatrix(const CPDF_Page* pPage, if (!pForm) return nullptr; - CFX_Matrix form_matrix = pForm->GetFormDict()->GetMatrixFor("Matrix"); + CFX_Matrix form_matrix = pForm->GetDict()->GetMatrixFor("Matrix"); CFX_FloatRect form_bbox = - form_matrix.TransformRect(pForm->GetFormDict()->GetRectFor("BBox")); + form_matrix.TransformRect(pForm->GetDict()->GetRectFor("BBox")); matrix->MatchRect(pAnnot->GetRect(), form_bbox); matrix->Concat(*pUser2Device); return pForm; diff --git a/core/fpdfdoc/cpdf_annotlist.cpp b/core/fpdfdoc/cpdf_annotlist.cpp index e364a72d35..5fbe69977a 100644 --- a/core/fpdfdoc/cpdf_annotlist.cpp +++ b/core/fpdfdoc/cpdf_annotlist.cpp @@ -121,10 +121,10 @@ void GenerateAP(CPDF_Document* pDoc, CPDF_Dictionary* pAnnotDict) { CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage) : m_pDocument(pPage->GetDocument()) { - if (!pPage->GetFormDict()) + if (!pPage->GetDict()) return; - CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots"); + CPDF_Array* pAnnots = pPage->GetDict()->GetArrayFor("Annots"); if (!pAnnots) return; diff --git a/core/fpdfdoc/cpdf_interform.cpp b/core/fpdfdoc/cpdf_interform.cpp index c743e2b0a6..2e5c17508a 100644 --- a/core/fpdfdoc/cpdf_interform.cpp +++ b/core/fpdfdoc/cpdf_interform.cpp @@ -732,7 +732,7 @@ CPDF_FormControl* CPDF_InterForm::GetControlAtPoint(CPDF_Page* pPage, const CFX_PointF& point, int* z_order) const { - CPDF_Array* pAnnotList = pPage->GetFormDict()->GetArrayFor("Annots"); + CPDF_Array* pAnnotList = pPage->GetDict()->GetArrayFor("Annots"); if (!pAnnotList) return nullptr; @@ -881,7 +881,7 @@ bool CPDF_InterForm::HasXFAForm() const { } void CPDF_InterForm::FixPageFields(CPDF_Page* pPage) { - CPDF_Dictionary* pPageDict = pPage->GetFormDict(); + CPDF_Dictionary* pPageDict = pPage->GetDict(); if (!pPageDict) return; diff --git a/core/fpdfdoc/cpdf_linklist.cpp b/core/fpdfdoc/cpdf_linklist.cpp index 2f5d4aee3e..0f56612e66 100644 --- a/core/fpdfdoc/cpdf_linklist.cpp +++ b/core/fpdfdoc/cpdf_linklist.cpp @@ -15,7 +15,7 @@ CPDF_LinkList::~CPDF_LinkList() {} const std::vector* CPDF_LinkList::GetPageLinks( CPDF_Page* pPage) { - uint32_t objnum = pPage->GetFormDict()->GetObjNum(); + uint32_t objnum = pPage->GetDict()->GetObjNum(); if (objnum == 0) return nullptr; @@ -55,7 +55,7 @@ CPDF_Link CPDF_LinkList::GetLinkAtPoint(CPDF_Page* pPage, void CPDF_LinkList::LoadPageLinks(CPDF_Page* pPage, std::vector* pList) { - CPDF_Array* pAnnotList = pPage->GetFormDict()->GetArrayFor("Annots"); + CPDF_Array* pAnnotList = pPage->GetDict()->GetArrayFor("Annots"); if (!pAnnotList) return; diff --git a/fpdfsdk/cpdfsdk_annotiterator.cpp b/fpdfsdk/cpdfsdk_annotiterator.cpp index fbba3d5f01..0dcb5bd917 100644 --- a/fpdfsdk/cpdfsdk_annotiterator.cpp +++ b/fpdfsdk/cpdfsdk_annotiterator.cpp @@ -34,7 +34,7 @@ CPDFSDK_AnnotIterator::CPDFSDK_AnnotIterator(CPDFSDK_PageView* pPageView, m_pPageView(pPageView), m_nAnnotSubtype(nAnnotSubtype) { CPDF_Page* pPDFPage = m_pPageView->GetPDFPage(); - ByteString sTabs = pPDFPage->GetFormDict()->GetStringFor("Tabs"); + ByteString sTabs = pPDFPage->GetDict()->GetStringFor("Tabs"); if (sTabs == "R") m_eTabOrder = ROW; else if (sTabs == "C") diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp index 43f8ee0214..74802a8b7b 100644 --- a/fpdfsdk/cpdfsdk_pageview.cpp +++ b/fpdfsdk/cpdfsdk_pageview.cpp @@ -558,7 +558,7 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetFocusAnnot() { } int CPDFSDK_PageView::GetPageIndexForStaticPDF() const { - const CPDF_Dictionary* pDict = GetPDFPage()->GetFormDict(); + const CPDF_Dictionary* pDict = GetPDFPage()->GetDict(); CPDF_Document* pDoc = m_pFormFillEnv->GetPDFDocument(); return (pDoc && pDict) ? pDoc->GetPageIndex(pDict->GetObjNum()) : -1; } diff --git a/fpdfsdk/fpdf_annot.cpp b/fpdfsdk/fpdf_annot.cpp index 1fa71f288e..070a7fd78e 100644 --- a/fpdfsdk/fpdf_annot.cpp +++ b/fpdfsdk/fpdf_annot.cpp @@ -229,9 +229,9 @@ FPDFPage_CreateAnnot(FPDF_PAGE page, FPDF_ANNOTATION_SUBTYPE subtype) { auto pNewAnnot = pdfium::MakeUnique(pDict.get(), pPage, nullptr); - CPDF_Array* pAnnotList = pPage->GetFormDict()->GetArrayFor("Annots"); + CPDF_Array* pAnnotList = pPage->GetDict()->GetArrayFor("Annots"); if (!pAnnotList) - pAnnotList = pPage->GetFormDict()->SetNewFor("Annots"); + pAnnotList = pPage->GetDict()->SetNewFor("Annots"); pAnnotList->Add(std::move(pDict)); // Caller takes ownership. @@ -240,20 +240,20 @@ FPDFPage_CreateAnnot(FPDF_PAGE page, FPDF_ANNOTATION_SUBTYPE subtype) { FPDF_EXPORT int FPDF_CALLCONV FPDFPage_GetAnnotCount(FPDF_PAGE page) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); - if (!pPage || !pPage->GetFormDict()) + if (!pPage || !pPage->GetDict()) return 0; - CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots"); + CPDF_Array* pAnnots = pPage->GetDict()->GetArrayFor("Annots"); return pAnnots ? pAnnots->GetCount() : 0; } FPDF_EXPORT FPDF_ANNOTATION FPDF_CALLCONV FPDFPage_GetAnnot(FPDF_PAGE page, int index) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); - if (!pPage || !pPage->GetFormDict() || index < 0) + if (!pPage || !pPage->GetDict() || index < 0) return nullptr; - CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots"); + CPDF_Array* pAnnots = pPage->GetDict()->GetArrayFor("Annots"); if (!pAnnots || static_cast(index) >= pAnnots->GetCount()) return nullptr; @@ -268,10 +268,10 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFPage_GetAnnotIndex(FPDF_PAGE page, FPDF_ANNOTATION annot) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); CPDF_AnnotContext* pAnnot = CPDFAnnotContextFromFPDFAnnotation(annot); - if (!pPage || !pPage->GetFormDict() || !pAnnot || !pAnnot->GetAnnotDict()) + if (!pPage || !pPage->GetDict() || !pAnnot || !pAnnot->GetAnnotDict()) return -1; - CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots"); + CPDF_Array* pAnnots = pPage->GetDict()->GetArrayFor("Annots"); if (!pAnnots) return -1; @@ -295,10 +295,10 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_CloseAnnot(FPDF_ANNOTATION annot) { FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_RemoveAnnot(FPDF_PAGE page, int index) { CPDF_Page* pPage = CPDFPageFromFPDFPage(page); - if (!pPage || !pPage->GetFormDict() || index < 0) + if (!pPage || !pPage->GetDict() || index < 0) return false; - CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots"); + CPDF_Array* pAnnots = pPage->GetDict()->GetArrayFor("Annots"); if (!pAnnots || static_cast(index) >= pAnnots->GetCount()) return false; diff --git a/fpdfsdk/fpdf_doc.cpp b/fpdfsdk/fpdf_doc.cpp index 6b62227da2..465b11302b 100644 --- a/fpdfsdk/fpdf_doc.cpp +++ b/fpdfsdk/fpdf_doc.cpp @@ -339,9 +339,9 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFLink_Enumerate(FPDF_PAGE page, if (!start_pos || !link_annot) return false; CPDF_Page* pPage = CPDFPageFromFPDFPage(page); - if (!pPage || !pPage->GetFormDict()) + if (!pPage || !pPage->GetDict()) return false; - CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots"); + CPDF_Array* pAnnots = pPage->GetDict()->GetArrayFor("Annots"); if (!pAnnots) return false; for (size_t i = *start_pos; i < pAnnots->GetCount(); i++) { diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp index 094349f694..0a8a74577b 100644 --- a/fpdfsdk/fpdf_editpage.cpp +++ b/fpdfsdk/fpdf_editpage.cpp @@ -58,7 +58,7 @@ bool IsPageObject(CPDF_Page* pPage) { if (!pPage) return false; - const CPDF_Dictionary* pFormDict = pPage->GetFormDict(); + const CPDF_Dictionary* pFormDict = pPage->GetDict(); if (!pFormDict || !pFormDict->KeyExist("Type")) return false; @@ -492,7 +492,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_SetRotation(FPDF_PAGE page, return; rotate %= 4; - pPage->GetFormDict()->SetNewFor("Rotate", rotate * 90); + pPage->GetDict()->SetNewFor("Rotate", rotate * 90); } FPDF_BOOL FPDFPageObj_SetFillColor(FPDF_PAGEOBJECT page_object, diff --git a/fpdfsdk/fpdf_flatten.cpp b/fpdfsdk/fpdf_flatten.cpp index 720fa9ff55..d32c1f15cf 100644 --- a/fpdfsdk/fpdf_flatten.cpp +++ b/fpdfsdk/fpdf_flatten.cpp @@ -240,7 +240,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFPage_Flatten(FPDF_PAGE page, int nFlag) { return FLATTEN_FAIL; CPDF_Document* pDocument = pPage->GetDocument(); - CPDF_Dictionary* pPageDict = pPage->GetFormDict(); + CPDF_Dictionary* pPageDict = pPage->GetDict(); if (!pDocument || !pPageDict) return FLATTEN_FAIL; diff --git a/fpdfsdk/fpdf_formfill.cpp b/fpdfsdk/fpdf_formfill.cpp index de2bf4d35e..ec26ef0df6 100644 --- a/fpdfsdk/fpdf_formfill.cpp +++ b/fpdfsdk/fpdf_formfill.cpp @@ -665,7 +665,7 @@ FPDF_EXPORT void FPDF_CALLCONV FORM_DoPageAAction(FPDF_PAGE page, return; CPDFSDK_ActionHandler* pActionHandler = pFormFillEnv->GetActionHandler(); - CPDF_Dictionary* pPageDict = pPDFPage->GetFormDict(); + CPDF_Dictionary* pPageDict = pPDFPage->GetDict(); CPDF_AAction aa(pPageDict->GetDictFor("AA")); CPDF_AAction::AActionType type = aaType == FPDFPAGE_AACTION_OPEN ? CPDF_AAction::OpenPage diff --git a/fpdfsdk/fpdf_structtree.cpp b/fpdfsdk/fpdf_structtree.cpp index 206a08e921..fd8f1af130 100644 --- a/fpdfsdk/fpdf_structtree.cpp +++ b/fpdfsdk/fpdf_structtree.cpp @@ -37,7 +37,7 @@ FPDF_StructTree_GetForPage(FPDF_PAGE page) { // Caller takes onwership. return FPDFStructTreeFromCPDFStructTree( - CPDF_StructTree::LoadPage(pPage->GetDocument(), pPage->GetFormDict()) + CPDF_StructTree::LoadPage(pPage->GetDocument(), pPage->GetDict()) .release()); } diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp index 9d541da0cd..a3ba7ca7a9 100644 --- a/fpdfsdk/fpdf_transformpage.cpp +++ b/fpdfsdk/fpdf_transformpage.cpp @@ -27,7 +27,7 @@ namespace { void SetBoundingBox(CPDF_Page* page, const ByteString& key, const CFX_FloatRect& rect) { - page->GetFormDict()->SetRectFor(key, rect); + page->GetDict()->SetRectFor(key, rect); } bool GetBoundingBox(CPDF_Page* page, @@ -36,7 +36,7 @@ bool GetBoundingBox(CPDF_Page* page, float* bottom, float* right, float* top) { - CPDF_Array* pArray = page->GetFormDict()->GetArrayFor(key); + CPDF_Array* pArray = page->GetDict()->GetArrayFor(key); if (!pArray) return false; @@ -121,7 +121,7 @@ FPDFPage_TransFormWithClip(FPDF_PAGE page, matrix->c, matrix->d, matrix->e, matrix->f); } - CPDF_Dictionary* pPageDict = pPage->GetFormDict(); + CPDF_Dictionary* pPageDict = pPage->GetDict(); CPDF_Object* pContentObj = GetPageContent(pPageDict); if (!pContentObj) return false; @@ -264,7 +264,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_InsertClipPath(FPDF_PAGE page, if (!pPage) return; - CPDF_Dictionary* pPageDict = pPage->GetFormDict(); + CPDF_Dictionary* pPageDict = pPage->GetDict(); CPDF_Object* pContentObj = GetPageContent(pPageDict); if (!pContentObj) return; diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp index 4d7e3bc222..7e2dedaf45 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_page.cpp @@ -34,7 +34,7 @@ bool CPDFXFA_Page::LoadPDFPage() { if (!pDict) return false; - if (!m_pPDFPage || m_pPDFPage->GetFormDict() != pDict) { + if (!m_pPDFPage || m_pPDFPage->GetDict() != pDict) { m_pPDFPage = pdfium::MakeRetain(pPDFDoc, pDict, true); m_pPDFPage->ParseContent(); } -- cgit v1.2.3