diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-08 00:00:16 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-08 00:00:16 +0000 |
commit | e5c0fa97c2da104426dbc1cecfc0ed488a22efe5 (patch) | |
tree | f98799cbca4694a7f20fbc0816d422a1147368b8 /fpdfsdk/fpdf_annot.cpp | |
parent | 8f63763317ae1ef65d1ac2719624adeb728f2207 (diff) | |
download | pdfium-e5c0fa97c2da104426dbc1cecfc0ed488a22efe5.tar.xz |
Make one more CPDF_PageObjectHolder member protected.
Change-Id: Id9288d504f063759f69632ab59b0a21569ff76d8
Reviewed-on: https://pdfium-review.googlesource.com/32113
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_annot.cpp')
-rw-r--r-- | fpdfsdk/fpdf_annot.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
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<CPDF_AnnotContext>(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<CPDF_Array>("Annots"); + pAnnotList = pPage->GetFormDict()->SetNewFor<CPDF_Array>("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<size_t>(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<size_t>(index) >= pAnnots->GetCount()) return false; |