summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_parser.h
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2018-07-18 04:32:08 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-18 04:32:08 +0000
commit084c31d93439d5166c60dbfb0ccee6db1406d09c (patch)
treeb5a420219ca6fbd14b05395df8d9f2eac53b2202 /core/fpdfapi/parser/cpdf_parser.h
parenta18536af5b32b63f795d8b5812a4303c7ee6ea97 (diff)
downloadpdfium-084c31d93439d5166c60dbfb0ccee6db1406d09c.tar.xz
Use CPDF_CrossRefTable within CPDF_Parser
Change-Id: I354e8bed12606abdc67427bbc7928e3b1f11e243 Reviewed-on: https://pdfium-review.googlesource.com/35433 Commit-Queue: Art Snake <art-snake@yandex-team.ru> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_parser.h')
-rw-r--r--core/fpdfapi/parser/cpdf_parser.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h
index e9b2a760ea..fc4e49910d 100644
--- a/core/fpdfapi/parser/cpdf_parser.h
+++ b/core/fpdfapi/parser/cpdf_parser.h
@@ -93,8 +93,6 @@ class CPDF_Parser {
RetainPtr<IFX_SeekableReadStream> GetFileAccess() const;
bool IsObjectFree(uint32_t objnum) const;
- FX_FILESIZE GetObjectOffset(uint32_t objnum) const;
-
int GetFileVersion() const { return m_FileVersion; }
bool IsXRefStream() const { return m_bXRefStream; }
@@ -107,6 +105,10 @@ class CPDF_Parser {
return m_pLinearized.get();
}
+ const CPDF_CrossRefTable* GetCrossRefTable() const {
+ return m_CrossRefTable.get();
+ }
+
void SetLinearizedHeader(std::unique_ptr<CPDF_LinearizedHeader> pLinearized);
protected:
@@ -114,7 +116,6 @@ class CPDF_Parser {
using ObjectInfo = CPDF_CrossRefTable::ObjectInfo;
std::unique_ptr<CPDF_SyntaxParser> m_pSyntax;
- std::map<uint32_t, ObjectInfo> m_ObjectInfo;
bool LoadCrossRefV4(FX_FILESIZE pos, bool bSkip);
bool RebuildCrossRef();
@@ -122,8 +123,6 @@ class CPDF_Parser {
private:
friend class CPDF_DataAvail;
- class TrailerData;
-
enum class ParserState {
kDefault,
kComment,
@@ -187,9 +186,9 @@ class CPDF_Parser {
bool m_bHasParsed;
bool m_bXRefStream;
int m_FileVersion;
- // m_TrailerData must be destroyed after m_pSecurityHandler due to the
+ // m_CrossRefTable must be destroyed after m_pSecurityHandler due to the
// ownership of the ID array data.
- std::unique_ptr<TrailerData> m_TrailerData;
+ std::unique_ptr<CPDF_CrossRefTable> m_CrossRefTable;
std::unique_ptr<CPDF_Dictionary> m_pEncryptDict;
FX_FILESIZE m_LastXRefOffset;
std::unique_ptr<CPDF_SecurityHandler> m_pSecurityHandler;