summaryrefslogtreecommitdiff
path: root/core/fpdfapi
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2018-06-05 13:18:58 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-05 13:18:58 +0000
commit2c15639637cc9908751fee21019cf3c4a8c60732 (patch)
treeef778788cdafebf6c9f4427f8c7854e58315d2af /core/fpdfapi
parent221f0b3e09b9d77b1873a52fff23c7c39df251bb (diff)
downloadpdfium-2c15639637cc9908751fee21019cf3c4a8c60732.tar.xz
Remove useless code.
Change-Id: I68bd9004cb034df749625f4c83072b08d33202e4 Reviewed-on: https://pdfium-review.googlesource.com/17730 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r--core/fpdfapi/parser/cpdf_data_avail.cpp18
-rw-r--r--core/fpdfapi/parser/cpdf_data_avail.h4
2 files changed, 6 insertions, 16 deletions
diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp
index 719169af72..f1a5d0c143 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.cpp
+++ b/core/fpdfapi/parser/cpdf_data_avail.cpp
@@ -80,9 +80,8 @@ CPDF_DataAvail::CPDF_DataAvail(
FileAvail* pFileAvail,
const RetainPtr<IFX_SeekableReadStream>& pFileRead,
bool bSupportHintTable)
- : m_pFileAvail(pFileAvail),
- m_pFileRead(
- pdfium::MakeRetain<CPDF_ReadValidator>(pFileRead, m_pFileAvail)),
+ : m_pFileRead(
+ pdfium::MakeRetain<CPDF_ReadValidator>(pFileRead, pFileAvail)),
m_dwFileLen(m_pFileRead->GetSize()),
m_bSupportHintTable(bSupportHintTable) {}
@@ -201,7 +200,6 @@ bool CPDF_DataAvail::CheckAndLoadAllXref() {
m_dwRootObjNum = m_parser.GetRootObjNum();
m_dwInfoObjNum = m_parser.GetInfoObjNum();
- m_pCurrentParser = &m_parser;
m_docStatus = PDF_DATAAVAIL_ROOT;
return true;
}
@@ -287,7 +285,6 @@ bool CPDF_DataAvail::PreparePageItem() {
}
m_PagesObjNum = pRef->GetRefObjNum();
- m_pCurrentParser = m_pDocument->GetParser();
m_docStatus = PDF_DATAAVAIL_PAGETREE;
return true;
}
@@ -334,7 +331,7 @@ bool CPDF_DataAvail::CheckPage() {
size_t iPages = m_PagesArray.size();
for (size_t i = 0; i < iPages; ++i) {
std::unique_ptr<CPDF_Object> pPages = std::move(m_PagesArray[i]);
- if (pPages && !GetPageKids(m_pCurrentParser, pPages.get())) {
+ if (pPages && !GetPageKids(pPages.get())) {
m_PagesArray.clear();
m_docStatus = PDF_DATAAVAIL_ERROR;
return false;
@@ -347,12 +344,7 @@ bool CPDF_DataAvail::CheckPage() {
return true;
}
-bool CPDF_DataAvail::GetPageKids(CPDF_Parser* pParser, CPDF_Object* pPages) {
- if (!pParser) {
- m_docStatus = PDF_DATAAVAIL_ERROR;
- return false;
- }
-
+bool CPDF_DataAvail::GetPageKids(CPDF_Object* pPages) {
CPDF_Dictionary* pDict = pPages->GetDict();
CPDF_Object* pKids = pDict ? pDict->GetObjectFor("Kids") : nullptr;
if (!pKids)
@@ -393,7 +385,7 @@ bool CPDF_DataAvail::CheckPages() {
return false;
}
- if (!GetPageKids(m_pCurrentParser, pPages.get())) {
+ if (!GetPageKids(pPages.get())) {
m_docStatus = PDF_DATAAVAIL_ERROR;
return false;
}
diff --git a/core/fpdfapi/parser/cpdf_data_avail.h b/core/fpdfapi/parser/cpdf_data_avail.h
index 2a0705d33d..08bb77a23f 100644
--- a/core/fpdfapi/parser/cpdf_data_avail.h
+++ b/core/fpdfapi/parser/cpdf_data_avail.h
@@ -142,7 +142,7 @@ class CPDF_DataAvail final {
CPDF_IndirectObjectHolder* pObjList = nullptr) const;
std::unique_ptr<CPDF_Object> GetObject(uint32_t objnum,
bool* pExistInFile);
- bool GetPageKids(CPDF_Parser* pParser, CPDF_Object* pPages);
+ bool GetPageKids(CPDF_Object* pPages);
bool PreparePageItem();
bool LoadPages();
bool CheckAndLoadAllXref();
@@ -164,7 +164,6 @@ class CPDF_DataAvail final {
bool ValidatePage(uint32_t dwPage) const;
CPDF_SyntaxParser* GetSyntaxParser() const;
- FileAvail* const m_pFileAvail;
RetainPtr<CPDF_ReadValidator> m_pFileRead;
CPDF_Parser m_parser;
std::unique_ptr<CPDF_Object> m_pRoot;
@@ -192,7 +191,6 @@ class CPDF_DataAvail final {
PageNode m_PageNode;
std::set<uint32_t> m_pageMapCheckState;
std::set<uint32_t> m_pagesLoadState;
- std::set<uint32_t> m_SeenPrevPositions;
std::unique_ptr<CPDF_HintTables> m_pHintTables;
const bool m_bSupportHintTable;
std::map<uint32_t, std::unique_ptr<CPDF_PageObjectAvail>> m_PagesObjAvail;