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

Unified Diff: fpdfsdk/fpdfeditpage.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 | « no previous file | fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/fpdfeditpage.cpp
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index e10f3825afcce3fc30dc2679204e72be2899f20d..493329c3604b27edfb40522f33fee40a6a647113 100644
--- a/fpdfsdk/fpdfeditpage.cpp
+++ b/fpdfsdk/fpdfeditpage.cpp
@@ -57,11 +57,8 @@ DLLEXPORT FPDF_DOCUMENT STDCALL FPDF_CreateNewDocument() {
}
DLLEXPORT void STDCALL FPDFPage_Delete(FPDF_DOCUMENT document, int page_index) {
- CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
- if (!pDoc || page_index < 0 || page_index >= pDoc->GetPageCount())
- return;
-
- pDoc->DeletePage(page_index);
+ if (UnderlyingDocumentType* pDoc = UnderlyingFromFPDFDocument(document))
+ pDoc->DeletePage(page_index);
}
DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document,
« no previous file with comments | « no previous file | fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698