summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_ffdoc.cpp8
-rw-r--r--xfa/fxfa/cxfa_ffdoc.h4
-rw-r--r--xfa/fxfa/parser/cxfa_document_parser.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_document_parser.h2
4 files changed, 6 insertions, 10 deletions
diff --git a/xfa/fxfa/cxfa_ffdoc.cpp b/xfa/fxfa/cxfa_ffdoc.cpp
index bf8168d4cc..8ca1e95d87 100644
--- a/xfa/fxfa/cxfa_ffdoc.cpp
+++ b/xfa/fxfa/cxfa_ffdoc.cpp
@@ -155,12 +155,7 @@ int32_t Base64DecodeW(const wchar_t* pSrc, int32_t iSrcLen, uint8_t* pDst) {
} // namespace
CXFA_FFDoc::CXFA_FFDoc(CXFA_FFApp* pApp, IXFA_DocEnvironment* pDocEnvironment)
- : m_pDocEnvironment(pDocEnvironment),
- m_pDocumentParser(nullptr),
- m_pApp(pApp),
- m_pNotify(nullptr),
- m_pPDFDoc(nullptr),
- m_FormType(FormType::kXFAForeground) {}
+ : m_pDocEnvironment(pDocEnvironment), m_pApp(pApp) {}
CXFA_FFDoc::~CXFA_FFDoc() {
CloseDoc();
@@ -328,6 +323,7 @@ void CXFA_FFDoc::CloseDoc() {
if (doc)
doc->ClearLayoutData();
+ m_pDocumentParser.reset();
m_pNotify.reset();
m_pPDFFontMgr.reset();
m_HashToDibDpiMap.clear();
diff --git a/xfa/fxfa/cxfa_ffdoc.h b/xfa/fxfa/cxfa_ffdoc.h
index 10ffa36275..475ead3035 100644
--- a/xfa/fxfa/cxfa_ffdoc.h
+++ b/xfa/fxfa/cxfa_ffdoc.h
@@ -85,13 +85,13 @@ class CXFA_FFDoc {
UnownedPtr<IXFA_DocEnvironment> const m_pDocEnvironment;
std::unique_ptr<CXFA_DocumentParser> m_pDocumentParser;
RetainPtr<IFX_SeekableStream> m_pStream;
- UnownedPtr<CXFA_FFApp> m_pApp;
+ UnownedPtr<CXFA_FFApp> const m_pApp;
std::unique_ptr<CXFA_FFNotify> m_pNotify;
UnownedPtr<CPDF_Document> m_pPDFDoc;
std::map<uint32_t, FX_IMAGEDIB_AND_DPI> m_HashToDibDpiMap;
std::unique_ptr<CXFA_FFDocView> m_DocView;
std::unique_ptr<CFGAS_PDFFontMgr> m_pPDFFontMgr;
- FormType m_FormType;
+ FormType m_FormType = FormType::kXFAForeground;
};
#endif // XFA_FXFA_CXFA_FFDOC_H_
diff --git a/xfa/fxfa/parser/cxfa_document_parser.cpp b/xfa/fxfa/parser/cxfa_document_parser.cpp
index df7d789781..6446ea31ce 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.cpp
+++ b/xfa/fxfa/parser/cxfa_document_parser.cpp
@@ -45,7 +45,7 @@ CFX_XMLDoc* CXFA_DocumentParser::GetXMLDoc() const {
}
CXFA_FFNotify* CXFA_DocumentParser::GetNotify() const {
- return m_pNotify;
+ return m_pNotify.Get();
}
CXFA_Document* CXFA_DocumentParser::GetDocument() const {
diff --git a/xfa/fxfa/parser/cxfa_document_parser.h b/xfa/fxfa/parser/cxfa_document_parser.h
index 6629101457..35d71603cb 100644
--- a/xfa/fxfa/parser/cxfa_document_parser.h
+++ b/xfa/fxfa/parser/cxfa_document_parser.h
@@ -31,7 +31,7 @@ class CXFA_DocumentParser {
CXFA_Document* GetDocument() const;
private:
- CXFA_FFNotify* const m_pNotify;
+ UnownedPtr<CXFA_FFNotify> const m_pNotify;
std::unique_ptr<CXFA_Document> m_pDocument;
CXFA_SimpleParser m_nodeParser;
};