Changeset 203
- Timestamp:
- 06/05/06 13:09:33 (2 years ago)
- Files:
-
- trunk/src/PDFDocument.cxx (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/PDFDocument.cxx
r200 r203 86 86 { 87 87 PopplerActionGotoDest *actionGoTo = (PopplerActionGotoDest *)action; 88 int pageNum = 0; 89 PopplerDest *destination = actionGoTo->dest; 90 if ( POPPLER_DEST_NAMED == destination->type ) 91 { 92 destination = 93 poppler_document_find_dest (m_Document, 94 destination->named_dest); 95 if ( NULL != destination ) 96 { 97 pageNum = destination->page_num; 98 poppler_dest_free (destination); 99 } 100 } 101 else 102 { 103 pageNum = destination->page_num; 104 } 105 88 106 documentLink = new DocumentLinkGoto ( 89 107 topLeft, bottomLeft, topRight, bottomRight, 90 actionGoTo->dest->page_num);108 pageNum); 91 109 break; 92 110 } … … 377 395 if ( POPPLER_ACTION_GOTO_DEST == action->type ) 378 396 { 379 PopplerActionGotoDest *actionGoTo = 397 PopplerActionGotoDest *actionGoTo = 380 398 (PopplerActionGotoDest *)action; 381 399 DocumentOutline *child = new DocumentOutline (); … … 383 401 child->setTitle (actionGoTo->title); 384 402 PopplerDest *destination = actionGoTo->dest; 385 child->setDestination (destination->page_num); 386 outline->addChild (child); 403 if ( POPPLER_DEST_NAMED == destination->type ) 404 { 405 destination = 406 poppler_document_find_dest (m_Document, 407 destination->named_dest); 408 if ( NULL != destination ) 409 { 410 child->setDestination (destination->page_num); 411 poppler_dest_free (destination); 412 destination = NULL; 413 } 414 } 415 else 416 { 417 child->setDestination (destination->page_num); 418 } 419 420 outline->addChild (child); 387 421 PopplerIndexIter *childIter = 388 422 poppler_index_iter_get_child (childrenList);
