From 042737087ae74a840c1e006fe5cfcfcae4333c74 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 27 Jun 2018 23:18:43 +0000 Subject: Remove CPDF_Parser::ParseIndirectObjectAtByStrict(). Commit 0145b89a removed the only caller. Change-Id: Ib3b7eaa0bc8be986f7d290f1efaea519d68daf6b Reviewed-on: https://pdfium-review.googlesource.com/36251 Reviewed-by: Art Snake Commit-Queue: Lei Zhang --- core/fpdfapi/parser/cpdf_parser.cpp | 23 ++--------------------- core/fpdfapi/parser/cpdf_parser.h | 11 ----------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp index 3986f3684f..e372f1272c 100644 --- a/core/fpdfapi/parser/cpdf_parser.cpp +++ b/core/fpdfapi/parser/cpdf_parser.cpp @@ -1196,22 +1196,11 @@ const CPDF_ObjectStream* CPDF_Parser::GetObjectStream(uint32_t object_number) { std::unique_ptr CPDF_Parser::ParseIndirectObjectAt( FX_FILESIZE pos, uint32_t objnum) { - return ParseIndirectObjectAtInternal( - pos, objnum, CPDF_SyntaxParser::ParseType::kLoose, nullptr); -} - -std::unique_ptr CPDF_Parser::ParseIndirectObjectAtInternal( - FX_FILESIZE pos, - uint32_t objnum, - CPDF_SyntaxParser::ParseType parse_type, - FX_FILESIZE* pResultPos) { const FX_FILESIZE saved_pos = m_pSyntax->GetPos(); m_pSyntax->SetPos(pos); - auto result = - m_pSyntax->GetIndirectObject(m_pObjectsHolder.Get(), parse_type); + auto result = m_pSyntax->GetIndirectObject( + m_pObjectsHolder.Get(), CPDF_SyntaxParser::ParseType::kLoose); - if (pResultPos) - *pResultPos = m_pSyntax->GetPos(); m_pSyntax->SetPos(saved_pos); if (result && objnum && result->GetObjNum() != objnum) @@ -1227,14 +1216,6 @@ std::unique_ptr CPDF_Parser::ParseIndirectObjectAtInternal( return result; } -std::unique_ptr CPDF_Parser::ParseIndirectObjectAtByStrict( - FX_FILESIZE pos, - uint32_t objnum, - FX_FILESIZE* pResultPos) { - return ParseIndirectObjectAtInternal( - pos, objnum, CPDF_SyntaxParser::ParseType::kStrict, pResultPos); -} - uint32_t CPDF_Parser::GetFirstPageNo() const { return m_pLinearized ? m_pLinearized->GetFirstPageNo() : 0; } diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h index 1a1f9b0de4..74fbdfeaa8 100644 --- a/core/fpdfapi/parser/cpdf_parser.h +++ b/core/fpdfapi/parser/cpdf_parser.h @@ -103,11 +103,6 @@ class CPDF_Parser { FX_FILESIZE pos, uint32_t objnum); - std::unique_ptr ParseIndirectObjectAtByStrict( - FX_FILESIZE pos, - uint32_t objnum, - FX_FILESIZE* pResultPos); - uint32_t GetFirstPageNo() const; const CPDF_LinearizedHeader* GetLinearizedHeader() const { return m_pLinearized.get(); @@ -180,12 +175,6 @@ class CPDF_Parser { bool ParseCrossRefV4(std::vector* out_objects); void MergeCrossRefObjectsData(const std::vector& objects); - std::unique_ptr ParseIndirectObjectAtInternal( - FX_FILESIZE pos, - uint32_t objnum, - CPDF_SyntaxParser::ParseType parse_type, - FX_FILESIZE* pResultPos); - bool InitSyntaxParser(const RetainPtr& validator); bool ParseFileVersion(); -- cgit v1.2.3