X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=backend%2Fxps%2Fxps-document.c;h=6e34f077d9f1ab7f9c001b4ed61edb0da5994cfe;hb=e769474337c9a6ffdaed2327056e8de2f7ca9ee4;hp=4e290b0faea3f7658d15d7173977d2ec3c516f8d;hpb=8ad7d34a6f7dda19b83e32f05f384927e30bb7ef;p=evince.git diff --git a/backend/xps/xps-document.c b/backend/xps/xps-document.c index 4e290b0f..6e34f077 100644 --- a/backend/xps/xps-document.c +++ b/backend/xps/xps-document.c @@ -319,6 +319,13 @@ ev_link_from_target (XPSDocument *xps_document, dest = ev_link_dest_new_named (anchor); ev_action = ev_link_action_new_dest (dest); + } else if (doc == -1 && anchor && + gxps_document_get_page_for_anchor (xps_document->doc, anchor) >= 0) { + /* Internal, but source is not a doc, + * let's try with doc = 0 + */ + dest = ev_link_dest_new_named (anchor); + ev_action = ev_link_action_new_dest (dest); } else { gchar *filename;