| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 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/include/fpdfapi/fpdf_parser.h" | 7 #include "core/include/fpdfapi/fpdf_parser.h" |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 4126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4137 m_docStatus = PDF_DATAAVAIL_ERROR; | 4137 m_docStatus = PDF_DATAAVAIL_ERROR; |
| 4138 return FALSE; | 4138 return FALSE; |
| 4139 } | 4139 } |
| 4140 | 4140 |
| 4141 for (int32_t i = 0; i < iSize; ++i) { | 4141 for (int32_t i = 0; i < iSize; ++i) { |
| 4142 CPDF_PageNode* pNode = pageNodes.m_childNode.GetAt(i); | 4142 CPDF_PageNode* pNode = pageNodes.m_childNode.GetAt(i); |
| 4143 if (!pNode) | 4143 if (!pNode) |
| 4144 continue; | 4144 continue; |
| 4145 | 4145 |
| 4146 switch (pNode->m_type) { | 4146 switch (pNode->m_type) { |
| 4147 case PDF_PAGENODE_UNKOWN: | 4147 case PDF_PAGENODE_UNKNOWN: |
| 4148 if (!CheckUnkownPageNode(pNode->m_dwPageNo, pNode, pHints)) { | 4148 if (!CheckUnkownPageNode(pNode->m_dwPageNo, pNode, pHints)) { |
| 4149 return FALSE; | 4149 return FALSE; |
| 4150 } | 4150 } |
| 4151 --i; | 4151 --i; |
| 4152 break; | 4152 break; |
| 4153 case PDF_PAGENODE_PAGE: | 4153 case PDF_PAGENODE_PAGE: |
| 4154 iCount++; | 4154 iCount++; |
| 4155 if (iPage == iCount && m_pDocument) | 4155 if (iPage == iCount && m_pDocument) |
| 4156 m_pDocument->m_PageList.SetAt(iPage, pNode->m_dwPageNo); | 4156 m_pDocument->m_PageList.SetAt(iPage, pNode->m_dwPageNo); |
| 4157 break; | 4157 break; |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4579 CFX_ArrayTemplate<CPDF_Object*> new_objs_array; | 4579 CFX_ArrayTemplate<CPDF_Object*> new_objs_array; |
| 4580 FX_BOOL bRet = IsObjectsAvail(m_objs_array, FALSE, pHints, new_objs_array); | 4580 FX_BOOL bRet = IsObjectsAvail(m_objs_array, FALSE, pHints, new_objs_array); |
| 4581 m_objs_array.RemoveAll(); | 4581 m_objs_array.RemoveAll(); |
| 4582 if (!bRet) { | 4582 if (!bRet) { |
| 4583 m_objs_array.Append(new_objs_array); | 4583 m_objs_array.Append(new_objs_array); |
| 4584 return FormNotAvailable; | 4584 return FormNotAvailable; |
| 4585 } | 4585 } |
| 4586 return FormAvailable; | 4586 return FormAvailable; |
| 4587 } | 4587 } |
| 4588 | 4588 |
| 4589 CPDF_PageNode::CPDF_PageNode() : m_type(PDF_PAGENODE_UNKNOWN) {} |
| 4590 |
| 4589 CPDF_PageNode::~CPDF_PageNode() { | 4591 CPDF_PageNode::~CPDF_PageNode() { |
| 4590 for (int32_t i = 0; i < m_childNode.GetSize(); ++i) | 4592 for (int32_t i = 0; i < m_childNode.GetSize(); ++i) |
| 4591 delete m_childNode[i]; | 4593 delete m_childNode[i]; |
| 4592 m_childNode.RemoveAll(); | 4594 m_childNode.RemoveAll(); |
| 4593 } | 4595 } |
| 4594 | 4596 |
| 4595 CPDF_HintTables::~CPDF_HintTables() { | 4597 CPDF_HintTables::~CPDF_HintTables() { |
| 4596 m_dwDeltaNObjsArray.RemoveAll(); | 4598 m_dwDeltaNObjsArray.RemoveAll(); |
| 4597 m_dwNSharedObjsArray.RemoveAll(); | 4599 m_dwNSharedObjsArray.RemoveAll(); |
| 4598 m_dwSharedObjNumArray.RemoveAll(); | 4600 m_dwSharedObjNumArray.RemoveAll(); |
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5030 CPDF_Array* pRange = m_pLinearizedDict->GetArrayBy("H"); | 5032 CPDF_Array* pRange = m_pLinearizedDict->GetArrayBy("H"); |
| 5031 if (!pRange) | 5033 if (!pRange) |
| 5032 return -1; | 5034 return -1; |
| 5033 | 5035 |
| 5034 CPDF_Object* pStreamLen = pRange->GetElementValue(1); | 5036 CPDF_Object* pStreamLen = pRange->GetElementValue(1); |
| 5035 if (!pStreamLen) | 5037 if (!pStreamLen) |
| 5036 return -1; | 5038 return -1; |
| 5037 | 5039 |
| 5038 return pStreamLen->GetInteger(); | 5040 return pStreamLen->GetInteger(); |
| 5039 } | 5041 } |
| OLD | NEW |