From da8063f087c379bfd286624338d31a112cae5ba4 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 30 Apr 2018 17:41:49 +0000 Subject: Make CPDFSDK_FormFillEnvironment always hold a CPDF_Document. Small step towards removing UnderlyingDocumentType and making FPDF documents always be CPDF documents, regardless of XFA. This improves layering a bit in the process. Change-Id: Ice5ed7ba1ffdd7edfc9c4719f0e3a9cfb22f5790 Reviewed-on: https://pdfium-review.googlesource.com/31672 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- fpdfsdk/fpdfxfa/cpdfxfa_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fpdfsdk/fpdfxfa') diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp index 7d1b28be70..97288c67f0 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp @@ -52,7 +52,7 @@ CPDFXFA_Context::~CPDFXFA_Context() { m_pFormFillEnv->ClearAllFocusedAnnots(); // Once we're deleted the FormFillEnvironment will point at a bad underlying // doc so we need to reset it ... - m_pFormFillEnv->ResetXFADocument(); + m_pFormFillEnv->GetPDFDocument()->SetExtension(nullptr); m_pFormFillEnv.Reset(); } -- cgit v1.2.3