summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_parser.cpp23
-rw-r--r--core/fpdfapi/parser/cpdf_parser.h11
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();