|
|
|
@ -119,6 +119,23 @@ void TOC::slotExecuted( QListViewItem *i ) |
|
|
|
if (tocItem == NULL) |
|
|
|
if (tocItem == NULL) |
|
|
|
return; |
|
|
|
return; |
|
|
|
const QDomElement & e = tocItem->element(); |
|
|
|
const QDomElement & e = tocItem->element(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString externalFileName = e.attribute( "ExternalFileName" ); |
|
|
|
|
|
|
|
if ( !externalFileName.isEmpty() ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
KPDFLinkGoto link( externalFileName, DocumentViewport() ); |
|
|
|
|
|
|
|
m_document->processLink( &link ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
QString externalFileName = e.attribute( "ExternalFileName" ); |
|
|
|
|
|
|
|
if ( !externalFileName.isEmpty() ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
KPDFLinkGoto link( externalFileName, DocumentViewport() ); |
|
|
|
|
|
|
|
m_document->processLink( &link ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
if ( e.hasAttribute( "Viewport" ) ) |
|
|
|
if ( e.hasAttribute( "Viewport" ) ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// if the node has a viewport, set it
|
|
|
|
// if the node has a viewport, set it
|
|
|
|
@ -133,5 +150,6 @@ void TOC::slotExecuted( QListViewItem *i ) |
|
|
|
m_document->setViewport( DocumentViewport( viewport ), TOC_ID ); |
|
|
|
m_document->setViewport( DocumentViewport( viewport ), TOC_ID ); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#include "toc.moc" |
|
|
|
#include "toc.moc" |
|
|
|
|