diff options
author | Lei Zhang <thestig@chromium.org> | 2018-06-27 23:18:43 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-27 23:18:43 +0000 |
commit | 042737087ae74a840c1e006fe5cfcfcae4333c74 (patch) | |
tree | 69ba3af64bf0ae19faa79cf97416f19542727123 /core/fpdfapi/parser | |
parent | a2c2a9d2a1e718e08bb90f92a2f24f4cb990189f (diff) | |
download | pdfium-042737087ae74a840c1e006fe5cfcfcae4333c74.tar.xz |
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 <art-snake@yandex-team.ru>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r-- | core/fpdfapi/parser/cpdf_parser.cpp | 23 | ||||
-rw-r--r-- | 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_Object> CPDF_Parser::ParseIndirectObjectAt( FX_FILESIZE pos, uint32_t objnum) { - return ParseIndirectObjectAtInternal( - pos, objnum, CPDF_SyntaxParser::ParseType::kLoose, nullptr); -} - -std::unique_ptr<CPDF_Object> 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_Object> CPDF_Parser::ParseIndirectObjectAtInternal( return result; } -std::unique_ptr<CPDF_Object> 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<CPDF_Object> 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<CrossRefObjData>* out_objects); void MergeCrossRefObjectsData(const std::vector<CrossRefObjData>& objects); - std::unique_ptr<CPDF_Object> ParseIndirectObjectAtInternal( - FX_FILESIZE pos, - uint32_t objnum, - CPDF_SyntaxParser::ParseType parse_type, - FX_FILESIZE* pResultPos); - bool InitSyntaxParser(const RetainPtr<CPDF_ReadValidator>& validator); bool ParseFileVersion(); |