summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-03-26 20:17:29 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-26 20:17:29 +0000
commit2c47fb2c9b3db7be3480cbc044fa90fda988b97f (patch)
tree8f221ab1bf47c9b624974907b8ee74f92a528cb4 /fpdfsdk
parentca28cb636331de447125de476decbec333fe613b (diff)
downloadpdfium-2c47fb2c9b3db7be3480cbc044fa90fda988b97f.tar.xz
Do not call CPDF_PageObjectList directly in fpdfeditpage.cpp.
Change-Id: If816c4f532f03513ad06959182b0e0edfd688e39 Reviewed-on: https://pdfium-review.googlesource.com/29170 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfeditpage.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index 800613348b..902aab4dd1 100644
--- a/fpdfsdk/fpdfeditpage.cpp
+++ b/fpdfsdk/fpdfeditpage.cpp
@@ -175,8 +175,7 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_InsertObject(FPDF_PAGE page,
return;
pPageObj->SetDirty(true);
- // TODO(hnakashima): Move into CPDF_Page.
- pPage->GetPageObjectList()->push_back(std::move(pPageObjHolder));
+ pPage->AppendPageObject(std::move(pPageObjHolder));
CalcBoundingBox(pPageObj);
}
@@ -190,7 +189,7 @@ FPDFPage_RemoveObject(FPDF_PAGE page, FPDF_PAGEOBJECT page_obj) {
if (!IsPageObject(pPage))
return false;
- return pPage->RemoveObject(pPageObj);
+ return pPage->RemovePageObject(pPageObj);
}
FPDF_EXPORT int FPDF_CALLCONV FPDFPage_CountObject(FPDF_PAGE page) {
@@ -202,8 +201,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDFPage_CountObjects(FPDF_PAGE page) {
if (!IsPageObject(pPage))
return -1;
- // TODO(hnakashima): Move into CPDF_Page.
- return pdfium::CollectionSize<int>(*pPage->GetPageObjectList());
+ return pPage->GetPageObjectCount();
}
FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPage_GetObject(FPDF_PAGE page,
@@ -212,8 +210,7 @@ FPDF_EXPORT FPDF_PAGEOBJECT FPDF_CALLCONV FPDFPage_GetObject(FPDF_PAGE page,
if (!IsPageObject(pPage))
return nullptr;
- // TODO(hnakashima): Move into CPDF_Page.
- return pPage->GetPageObjectList()->GetPageObjectByIndex(index);
+ return pPage->GetPageObjectByIndex(index);
}
FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPage_HasTransparency(FPDF_PAGE page) {