summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_parser.h
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2017-10-02 22:08:44 +0300
committerChromium commit bot <commit-bot@chromium.org>2017-10-04 15:41:16 +0000
commita5fc8975c865dc3cc90de8ff46ca13fb46c13391 (patch)
tree36b38e781140fc31eeec8a55d85299911117ac2b /core/fpdfapi/parser/cpdf_parser.h
parent4db6e37b18648dfe2c94b672276c7bf6554fd9d4 (diff)
downloadpdfium-a5fc8975c865dc3cc90de8ff46ca13fb46c13391.tar.xz
Unify parsing of cross ref table v4.
We can use 'Prev' value of first-page cross-reference table trailer for load main cross-reference table, instead of 'T' value of Linearized header (Offset of first entry in main cross-reference table). This is better solution, because this is allow us check entry count in main cross-ref table and unify loading of main cross-ref table with loading methods of non linearized document. See PDF specification: http://wwwimages.adobe.com/content/dam/Adobe/en/devnet/pdf/pdfs/PDF32000_2008.pdf#678 (page 678, Example 3/part 3) Change-Id: I59dcf3c73a0fb561221ded78e827e40535dbd717 Reviewed-on: https://pdfium-review.googlesource.com/13810 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_parser.h')
-rw-r--r--core/fpdfapi/parser/cpdf_parser.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h
index 7c6a75d8c5..96bd6f43a9 100644
--- a/core/fpdfapi/parser/cpdf_parser.h
+++ b/core/fpdfapi/parser/cpdf_parser.h
@@ -162,8 +162,7 @@ class CPDF_Parser {
std::unique_ptr<CPDF_Dictionary> LoadTrailerV4();
Error SetEncryptHandler();
void ReleaseEncryptHandler();
- bool LoadLinearizedAllCrossRefV4(FX_FILESIZE pos, uint32_t dwObjCount);
- bool LoadLinearizedCrossRefV4(FX_FILESIZE pos, uint32_t dwObjCount);
+ bool LoadLinearizedAllCrossRefV4(FX_FILESIZE pos);
bool LoadLinearizedAllCrossRefV5(FX_FILESIZE pos);
Error LoadLinearizedMainXRefTable();
RetainPtr<CPDF_StreamAcc> GetObjectStream(uint32_t number);
@@ -207,7 +206,6 @@ class CPDF_Parser {
ByteString m_Password;
std::unique_ptr<TrailerData> m_TrailerData;
std::unique_ptr<CPDF_LinearizedHeader> m_pLinearized;
- uint32_t m_dwLinearizedFirstPageXRefStartObjNum;
// A map of object numbers to indirect streams.
std::map<uint32_t, RetainPtr<CPDF_StreamAcc>> m_ObjectStreamMap;