OLD | NEW |
1 // Copyright 2016 PDFium Authors. All rights reserved. | 1 // Copyright 2016 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include "core/fpdfapi/parser/cpdf_data_avail.h" | 7 #include "core/fpdfapi/parser/cpdf_data_avail.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <memory> | 10 #include <memory> |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "third_party/base/stl_util.h" | 25 #include "third_party/base/stl_util.h" |
26 | 26 |
27 CPDF_DataAvail::FileAvail::~FileAvail() {} | 27 CPDF_DataAvail::FileAvail::~FileAvail() {} |
28 | 28 |
29 CPDF_DataAvail::DownloadHints::~DownloadHints() {} | 29 CPDF_DataAvail::DownloadHints::~DownloadHints() {} |
30 | 30 |
31 // static | 31 // static |
32 int CPDF_DataAvail::s_CurrentDataAvailRecursionDepth = 0; | 32 int CPDF_DataAvail::s_CurrentDataAvailRecursionDepth = 0; |
33 | 33 |
34 CPDF_DataAvail::CPDF_DataAvail(FileAvail* pFileAvail, | 34 CPDF_DataAvail::CPDF_DataAvail(FileAvail* pFileAvail, |
35 IFX_FileRead* pFileRead, | 35 IFX_SeekableReadStream* pFileRead, |
36 FX_BOOL bSupportHintTable) | 36 FX_BOOL bSupportHintTable) |
37 : m_pFileAvail(pFileAvail), m_pFileRead(pFileRead) { | 37 : m_pFileAvail(pFileAvail), m_pFileRead(pFileRead) { |
38 m_Pos = 0; | 38 m_Pos = 0; |
39 m_dwFileLen = 0; | 39 m_dwFileLen = 0; |
40 if (m_pFileRead) { | 40 if (m_pFileRead) { |
41 m_dwFileLen = (uint32_t)m_pFileRead->GetSize(); | 41 m_dwFileLen = (uint32_t)m_pFileRead->GetSize(); |
42 } | 42 } |
43 m_dwCurrentOffset = 0; | 43 m_dwCurrentOffset = 0; |
44 m_dwXRefOffset = 0; | 44 m_dwXRefOffset = 0; |
45 m_bufferOffset = 0; | 45 m_bufferOffset = 0; |
(...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1816 return FormAvailable; | 1816 return FormAvailable; |
1817 } | 1817 } |
1818 | 1818 |
1819 CPDF_DataAvail::PageNode::PageNode() : m_type(PDF_PAGENODE_UNKNOWN) {} | 1819 CPDF_DataAvail::PageNode::PageNode() : m_type(PDF_PAGENODE_UNKNOWN) {} |
1820 | 1820 |
1821 CPDF_DataAvail::PageNode::~PageNode() { | 1821 CPDF_DataAvail::PageNode::~PageNode() { |
1822 for (int32_t i = 0; i < m_childNode.GetSize(); ++i) | 1822 for (int32_t i = 0; i < m_childNode.GetSize(); ++i) |
1823 delete m_childNode[i]; | 1823 delete m_childNode[i]; |
1824 m_childNode.RemoveAll(); | 1824 m_childNode.RemoveAll(); |
1825 } | 1825 } |
OLD | NEW |