summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_helpers.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-12 19:21:46 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-12 19:21:46 +0000
commita3843c99e7a631b2fbf87bbc12834e61bfb7b6f2 (patch)
tree4bc4f0c8c75b40a8a7cfe1246a36b69a1ac9900c /fpdfsdk/cpdfsdk_helpers.cpp
parent82c730bf83c7582d360fc4080c7729115b0a9550 (diff)
downloadpdfium-a3843c99e7a631b2fbf87bbc12834e61bfb7b6f2.tar.xz
Remove some #ifdef XFA in favor of runtime checks.chromium/3457
Make LoadDocumentImpl() logic match FPDFAvail_GetDocument() logic, so that the XFA extension is loaded before checking unsupported features. Add some comments along the way. Change-Id: I040e40fcca872f7c0a46e921bce1146f0fe42588 Reviewed-on: https://pdfium-review.googlesource.com/34931 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_helpers.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_helpers.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/fpdfsdk/cpdfsdk_helpers.cpp b/fpdfsdk/cpdfsdk_helpers.cpp
index 2f42f146cd..391e79758f 100644
--- a/fpdfsdk/cpdfsdk_helpers.cpp
+++ b/fpdfsdk/cpdfsdk_helpers.cpp
@@ -245,12 +245,9 @@ void CheckUnSupportError(CPDF_Document* pDoc, uint32_t err_code) {
}
}
-#ifndef PDF_ENABLE_XFA
// XFA Forms
- CPDF_InterForm interform(pDoc);
- if (interform.HasXFAForm())
+ if (!pDoc->GetExtension() && CPDF_InterForm(pDoc).HasXFAForm())
RaiseUnSupportError(FPDF_UNSP_DOC_XFAFORM);
-#endif // PDF_ENABLE_XFA
}
#ifndef _WIN32