summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser/cpdf_parser.h')
-rw-r--r--core/fpdfapi/parser/cpdf_parser.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/core/fpdfapi/parser/cpdf_parser.h b/core/fpdfapi/parser/cpdf_parser.h
index ece1e6a2d4..759d042360 100644
--- a/core/fpdfapi/parser/cpdf_parser.h
+++ b/core/fpdfapi/parser/cpdf_parser.h
@@ -148,6 +148,11 @@ class CPDF_Parser {
kEndObj
};
+ struct CrossRefObjData {
+ uint32_t obj_num = 0;
+ ObjectInfo info;
+ };
+
CPDF_Object* ParseDirect(CPDF_Object* pObj);
bool LoadAllCrossRefV4(FX_FILESIZE pos);
bool LoadAllCrossRefV5(FX_FILESIZE pos);
@@ -169,6 +174,16 @@ class CPDF_Parser {
// the objects.
bool VerifyCrossRefV4();
+ // If out_objects is null, the parser position will be moved to end subsection
+ // without additional validation.
+ bool ParseAndAppendCrossRefSubsectionData(
+ uint32_t start_objnum,
+ uint32_t count,
+ std::vector<CrossRefObjData>* out_objects);
+ bool ParseCrossRefV4(std::vector<CrossRefObjData>* out_objects,
+ uint32_t* start_obj_num_at_last_block);
+ void MergeCrossRefObjectsData(const std::vector<CrossRefObjData>& objects);
+
CFX_UnownedPtr<CPDF_Document> m_pDocument;
bool m_bHasParsed;
bool m_bXRefStream;