summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibPDF/Document.h
diff options
context:
space:
mode:
authorRodrigo Tobar <rtobarc@gmail.com>2023-01-06 00:41:44 +0800
committerAndreas Kling <kling@serenityos.org>2023-01-06 18:06:41 +0100
commita5620fd41f1ecb79eb1d14056cb1a8028aa56969 (patch)
tree74906058473e62a9abbbe966e5daac070b85a893 /Userland/Libraries/LibPDF/Document.h
parent5420261347163126430d9818452f5e774d7b1fca (diff)
downloadserenity-a5620fd41f1ecb79eb1d14056cb1a8028aa56969.zip
LibPDF: Load destinations from Catalogue -> Names -> Dests name tree
PDF allows for named destinations to be provided as string. These can be either found in the Dests dictionary in the document catalogue (as already implemented), or in the Name Tree specified by the Dests key in the Names dictionary of the document catalogue (missing). This commit adds this missing case. Once the named destination is found in the name tree, its value is interpreted just like in the first case, so a new utility method encapsulates the common behavior.
Diffstat (limited to 'Userland/Libraries/LibPDF/Document.h')
-rw-r--r--Userland/Libraries/LibPDF/Document.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibPDF/Document.h b/Userland/Libraries/LibPDF/Document.h
index 3b183ceab9..2074af9455 100644
--- a/Userland/Libraries/LibPDF/Document.h
+++ b/Userland/Libraries/LibPDF/Document.h
@@ -136,6 +136,7 @@ private:
PDFErrorOr<NonnullRefPtrVector<OutlineItem>> build_outline_item_chain(Value const& first_ref, HashMap<u32, u32> const&);
PDFErrorOr<Destination> create_destination_from_parameters(NonnullRefPtr<ArrayObject>, HashMap<u32, u32> const&);
+ PDFErrorOr<Destination> create_destination_from_dictionary_entry(NonnullRefPtr<Object> const& entry, HashMap<u32, u32> const& page_number_by_index_ref);
PDFErrorOr<NonnullRefPtr<Object>> get_inheritable_object(FlyString const& name, NonnullRefPtr<DictObject>);