summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfeditpage.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-25 16:05:49 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-25 16:05:49 -0800
commit51da093564cdfd32a6ac02ad75e981787a0f1b35 (patch)
tree9885c9445759de43e45db33a975b79de45b8dd8a /fpdfsdk/src/fpdfeditpage.cpp
parent43dd873cb0e92ca777d3ed9d905bc7955556220b (diff)
downloadpdfium-51da093564cdfd32a6ac02ad75e981787a0f1b35.tar.xz
Inflict PDF_ENABLE_XFA ifdefs on XFA fpdfsdk/
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1477583002 .
Diffstat (limited to 'fpdfsdk/src/fpdfeditpage.cpp')
-rw-r--r--fpdfsdk/src/fpdfeditpage.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp
index 7c757cb3b6..75ed27ced9 100644
--- a/fpdfsdk/src/fpdfeditpage.cpp
+++ b/fpdfsdk/src/fpdfeditpage.cpp
@@ -6,9 +6,11 @@
#include "public/fpdf_edit.h"
+#ifdef PDF_ENABLE_XFA
#include "../include/fpdfxfa/fpdfxfa_app.h"
#include "../include/fpdfxfa/fpdfxfa_doc.h"
#include "../include/fpdfxfa/fpdfxfa_page.h"
+#endif
#include "fpdfsdk/include/fsdk_define.h"
#include "public/fpdf_formfill.h"
@@ -81,9 +83,15 @@ DLLEXPORT FPDF_PAGE STDCALL FPDFPage_New(FPDF_DOCUMENT document,
pPageDict->SetAt("Rotate", new CPDF_Number(0));
pPageDict->SetAt("Resources", new CPDF_Dictionary);
+#ifndef PDF_ENABLE_XFA
+ CPDF_Page* pPage = new CPDF_Page;
+ pPage->Load(pDoc, pPageDict);
+ pPage->ParseContent();
+#else
CPDFXFA_Page* pPage =
new CPDFXFA_Page((CPDFXFA_Document*)document, page_index);
pPage->LoadPDFPage(pPageDict);
+#endif
return pPage;
}