diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-06-01 17:42:33 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-01 17:42:33 +0000 |
commit | b80edf3fcb286c3265341c8905f0885c1d535d08 (patch) | |
tree | 9447b51c1487d26821631645297ad86c2e7a091f /fpdfsdk/fpdf_view.cpp | |
parent | 3018c1c7323a1aa9fd89c7de5420ed925b5b6611 (diff) | |
download | pdfium-b80edf3fcb286c3265341c8905f0885c1d535d08.tar.xz |
Creating XFA context shouldn't be a side-effect of FPDF_* conversion.
Create it explicitly as needed.
Change-Id: I42d5a6f33bc32e7fb768bed96aa6d239d133467e
Reviewed-on: https://pdfium-review.googlesource.com/33350
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_view.cpp')
-rw-r--r-- | fpdfsdk/fpdf_view.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp index ef242295b7..f0ceb1f378 100644 --- a/fpdfsdk/fpdf_view.cpp +++ b/fpdfsdk/fpdf_view.cpp @@ -152,6 +152,11 @@ FPDF_DOCUMENT LoadDocumentImpl( return nullptr; } CheckUnSupportError(pDocument.get(), error); + +#ifdef PDF_ENABLE_XFA + pDocument->SetExtension(pdfium::MakeUnique<CPDFXFA_Context>(pDocument.get())); +#endif // PDF_ENABLE_XFA + return FPDFDocumentFromCPDFDocument(pDocument.release()); } |