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); |
} |