summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-09-22 13:18:45 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-22 13:18:45 -0700
commita939bfe3e102bfb28b4e8a5d951333d16badf80b (patch)
treed9dc20fc9dbf6649a460f3aa10be7124b51caa7d /fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
parent62356867b331bc9f71f9a0c8fce0cff9927d3356 (diff)
downloadpdfium-a939bfe3e102bfb28b4e8a5d951333d16badf80b.tar.xz
Make creation of CPDFSDK_Document clearer
Move the creation of the CPDFSDK_Document into FPDFDOC_InitFormFillEnvironment instead of hidden inside a Get method in CDPFXFA_Document. Review-Url: https://codereview.chromium.org/2353303004
Diffstat (limited to 'fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp')
-rw-r--r--fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
index 8db16bf4e9..2d74c02d23 100644
--- a/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
+++ b/fpdfsdk/fpdfxfa/fpdfxfa_doc.cpp
@@ -191,11 +191,8 @@ void CPDFXFA_Document::RemovePage(CPDFXFA_Page* page) {
m_XFAPageList.SetAt(page->GetPageIndex(), nullptr);
}
-CPDFSDK_Document* CPDFXFA_Document::GetSDKDocument(
- CPDFSDK_Environment* pFormFillEnv) {
- if (!m_pSDKDoc && pFormFillEnv)
- m_pSDKDoc.reset(new CPDFSDK_Document(this, pFormFillEnv));
- return m_pSDKDoc.get();
+void CPDFXFA_Document::SetSDKDoc(std::unique_ptr<CPDFSDK_Document> pSDKDoc) {
+ m_pSDKDoc.reset(pSDKDoc.release());
}
void CPDFXFA_Document::ClearChangeMark() {