summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/fpdfapi/parser/cpdf_data_avail.cpp26
-rw-r--r--core/fpdfapi/parser/cpdf_data_avail.h1
2 files changed, 0 insertions, 27 deletions
diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp
index ed5b2880b5..8370b8cd5f 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/parser/cpdf_data_avail.cpp
@@ -127,32 +127,6 @@ void CPDF_DataAvail::SetDocument(CPDF_Document* pDoc) {
m_pDocument = pDoc;
}
-uint32_t CPDF_DataAvail::GetObjectSize(uint32_t objnum, FX_FILESIZE& offset) {
- CPDF_Parser* pParser = m_pDocument->GetParser();
- if (!pParser || !pParser->IsValidObjectNumber(objnum))
- return 0;
-
- if (pParser->GetObjectType(objnum) == CPDF_Parser::ObjectType::kCompressed)
- objnum = pParser->GetObjectPositionOrZero(objnum);
-
- if (pParser->GetObjectType(objnum) !=
- CPDF_Parser::ObjectType::kNotCompressed &&
- pParser->GetObjectType(objnum) != CPDF_Parser::ObjectType::kNull) {
- return 0;
- }
-
- offset = pParser->GetObjectPositionOrZero(objnum);
- if (offset == 0)
- return 0;
-
- auto it = pParser->m_SortedOffset.find(offset);
- if (it == pParser->m_SortedOffset.end() ||
- ++it == pParser->m_SortedOffset.end()) {
- return 0;
- }
- return *it - offset;
-}
-
bool CPDF_DataAvail::AreObjectsAvailable(std::vector<CPDF_Object*>& obj_array,
bool bParsePage,
std::vector<CPDF_Object*>& ret_array) {
diff --git a/core/fpdfapi/parser/cpdf_data_avail.h b/core/fpdfapi/parser/cpdf_data_avail.h
index f15f7c0e1d..30d76f3dab 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.h
+++ b/core/fpdfapi/parser/cpdf_data_avail.h
@@ -126,7 +126,6 @@ class CPDF_DataAvail final {
static const int kMaxPageRecursionDepth = 1024;
- uint32_t GetObjectSize(uint32_t objnum, FX_FILESIZE& offset);
bool AreObjectsAvailable(std::vector<CPDF_Object*>& obj_array,
bool bParsePage,
std::vector<CPDF_Object*>& ret_array);