diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-04-12 13:40:49 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-12 13:40:49 +0000 |
commit | 62110c9ce5e0d74319e25f0f41fd241f4aeeac42 (patch) | |
tree | 7d086b5d1a2ba7b6ac0daac87f43bd1c78bbeb61 /fpdfsdk | |
parent | 876efaa771afe7ebd7a97dc748abdbb5b266a99b (diff) | |
download | pdfium-62110c9ce5e0d74319e25f0f41fd241f4aeeac42.tar.xz |
Cleanup CXFA_FFDoc
This CL changes CXFA_FFDoc to no longer use the CXFA_FFApp to create the
document, it does it directly. The stream data is not stored in the
FFDoc anymore as it is only used once.
Change-Id: I8247d2fb0324e554250ff0a03c67f067ef46e437
Reviewed-on: https://pdfium-review.googlesource.com/30270
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fpdfxfa/cpdfxfa_context.cpp | 10 |
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; } |