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

Unified Diff: fpdfsdk/src/fpdfeditpage.cpp

Issue 1399273003: fpdfsdk/ differences with XFA (for didactic purposes only). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Regenerate after taking juns patch Created 5 years, 1 month 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/src/fpdf_ext.cpp ('k') | fpdfsdk/src/fpdfformfill.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfeditpage.cpp
diff --git a/fpdfsdk/src/fpdfeditpage.cpp b/fpdfsdk/src/fpdfeditpage.cpp
index f86c8df729c1f890da187c537193fb2923a835b0..75ed27ced92ee1037371128f2baf0039cb79742b 100644
--- a/fpdfsdk/src/fpdfeditpage.cpp
+++ b/fpdfsdk/src/fpdfeditpage.cpp
@@ -6,6 +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"
@@ -78,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;
}
« no previous file with comments | « fpdfsdk/src/fpdf_ext.cpp ('k') | fpdfsdk/src/fpdfformfill.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698