From e5c0fa97c2da104426dbc1cecfc0ed488a22efe5 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 8 May 2018 00:00:16 +0000 Subject: Make one more CPDF_PageObjectHolder member protected. Change-Id: Id9288d504f063759f69632ab59b0a21569ff76d8 Reviewed-on: https://pdfium-review.googlesource.com/32113 Commit-Queue: Lei Zhang Reviewed-by: dsinclair --- 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 3aca16334b..d3bf38d315 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->m_pFormDict->GetArrayFor("Annots"); + CPDF_Array* pAnnotList = pPage->GetFormDict()->GetArrayFor("Annots"); if (!pAnnotList) - pAnnotList = pPage->m_pFormDict->SetNewFor("Annots"); + pAnnotList = pPage->GetFormDict()->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->m_pFormDict) + if (!pPage || !pPage->GetFormDict()) return 0; - CPDF_Array* pAnnots = pPage->m_pFormDict->GetArrayFor("Annots"); + CPDF_Array* pAnnots = pPage->GetFormDict()->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->m_pFormDict || index < 0) + if (!pPage || !pPage->GetFormDict() || index < 0) return nullptr; - CPDF_Array* pAnnots = pPage->m_pFormDict->GetArrayFor("Annots"); + CPDF_Array* pAnnots = pPage->GetFormDict()->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->m_pFormDict || !pAnnot || !pAnnot->GetAnnotDict()) + if (!pPage || !pPage->GetFormDict() || !pAnnot || !pAnnot->GetAnnotDict()) return -1; - CPDF_Array* pAnnots = pPage->m_pFormDict->GetArrayFor("Annots"); + CPDF_Array* pAnnots = pPage->GetFormDict()->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->m_pFormDict || index < 0) + if (!pPage || !pPage->GetFormDict() || index < 0) return false; - CPDF_Array* pAnnots = pPage->m_pFormDict->GetArrayFor("Annots"); + CPDF_Array* pAnnots = pPage->GetFormDict()->GetArrayFor("Annots"); if (!pAnnots || static_cast(index) >= pAnnots->GetCount()) return false; -- cgit v1.2.3