summaryrefslogtreecommitdiff
path: root/fpdfsdk/cpdfsdk_environment.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/cpdfsdk_environment.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/cpdfsdk_environment.cpp')
-rw-r--r--fpdfsdk/cpdfsdk_environment.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/fpdfsdk/cpdfsdk_environment.cpp b/fpdfsdk/cpdfsdk_environment.cpp
index 2d80240366..b17b782367 100644
--- a/fpdfsdk/cpdfsdk_environment.cpp
+++ b/fpdfsdk/cpdfsdk_environment.cpp
@@ -8,6 +8,7 @@
#include "fpdfsdk/formfiller/cffl_interactiveformfiller.h"
#include "fpdfsdk/include/cpdfsdk_annothandlermgr.h"
+#include "fpdfsdk/include/cpdfsdk_document.h"
#include "fpdfsdk/include/fsdk_actionhandler.h"
#include "fpdfsdk/javascript/ijs_runtime.h"
@@ -28,9 +29,10 @@ FPDF_WIDESTRING AsFPDFWideString(CFX_ByteString* bsUTF16LE) {
CPDFSDK_Environment::CPDFSDK_Environment(UnderlyingDocumentType* pDoc,
FPDF_FORMFILLINFO* pFFinfo)
- : m_pInfo(pFFinfo), m_pSDKDoc(nullptr), m_pUnderlyingDoc(pDoc) {
- m_pSysHandler.reset(new CFX_SystemHandler(this));
-}
+ : m_pInfo(pFFinfo),
+ m_pSDKDoc(new CPDFSDK_Document(pDoc, this)),
+ m_pUnderlyingDoc(pDoc),
+ m_pSysHandler(new CFX_SystemHandler(this)) {}
CPDFSDK_Environment::~CPDFSDK_Environment() {
#ifdef PDF_ENABLE_XFA