diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-11-25 16:05:49 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-11-25 16:05:49 -0800 |
commit | 51da093564cdfd32a6ac02ad75e981787a0f1b35 (patch) | |
tree | 9885c9445759de43e45db33a975b79de45b8dd8a /fpdfsdk/src/fpdf_ext.cpp | |
parent | 43dd873cb0e92ca777d3ed9d905bc7955556220b (diff) | |
download | pdfium-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/fpdf_ext.cpp')
-rw-r--r-- | fpdfsdk/src/fpdf_ext.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fpdfsdk/src/fpdf_ext.cpp b/fpdfsdk/src/fpdf_ext.cpp index db84f97c6d..910c2c7717 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) { |