summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_parser.h
diff options
context:
space:
mode:
authorArtem Strygin <art-snake@yandex-team.ru>2017-08-09 22:44:57 +0300
committerChromium commit bot <commit-bot@chromium.org>2017-08-09 19:59:23 +0000
commitd0f2dcd0802969494e991d8cef00b4bd81aefc8d (patch)
treef9786fdd61c37cfc87855ea43234228772f51309 /core/fpdfapi/parser/cpdf_parser.h
parent44f777901732fbf1bdb152e6ff4d1ba41ce75bba (diff)
downloadpdfium-d0f2dcd0802969494e991d8cef00b4bd81aefc8d.tar.xz
Unify initialization of CPDF_Parser.
Move syntax parser initialization in separate method. Change-Id: I701284b1fee26a474c24ca68948a3462cc68faec Reviewed-on: https://pdfium-review.googlesource.com/10291 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.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h
index fd74c5471e..594171be46 100644
--- a/core/fpdfapi/parser/cpdf_parser.h
+++ b/core/fpdfapi/parser/cpdf_parser.h
@@ -152,9 +152,7 @@ class CPDF_Parser {
ObjectInfo info;
};
- Error StartParseInternal(const CFX_RetainPtr<IFX_SeekableReadStream>& pFile,
- CPDF_Document* pDocument,
- int32_t iHeaderOffset);
+ Error StartParseInternal(CPDF_Document* pDocument);
CPDF_Object* ParseDirect(CPDF_Object* pObj);
bool LoadAllCrossRefV4(FX_FILESIZE pos);
bool LoadAllCrossRefV5(FX_FILESIZE pos);
@@ -167,9 +165,7 @@ class CPDF_Parser {
bool LoadLinearizedAllCrossRefV5(FX_FILESIZE pos);
Error LoadLinearizedMainXRefTable();
CFX_RetainPtr<CPDF_StreamAcc> GetObjectStream(uint32_t number);
- bool IsLinearizedFile(
- const CFX_RetainPtr<IFX_SeekableReadStream>& pFileAccess,
- uint32_t offset);
+ bool ParseLinearizedHeader();
void SetEncryptDictionary(CPDF_Dictionary* pDict);
void ShrinkObjectMap(uint32_t size);
// A simple check whether the cross reference table matches with
@@ -193,6 +189,10 @@ class CPDF_Parser {
bool strict_parse,
FX_FILESIZE* pResultPos);
+ bool InitSyntaxParser(
+ const CFX_RetainPtr<IFX_SeekableReadStream>& file_access);
+ bool ParseFileVersion();
+
CFX_UnownedPtr<CPDF_Document> m_pDocument;
bool m_bHasParsed;
bool m_bXRefStream;