diff options
author | dsinclair <dsinclair@chromium.org> | 2016-08-24 10:31:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-24 10:31:23 -0700 |
commit | a61c01ea4527dd98699005099e9335a4a842b545 (patch) | |
tree | f1cc29e832c243cc0f867e8ed021a9c0ca6bd873 /core/fpdfapi/fpdf_parser/cfdf_document.cpp | |
parent | 63af2c64b4ea9a0de9a9b4e9916b7f2c925e4b38 (diff) | |
download | pdfium-a61c01ea4527dd98699005099e9335a4a842b545.tar.xz |
Move parser out of IndirectObjectHolder
This Cl moves the parser out of the indirect object holder and into the
CPDF_Document where it is used.
Review-Url: https://codereview.chromium.org/2277433003
Diffstat (limited to 'core/fpdfapi/fpdf_parser/cfdf_document.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_parser/cfdf_document.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/core/fpdfapi/fpdf_parser/cfdf_document.cpp b/core/fpdfapi/fpdf_parser/cfdf_document.cpp index 773b97af2b..e2e4d0cf1e 100644 --- a/core/fpdfapi/fpdf_parser/cfdf_document.cpp +++ b/core/fpdfapi/fpdf_parser/cfdf_document.cpp @@ -10,16 +10,17 @@ #include "core/fpdfapi/fpdf_parser/cpdf_syntax_parser.h" #include "core/fpdfapi/fpdf_parser/include/cpdf_dictionary.h" -CFDF_Document::CFDF_Document() : CPDF_IndirectObjectHolder(nullptr) { - m_pRootDict = nullptr; - m_pFile = nullptr; - m_bOwnFile = FALSE; -} +CFDF_Document::CFDF_Document() + : CPDF_IndirectObjectHolder(), + m_pRootDict(nullptr), + m_pFile(nullptr), + m_bOwnFile(FALSE) {} + CFDF_Document::~CFDF_Document() { - if (m_bOwnFile && m_pFile) { + if (m_bOwnFile && m_pFile) m_pFile->Release(); - } } + CFDF_Document* CFDF_Document::CreateNewDoc() { CFDF_Document* pDoc = new CFDF_Document; pDoc->m_pRootDict = new CPDF_Dictionary; |