mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibPDF: Keep track of the current object index/generation while Parsing
This information is required to decrypt encrypted strings/streams.
This commit is contained in:
parent
5b316462b2
commit
a8de9cf541
Notes:
sideshowbarker
2024-07-17 16:35:13 +09:00
Author: https://github.com/mattco98
Commit: a8de9cf541
Pull-request: https://github.com/SerenityOS/serenity/pull/13204
2 changed files with 20 additions and 4 deletions
|
@ -104,7 +104,7 @@ private:
|
|||
|
||||
PDFErrorOr<Value> parse_value();
|
||||
PDFErrorOr<Value> parse_possible_indirect_value_or_ref();
|
||||
PDFErrorOr<NonnullRefPtr<IndirectValue>> parse_indirect_value(int index, int generation);
|
||||
PDFErrorOr<NonnullRefPtr<IndirectValue>> parse_indirect_value(u32 index, u32 generation);
|
||||
PDFErrorOr<NonnullRefPtr<IndirectValue>> parse_indirect_value();
|
||||
PDFErrorOr<Value> parse_number();
|
||||
PDFErrorOr<NonnullRefPtr<NameObject>> parse_name();
|
||||
|
@ -117,6 +117,9 @@ private:
|
|||
|
||||
PDFErrorOr<Vector<Command>> parse_graphics_commands();
|
||||
|
||||
void push_reference(Reference const& ref) { m_current_reference_stack.append(ref); }
|
||||
void pop_reference() { m_current_reference_stack.take_last(); }
|
||||
|
||||
bool matches_eol() const;
|
||||
bool matches_whitespace() const;
|
||||
bool matches_number() const;
|
||||
|
@ -142,6 +145,7 @@ private:
|
|||
RefPtr<XRefTable> m_xref_table;
|
||||
RefPtr<DictObject> m_trailer;
|
||||
Optional<LinearizationDictionary> m_linearization_dictionary;
|
||||
Vector<Reference> m_current_reference_stack;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue