Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Unified Diff: fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp

Issue 1804163002: FPDF_PageDelete must delete XFA pages as well. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase past rename Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/fpdfeditpage.cpp ('k') | fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index 144e5dc811490e751a714994b169d8d91f402a06..6e0edf646eba7d80feed706b3d1293bbc80446a1 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
@@ -182,6 +182,14 @@ CPDFXFA_Page* CPDFXFA_Document::GetPage(IXFA_PageView* pPage) {
return NULL;
}
+void CPDFXFA_Document::DeletePage(int page_index) {
+ if (page_index < 0 || page_index >= m_XFAPageList.GetSize())
+ return;
+
+ if (CPDFXFA_Page* pPage = m_XFAPageList.GetAt(page_index))
+ pPage->Release();
+}
+
void CPDFXFA_Document::RemovePage(CPDFXFA_Page* page) {
m_XFAPageList.SetAt(page->GetPageIndex(), NULL);
}
« no previous file with comments | « fpdfsdk/fpdfeditpage.cpp ('k') | fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698