summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_edit
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-12-09 16:39:40 -0800
committerTom Sepez <tsepez@chromium.org>2015-12-09 16:39:40 -0800
commitbd573f126f93acc2034be2df1c6f571670f76c35 (patch)
treebeeea3b9370bb7490ed5933dadbef857cb8df23d /core/src/fpdfapi/fpdf_edit
parente021e084717b8cc43f8a0667ad9d1a807dfe381c (diff)
downloadpdfium-bd573f126f93acc2034be2df1c6f571670f76c35.tar.xz
Merge to XFA: Get rid of most uses of CFX_PtrArray.
Original Review URL: https://codereview.chromium.org/1518593002 . (cherry picked from commit 035359cd8ddb555fa33b6133db4fd405e4660712) R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1513103002 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_edit')
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp2
-rw-r--r--core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp6
2 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
index 59fa1afb50..36dbb97a6c 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
@@ -37,7 +37,7 @@ void CPDF_PageContentGenerate::GenerateContent() {
CFX_ByteTextBuf buf;
CPDF_Dictionary* pPageDict = m_pPage->m_pFormDict;
for (int i = 0; i < m_pageObjects.GetSize(); ++i) {
- CPDF_PageObject* pPageObj = (CPDF_PageObject*)m_pageObjects[i];
+ CPDF_PageObject* pPageObj = m_pageObjects[i];
if (!pPageObj || pPageObj->m_Type != PDFPAGE_IMAGE) {
continue;
}
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
index 349b007c43..b3891d78dd 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_doc.cpp
@@ -1017,7 +1017,7 @@ static int InsertDeletePDFPage(CPDF_Document* pDoc,
int nPagesToGo,
CPDF_Dictionary* pPage,
FX_BOOL bInsert,
- CFX_PtrArray& stackList) {
+ CFX_ArrayTemplate<CPDF_Dictionary*>& stackList) {
CPDF_Array* pKidList = pPages->GetArray("Kids");
if (!pKidList) {
return -1;
@@ -1088,7 +1088,7 @@ static int InsertNewPage(CPDF_Document* pDoc,
pPages->SetAtInteger(FX_BSTRC("Count"), nPages + 1);
pPageDict->SetAtReference(FX_BSTRC("Parent"), pDoc, pPages->GetObjNum());
} else {
- CFX_PtrArray stack;
+ CFX_ArrayTemplate<CPDF_Dictionary*> stack;
stack.Add(pPages);
if (InsertDeletePDFPage(pDoc, pPages, iPage, pPageDict, TRUE, stack) < 0) {
return -1;
@@ -1129,7 +1129,7 @@ void CPDF_Document::DeletePage(int iPage) {
if (iPage < 0 || iPage >= nPages) {
return;
}
- CFX_PtrArray stack;
+ CFX_ArrayTemplate<CPDF_Dictionary*> stack;
stack.Add(pPages);
if (InsertDeletePDFPage(this, pPages, iPage, NULL, FALSE, stack) < 0) {
return;