Commit aea55805 authored by Pino Toscano's avatar Pino Toscano

make use of the very recent new poppler api to create named destination actions

svn path=/trunk/KDE/kdegraphics/okular/; revision=967521
parent 3f473512
......@@ -170,9 +170,25 @@ Okular::Action* createLinkFromPopplerLink(const Poppler::Link *popplerLink)
break;
case Poppler::Link::Goto:
{
popplerLinkGoto = static_cast<const Poppler::LinkGoto *>(popplerLink);
#ifdef HAVE_POPPLER_0_11
const Poppler::LinkDestination dest = popplerLinkGoto->destination();
const QString destName = dest.destinationName();
if (destName.isEmpty())
{
fillViewportFromLinkDestination( viewport, dest );
link = new Okular::GotoAction(popplerLinkGoto->fileName(), viewport);
}
else
{
link = new Okular::GotoAction(popplerLinkGoto->fileName(), destName);
}
#else
fillViewportFromLinkDestination( viewport, popplerLinkGoto->destination() );
link = new Okular::GotoAction(popplerLinkGoto->fileName(), viewport);
#endif
}
break;
case Poppler::Link::Execute:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment