| 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 "../../../include/fpdfapi/fpdf_parser.h" | 7 #include "../../../include/fpdfapi/fpdf_parser.h" |
| 8 #include "../../../include/fpdfapi/fpdf_module.h" | 8 #include "../../../include/fpdfapi/fpdf_module.h" |
| 9 #include "../../../include/fpdfapi/fpdf_page.h" | 9 #include "../../../include/fpdfapi/fpdf_page.h" |
| 10 #include "../fpdf_page/pageint.h" | 10 #include "../fpdf_page/pageint.h" |
| (...skipping 3060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3071 if (!m_pFileAvail->IsDataAvail(offset, size)) { | 3071 if (!m_pFileAvail->IsDataAvail(offset, size)) { |
| 3072 pHints->AddSegment(offset, size); | 3072 pHints->AddSegment(offset, size); |
| 3073 return NULL; | 3073 return NULL; |
| 3074 } | 3074 } |
| 3075 pRet = m_parser.ParseIndirectObject(NULL, objnum); | 3075 pRet = m_parser.ParseIndirectObject(NULL, objnum); |
| 3076 if (!pRet && pExistInFile) { | 3076 if (!pRet && pExistInFile) { |
| 3077 *pExistInFile = FALSE; | 3077 *pExistInFile = FALSE; |
| 3078 } | 3078 } |
| 3079 return pRet; | 3079 return pRet; |
| 3080 } | 3080 } |
| 3081 FX_FILESIZE offset; | 3081 FX_FILESIZE offset = 0; |
| 3082 FX_DWORD size = GetObjectSize(objnum, offset); | 3082 FX_DWORD size = GetObjectSize(objnum, offset); |
| 3083 size = (FX_DWORD)((FX_FILESIZE)(offset + size + 512) > m_dwFileLen ? m_dwFil
eLen - offset : size + 512); | 3083 size = (FX_DWORD)((FX_FILESIZE)(offset + size + 512) > m_dwFileLen ? m_dwFil
eLen - offset : size + 512); |
| 3084 if (!m_pFileAvail->IsDataAvail(offset, size)) { | 3084 if (!m_pFileAvail->IsDataAvail(offset, size)) { |
| 3085 pHints->AddSegment(offset, size); | 3085 pHints->AddSegment(offset, size); |
| 3086 return NULL; | 3086 return NULL; |
| 3087 } | 3087 } |
| 3088 CPDF_Parser *pParser = (CPDF_Parser *)(m_pDocument->GetParser()); | 3088 CPDF_Parser *pParser = (CPDF_Parser *)(m_pDocument->GetParser()); |
| 3089 pRet = pParser->ParseIndirectObject(NULL, objnum, NULL); | 3089 pRet = pParser->ParseIndirectObject(NULL, objnum, NULL); |
| 3090 if (!pRet && pExistInFile) { | 3090 if (!pRet && pExistInFile) { |
| 3091 *pExistInFile = FALSE; | 3091 *pExistInFile = FALSE; |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4380 { | 4380 { |
| 4381 FX_INT32 iSize = m_childNode.GetSize(); | 4381 FX_INT32 iSize = m_childNode.GetSize(); |
| 4382 for (FX_INT32 i = 0; i < iSize; ++i) { | 4382 for (FX_INT32 i = 0; i < iSize; ++i) { |
| 4383 CPDF_PageNode *pNode = (CPDF_PageNode*)m_childNode[i]; | 4383 CPDF_PageNode *pNode = (CPDF_PageNode*)m_childNode[i]; |
| 4384 if (pNode) { | 4384 if (pNode) { |
| 4385 delete pNode; | 4385 delete pNode; |
| 4386 } | 4386 } |
| 4387 } | 4387 } |
| 4388 m_childNode.RemoveAll(); | 4388 m_childNode.RemoveAll(); |
| 4389 } | 4389 } |
| OLD | NEW |