From a0640f1aaed023144137f0c8ad7f04eb5c9605a0 Mon Sep 17 00:00:00 2001 From: infirit Date: Tue, 9 Dec 2014 12:35:42 +0100 Subject: [pdf] Do not resolve named destinations in the backend Taken from evince commit: c4923eca28c74fad47acdd1ebaafff206107f721 From: Carlos Garcia Campos --- backend/pdf/ev-poppler.cc | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc index f1942687..6b3412a3 100644 --- a/backend/pdf/ev-poppler.cc +++ b/backend/pdf/ev-poppler.cc @@ -1213,36 +1213,7 @@ build_tree (PdfDocument *pdf_document, if (!action) continue; - switch (action->type) { - case POPPLER_ACTION_GOTO_DEST: { - /* For bookmarks, solve named destinations */ - if (action->goto_dest.dest->type == POPPLER_DEST_NAMED) { - PopplerDest *dest; - EvLinkDest *ev_dest = NULL; - EvLinkAction *ev_action; - - dest = poppler_document_find_dest (pdf_document->document, - action->goto_dest.dest->named_dest); - if (!dest) { - link = ev_link_from_action (pdf_document, action); - break; - } - - ev_dest = ev_link_dest_from_dest (pdf_document, dest); - poppler_dest_free (dest); - - ev_action = ev_link_action_new_dest (ev_dest); - link = ev_link_new (action->any.title, ev_action); - } else { - link = ev_link_from_action (pdf_document, action); - } - } - break; - default: - link = ev_link_from_action (pdf_document, action); - break; - } - + link = ev_link_from_action (pdf_document, action); if (!link || strlen (ev_link_get_title (link)) <= 0) { poppler_action_free (action); if (link) -- cgit v1.2.1