summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfxfa
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-12-04 06:13:55 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-04 06:13:55 +0000
commit8509d3eaec1b2fac27a24de7bc586ad12b7bb178 (patch)
tree820b680b9b313b3788165a3de7e4c08901f2f6e4 /fpdfsdk/fpdfxfa
parent56b08b1f2bb8a4eb9330963bff3a626603499730 (diff)
downloadpdfium-8509d3eaec1b2fac27a24de7bc586ad12b7bb178.tar.xz
Make a CXFA_DocumentParser member Unowned.
Fix/cleanup ctors/dtors in related classes. Change-Id: Ia05ec9b6892fd7d19d0a417fc1226a407e3ac260 Reviewed-on: https://pdfium-review.googlesource.com/20216 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdfxfa')
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.cpp9
-rw-r--r--fpdfsdk/fpdfxfa/cpdfxfa_context.h6
2 files changed, 5 insertions, 10 deletions
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
index 4b67d0cf3f..d05e2f6b34 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.cpp
@@ -36,14 +36,9 @@ extern int GetLastError();
#endif
CPDFXFA_Context::CPDFXFA_Context(std::unique_ptr<CPDF_Document> pPDFDoc)
- : m_FormType(FormType::kNone),
- m_pPDFDoc(std::move(pPDFDoc)),
- m_pFormFillEnv(nullptr),
- m_pXFADocView(nullptr),
- m_nLoadStatus(FXFA_LOADSTATUS_PRELOAD),
- m_nPageCount(0),
+ : m_pPDFDoc(std::move(pPDFDoc)),
+ m_pXFAApp(pdfium::MakeUnique<CXFA_FFApp>(this)),
m_DocEnv(this) {
- m_pXFAApp = pdfium::MakeUnique<CXFA_FFApp>(this);
m_pXFAApp->SetDefaultFontMgr(pdfium::MakeUnique<CFGAS_DefaultFontManager>());
}
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_context.h b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
index f5b62f53da..acef8f2aa8 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_context.h
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_context.h
@@ -105,7 +105,7 @@ class CPDFXFA_Context : public IXFA_AppProvider {
private:
void CloseXFADoc();
- FormType m_FormType;
+ FormType m_FormType = FormType::kNone;
std::unique_ptr<CPDF_Document> m_pPDFDoc;
std::unique_ptr<CXFA_FFDoc> m_pXFADoc;
Observable<CPDFSDK_FormFillEnvironment>::ObservedPtr m_pFormFillEnv;
@@ -113,8 +113,8 @@ class CPDFXFA_Context : public IXFA_AppProvider {
std::unique_ptr<CXFA_FFApp> m_pXFAApp;
std::unique_ptr<CJS_Runtime> m_pRuntime;
std::vector<RetainPtr<CPDFXFA_Page>> m_XFAPageList;
- LoadStatus m_nLoadStatus;
- int m_nPageCount;
+ LoadStatus m_nLoadStatus = FXFA_LOADSTATUS_PRELOAD;
+ int m_nPageCount = 0;
// Must be destroyed before |m_pFormFillEnv|.
CPDFXFA_DocEnvironment m_DocEnv;