summaryrefslogtreecommitdiff
path: root/pdf/pdf_outline.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-12-23 12:59:24 +0000
committerRobin Watts <robin.watts@artifex.com>2011-12-23 13:18:42 +0000
commit73e548cdd564c6c2099ceafaa4019a7dbb188a30 (patch)
treee2d0b498abf0f0057d7d565d6b465226e6491d60 /pdf/pdf_outline.c
parentcc4dd0f8358d3de1594cc530b8f2691bccf194f0 (diff)
downloadmupdf-73e548cdd564c6c2099ceafaa4019a7dbb188a30.tar.xz
Generalise pdf_links to be fz_links.
Move to a non-pdf specific type for links. PDF specific parsing is done in pdf_annots.c as before, but the essential type (and handling functions for that type) are in a new file fitz/base_link.c. The new type is more expressive than before; specifically all the possible PDF modes are expressable in it. Hopefully this should allow XPS links to be represented too.
Diffstat (limited to 'pdf/pdf_outline.c')
-rw-r--r--pdf/pdf_outline.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/pdf/pdf_outline.c b/pdf/pdf_outline.c
index 8a33d8e2..3f6b745b 100644
--- a/pdf/pdf_outline.c
+++ b/pdf/pdf_outline.c
@@ -5,7 +5,6 @@ static fz_outline *
pdf_load_outline_imp(pdf_xref *xref, fz_obj *dict)
{
fz_context *ctx = xref->ctx;
- pdf_link *link;
fz_outline *node;
fz_obj *obj;
@@ -25,10 +24,8 @@ pdf_load_outline_imp(pdf_xref *xref, fz_obj *dict)
if (fz_dict_gets(dict, "Dest") || fz_dict_gets(dict, "A"))
{
- link = pdf_load_link(xref, dict);
- if (link && link->kind == PDF_LINK_GOTO)
- node->page = pdf_find_page_number(xref, fz_array_get(link->dest, 0));
- pdf_free_link(xref->ctx, link);
+ fz_link_dest ld = pdf_parse_link_dest(xref, dict);
+ node->page = ld.gotor.page;
}
obj = fz_dict_gets(dict, "First");