summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
index e28561dca1..e1721a3f86 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
@@ -90,14 +90,8 @@ bool CPDFXFA_Context::LoadXFADoc() {
if (!pApp)
return false;
- m_pXFADoc = pApp->CreateDoc(&m_DocEnv, m_pPDFDoc.get());
- if (!m_pXFADoc) {
- SetLastError(FPDF_ERR_XFALOAD);
- return false;
- }
-
- if (!m_pXFADoc->Load()) {
- CloseXFADoc();
+ m_pXFADoc = pdfium::MakeUnique<CXFA_FFDoc>(pApp, &m_DocEnv);
+ if (!m_pXFADoc->OpenDoc(m_pPDFDoc.get())) {
SetLastError(FPDF_ERR_XFALOAD);
return false;
}