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 "parser_int.h" | 7 #include "parser_int.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 4363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4374 m_bAnnotsLoad = FALSE; | 4374 m_bAnnotsLoad = FALSE; |
4375 m_bNeedDownLoadResource = FALSE; | 4375 m_bNeedDownLoadResource = FALSE; |
4376 m_objs_array.RemoveAll(); | 4376 m_objs_array.RemoveAll(); |
4377 m_objnum_array.RemoveAll(); | 4377 m_objnum_array.RemoveAll(); |
4378 } | 4378 } |
4379 if (pdfium::ContainsKey(m_pagesLoadState, iPage)) | 4379 if (pdfium::ContainsKey(m_pagesLoadState, iPage)) |
4380 return DataAvailable; | 4380 return DataAvailable; |
4381 | 4381 |
4382 if (m_bLinearized) { | 4382 if (m_bLinearized) { |
4383 if ((FX_DWORD)iPage == m_dwFirstPageNo) { | 4383 if ((FX_DWORD)iPage == m_dwFirstPageNo) { |
| 4384 if (!CheckLinearizedFirstPage(iPage, pHints)) |
| 4385 return DataNotAvailable; |
4384 m_pagesLoadState.insert(iPage); | 4386 m_pagesLoadState.insert(iPage); |
4385 return DataAvailable; | 4387 return DataAvailable; |
4386 } | 4388 } |
4387 int32_t nResult = CheckLinearizedData(pHints); | 4389 int32_t nResult = CheckLinearizedData(pHints); |
4388 if (nResult != DataAvailable) { | 4390 if (nResult != DataAvailable) { |
4389 return nResult; | 4391 return nResult; |
4390 } | 4392 } |
4391 if (m_pHintTables) { | 4393 if (m_pHintTables) { |
4392 nResult = m_pHintTables->CheckPage(iPage, pHints); | 4394 nResult = m_pHintTables->CheckPage(iPage, pHints); |
4393 if (nResult != DataAvailable) | 4395 if (nResult != DataAvailable) |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4985 if (!m_pLinearizedDict) | 4987 if (!m_pLinearizedDict) |
4986 return -1; | 4988 return -1; |
4987 CPDF_Array* pRange = m_pLinearizedDict->GetArray("H"); | 4989 CPDF_Array* pRange = m_pLinearizedDict->GetArray("H"); |
4988 if (!pRange) | 4990 if (!pRange) |
4989 return -1; | 4991 return -1; |
4990 CPDF_Object* pStreamLen = pRange->GetElementValue(1); | 4992 CPDF_Object* pStreamLen = pRange->GetElementValue(1); |
4991 if (!pStreamLen) | 4993 if (!pStreamLen) |
4992 return -1; | 4994 return -1; |
4993 return pStreamLen->GetInteger(); | 4995 return pStreamLen->GetInteger(); |
4994 } | 4996 } |
OLD | NEW |