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_editpage.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_editpage.cpp')
-rw-r--r-- | fpdfsdk/fpdf_editpage.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp index 9a4d5c72a1..9198e1d2e4 100644 --- a/fpdfsdk/fpdf_editpage.cpp +++ b/fpdfsdk/fpdf_editpage.cpp @@ -150,6 +150,10 @@ FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV FPDF_CreateNewDocument() { pInfoDict->SetNewFor<CPDF_String>("Creator", L"PDFium"); } +#ifdef PDF_ENABLE_XFA + pDoc->SetExtension(pdfium::MakeUnique<CPDFXFA_Context>(pDoc.get())); +#endif // PDF_ENABLE_XFA + // Caller takes ownership of pDoc. return FPDFDocumentFromCPDFDocument(pDoc.release()); } |