summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_editpage.cpp9
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.h4
2 files changed, 6 insertions, 7 deletions
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp
index 19a61bcdc6..944dbdc576 100644
--- a/fpdfsdk/fpdf_editpage.cpp
+++ b/fpdfsdk/fpdf_editpage.cpp
@@ -157,14 +157,11 @@ FPDF_EXPORT void FPDF_CALLCONV FPDFPage_Delete(FPDF_DOCUMENT document,
if (!pDoc)
return;
-#ifdef PDF_ENABLE_XFA
- CPDFXFA_Context* pContext =
- static_cast<CPDFXFA_Context*>(pDoc->GetExtension());
- if (pContext) {
- pContext->DeletePage(page_index);
+ CPDF_Document::Extension* pExtension = pDoc->GetExtension();
+ if (pExtension) {
+ pExtension->DeletePage(page_index);
return;
}
-#endif // PDF_ENABLE_XFA
pDoc->DeletePage(page_index);
}
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
index cb42de0576..8491282d75 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
@@ -57,11 +57,13 @@ class CPDFXFA_Context : public CPDF_Document::Extension,
void SetFormFillEnv(CPDFSDK_FormFillEnvironment* pFormFillEnv);
int GetPageCount() const;
- void DeletePage(int page_index);
RetainPtr<CPDFXFA_Page> GetXFAPage(int page_index);
RetainPtr<CPDFXFA_Page> GetXFAPage(CXFA_FFPageView* pPage) const;
void ClearChangeMark();
+ // CPDF_Document::Extension:
+ void DeletePage(int page_index) override;
+
// IFXA_AppProvider:
WideString GetLanguage() override;
WideString GetPlatform() override;