| 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/fpdf_parser/include/ipdf_data_avail.h" | 7 #include "core/fpdfapi/fpdf_parser/include/ipdf_data_avail.h" |
| 8 | 8 |
| 9 #include "core/fpdfapi/fpdf_parser/cpdf_data_avail.h" | 9 #include "core/fpdfapi/fpdf_parser/cpdf_data_avail.h" |
| 10 #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" | 10 #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 return FALSE; | 741 return FALSE; |
| 742 } | 742 } |
| 743 | 743 |
| 744 int nPageCount = pDict->GetDirectObjectBy("N")->GetInteger(); | 744 int nPageCount = pDict->GetDirectObjectBy("N")->GetInteger(); |
| 745 if (nPageCount <= 1) { | 745 if (nPageCount <= 1) { |
| 746 m_docStatus = PDF_DATAAVAIL_DONE; | 746 m_docStatus = PDF_DATAAVAIL_DONE; |
| 747 return TRUE; | 747 return TRUE; |
| 748 } | 748 } |
| 749 | 749 |
| 750 CPDF_Array* pHintStreamRange = pDict->GetArrayBy("H"); | 750 CPDF_Array* pHintStreamRange = pDict->GetArrayBy("H"); |
| 751 if (!pHintStreamRange) | 751 if (!pHintStreamRange) { |
| 752 m_docStatus = PDF_DATAAVAIL_ERROR; |
| 752 return FALSE; | 753 return FALSE; |
| 754 } |
| 753 | 755 |
| 754 FX_FILESIZE szHSStart = | 756 FX_FILESIZE szHSStart = |
| 755 pHintStreamRange->GetDirectObjectAt(0) | 757 pHintStreamRange->GetDirectObjectAt(0) |
| 756 ? pHintStreamRange->GetDirectObjectAt(0)->GetInteger() | 758 ? pHintStreamRange->GetDirectObjectAt(0)->GetInteger() |
| 757 : 0; | 759 : 0; |
| 758 FX_FILESIZE szHSLength = | 760 FX_FILESIZE szHSLength = |
| 759 pHintStreamRange->GetDirectObjectAt(1) | 761 pHintStreamRange->GetDirectObjectAt(1) |
| 760 ? pHintStreamRange->GetDirectObjectAt(1)->GetInteger() | 762 ? pHintStreamRange->GetDirectObjectAt(1)->GetInteger() |
| 761 : 0; | 763 : 0; |
| 762 if (szHSStart < 0 || szHSLength <= 0) { | 764 if (szHSStart < 0 || szHSLength <= 0) { |
| (...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1832 return FormAvailable; | 1834 return FormAvailable; |
| 1833 } | 1835 } |
| 1834 | 1836 |
| 1835 CPDF_DataAvail::PageNode::PageNode() : m_type(PDF_PAGENODE_UNKNOWN) {} | 1837 CPDF_DataAvail::PageNode::PageNode() : m_type(PDF_PAGENODE_UNKNOWN) {} |
| 1836 | 1838 |
| 1837 CPDF_DataAvail::PageNode::~PageNode() { | 1839 CPDF_DataAvail::PageNode::~PageNode() { |
| 1838 for (int32_t i = 0; i < m_childNode.GetSize(); ++i) | 1840 for (int32_t i = 0; i < m_childNode.GetSize(); ++i) |
| 1839 delete m_childNode[i]; | 1841 delete m_childNode[i]; |
| 1840 m_childNode.RemoveAll(); | 1842 m_childNode.RemoveAll(); |
| 1841 } | 1843 } |
| OLD | NEW |