diff options
author | Julian Offenhäuser <metalvoidzz@gmail.com> | 2022-08-15 11:45:24 +0200 |
---|---|---|
committer | Sam Atkins <atkinssj@gmail.com> | 2022-09-17 10:07:14 +0100 |
commit | 4887aacec7ee4d659e24a3a16ef48b6b42da16ed (patch) | |
tree | fa9365ea6c06446d782f5d6569a987e0ba218c15 /Userland/Libraries/LibPDF/Document.h | |
parent | 9f4659cc63d19c29b65adb0efa576f5f82fc5586 (diff) | |
download | serenity-4887aacec7ee4d659e24a3a16ef48b6b42da16ed.zip |
LibPDF: Move document-specific parsing functionality into its own class
The Parser class is now a generic PDF object parser, of which the new
DocumentParser class derives. DocumentParser now takes over all
functions relating to linearization, pages, xref and trailer handling.
This allows the use of multiple parsers in the same document's
context, which will be needed in order to handle PDF object streams.
Diffstat (limited to 'Userland/Libraries/LibPDF/Document.h')
-rw-r--r-- | Userland/Libraries/LibPDF/Document.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibPDF/Document.h b/Userland/Libraries/LibPDF/Document.h index fee4b14ccc..4c6d39331f 100644 --- a/Userland/Libraries/LibPDF/Document.h +++ b/Userland/Libraries/LibPDF/Document.h @@ -11,10 +11,10 @@ #include <AK/RefCounted.h> #include <AK/Weakable.h> #include <LibGfx/Color.h> +#include <LibPDF/DocumentParser.h> #include <LibPDF/Encryption.h> #include <LibPDF/Error.h> #include <LibPDF/ObjectDerivatives.h> -#include <LibPDF/Parser.h> namespace PDF { @@ -133,7 +133,7 @@ public: } private: - explicit Document(NonnullRefPtr<Parser> const& parser); + explicit Document(NonnullRefPtr<DocumentParser> const& parser); // FIXME: Currently, to improve performance, we don't load any pages at Document // construction, rather we just load the page structure and populate @@ -150,7 +150,7 @@ private: PDFErrorOr<Destination> create_destination_from_parameters(NonnullRefPtr<ArrayObject>); - NonnullRefPtr<Parser> m_parser; + NonnullRefPtr<DocumentParser> m_parser; RefPtr<DictObject> m_catalog; RefPtr<DictObject> m_trailer; Vector<u32> m_page_object_indices; |