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 --- fpdfsdk/fpdf_annot.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'fpdfsdk/fpdf_annot.cpp') 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; -- cgit v1.2.3