diff options
author | infirit <[email protected]> | 2014-12-09 12:35:42 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-09 23:02:27 +0100 |
commit | a0640f1aaed023144137f0c8ad7f04eb5c9605a0 (patch) | |
tree | 4617da9dfada4f95434b4f7185358f6b4b17daff /backend | |
parent | 2c4ce19338e74f69e3f36f890afdeb9d86a7f87d (diff) | |
download | atril-a0640f1aaed023144137f0c8ad7f04eb5c9605a0.tar.bz2 atril-a0640f1aaed023144137f0c8ad7f04eb5c9605a0.tar.xz |
[pdf] Do not resolve named destinations in the backend
Taken from evince commit: c4923eca28c74fad47acdd1ebaafff206107f721
From: Carlos Garcia Campos <[email protected]>
Diffstat (limited to 'backend')
-rw-r--r-- | backend/pdf/ev-poppler.cc | 31 |
1 files changed, 1 insertions, 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) |