| 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 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 CPDF_Object* pObj = m_Syntax.GetObject(pObjList, objnum, gennum, 0, pContext
); | 1377 CPDF_Object* pObj = m_Syntax.GetObject(pObjList, objnum, gennum, 0, pContext
); |
| 1378 FX_FILESIZE endOffset = m_Syntax.SavePos(); | 1378 FX_FILESIZE endOffset = m_Syntax.SavePos(); |
| 1379 CFX_ByteString bsWord = m_Syntax.GetKeyword(); | 1379 CFX_ByteString bsWord = m_Syntax.GetKeyword(); |
| 1380 if (bsWord == FX_BSTRC("endobj")) { | 1380 if (bsWord == FX_BSTRC("endobj")) { |
| 1381 endOffset = m_Syntax.SavePos(); | 1381 endOffset = m_Syntax.SavePos(); |
| 1382 } | 1382 } |
| 1383 FX_DWORD objSize = endOffset - objOffset; | 1383 FX_DWORD objSize = endOffset - objOffset; |
| 1384 m_Syntax.RestorePos(SavedPos); | 1384 m_Syntax.RestorePos(SavedPos); |
| 1385 if (pObj && !objnum) { | 1385 if (pObj && !objnum) { |
| 1386 pObj->m_ObjNum = real_objnum; | 1386 pObj->m_ObjNum = real_objnum; |
| 1387 pObj->m_GenNum = gennum; |
| 1387 } | 1388 } |
| 1388 return pObj; | 1389 return pObj; |
| 1389 } | 1390 } |
| 1390 CPDF_Object* CPDF_Parser::ParseIndirectObjectAtByStrict(CPDF_IndirectObjects* pO
bjList, FX_FILESIZE pos, FX_DWORD objnum, | 1391 CPDF_Object* CPDF_Parser::ParseIndirectObjectAtByStrict(CPDF_IndirectObjects* pO
bjList, FX_FILESIZE pos, FX_DWORD objnum, |
| 1391 struct PARSE_CONTEXT* pContext, FX_FILESIZE *pResultPos) | 1392 struct PARSE_CONTEXT* pContext, FX_FILESIZE *pResultPos) |
| 1392 { | 1393 { |
| 1393 FX_FILESIZE SavedPos = m_Syntax.SavePos(); | 1394 FX_FILESIZE SavedPos = m_Syntax.SavePos(); |
| 1394 m_Syntax.RestorePos(pos); | 1395 m_Syntax.RestorePos(pos); |
| 1395 FX_BOOL bIsNumber; | 1396 FX_BOOL bIsNumber; |
| 1396 CFX_ByteString word = m_Syntax.GetNextWord(bIsNumber); | 1397 CFX_ByteString word = m_Syntax.GetNextWord(bIsNumber); |
| (...skipping 2983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4380 { | 4381 { |
| 4381 FX_INT32 iSize = m_childNode.GetSize(); | 4382 FX_INT32 iSize = m_childNode.GetSize(); |
| 4382 for (FX_INT32 i = 0; i < iSize; ++i) { | 4383 for (FX_INT32 i = 0; i < iSize; ++i) { |
| 4383 CPDF_PageNode *pNode = (CPDF_PageNode*)m_childNode[i]; | 4384 CPDF_PageNode *pNode = (CPDF_PageNode*)m_childNode[i]; |
| 4384 if (pNode) { | 4385 if (pNode) { |
| 4385 delete pNode; | 4386 delete pNode; |
| 4386 } | 4387 } |
| 4387 } | 4388 } |
| 4388 m_childNode.RemoveAll(); | 4389 m_childNode.RemoveAll(); |
| 4389 } | 4390 } |
| OLD | NEW |