summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2017-08-15 11:50:42 +0300
committerChromium commit bot <commit-bot@chromium.org>2017-08-15 15:52:41 +0000
commit29fd935aab369d210c2a6cc2682e8aaac56d4d36 (patch)
tree7efebd584e868bb3cb770f3e46c4f00d65efc671 /core
parent22fcbeaa80c54bef3bb6fd4180ba5519fab30962 (diff)
downloadpdfium-29fd935aab369d210c2a6cc2682e8aaac56d4d36.tar.xz
Remove useless code.
Change-Id: I2c5ea6a0c4487c0200229f4709214bda1f287de8 Reviewed-on: https://pdfium-review.googlesource.com/10990 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core')
-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);