summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_annot.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-06-07 19:43:42 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-07 19:43:42 +0000
commit888af47eec5784c1919200087769b7e58e5efd02 (patch)
tree5e9916c5f3b83ff4f33674a945a987c38ad68d05 /fpdfsdk/fpdf_annot.cpp
parent4cc32e30aaacc2e527acd052fa038158f4294636 (diff)
downloadpdfium-888af47eec5784c1919200087769b7e58e5efd02.tar.xz
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 <hnakashima@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_annot.cpp')
-rw-r--r--fpdfsdk/fpdf_annot.cpp20
1 files changed, 10 insertions, 10 deletions
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<CPDF_AnnotContext>(pDict.get(), pPage, nullptr);
- CPDF_Array* pAnnotList = pPage->GetFormDict()->GetArrayFor("Annots");
+ CPDF_Array* pAnnotList = pPage->GetDict()->GetArrayFor("Annots");
if (!pAnnotList)
- pAnnotList = pPage->GetFormDict()->SetNewFor<CPDF_Array>("Annots");
+ pAnnotList = pPage->GetDict()->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->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<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->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<size_t>(index) >= pAnnots->GetCount())
return false;