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

Unified Diff: fpdfsdk/src/fpdf_ext.cpp

Issue 1477583002: Inflict PDF_ENABLE_XFA ifdefs on XFA fpdfsdk/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Remove fsdk_actionhandler.cpp 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/formfiller/FFL_TextField.cpp ('k') | fpdfsdk/src/fpdfeditpage.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdf_ext.cpp
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp
index db84f97c6dcd2d5010ab8fb70d4a598364505f99..910c2c771777bd8ef0b7a453b3c0a56b2656025c 100644
--- a/fpdfsdk/src/fpdf_ext.cpp
+++ b/fpdfsdk/src/fpdf_ext.cpp
@@ -6,7 +6,9 @@
#include "public/fpdf_ext.h"
+#ifdef PDF_ENABLE_XFA
#include "../include/fpdfxfa/fpdfxfa_doc.h"
+#endif
#include "core/include/fxcrt/fx_xml.h"
#include "fpdfsdk/include/fsdk_define.h"
@@ -175,6 +177,15 @@ void CheckUnSupportError(CPDF_Document* pDoc, FX_DWORD err_code) {
const CXML_Element* pElement = metaData.GetRoot();
if (pElement)
CheckSharedForm(pElement, "workflowType");
+#ifndef PDF_ENABLE_XFA
+
+ // XFA Forms
+ CPDF_InterForm* pInterForm = new CPDF_InterForm(pDoc, FALSE);
+ if (pInterForm->HasXFAForm()) {
+ FPDF_UnSupportError(FPDF_UNSP_DOC_XFAFORM);
+ }
+ delete pInterForm;
+#endif
}
DLLEXPORT int FPDFDoc_GetPageMode(FPDF_DOCUMENT document) {
« no previous file with comments | « fpdfsdk/src/formfiller/FFL_TextField.cpp ('k') | fpdfsdk/src/fpdfeditpage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698