evince r3396 - in trunk: . backend/pdf



Author: carlosgc
Date: Sun Feb  1 10:12:10 2009
New Revision: 3396
URL: http://svn.gnome.org/viewvc/evince?rev=3396&view=rev

Log:
2009-02-01  Carlos Garcia Campos  <carlosgc gnome org>

	* backend/pdf/ev-poppler.cc: (ev_link_dest_from_dest):

	Clamp top/bottom values of destinations to make sure they are not
	bigger than the page height. Fixes bug #569327.

Modified:
   trunk/ChangeLog
   trunk/backend/pdf/ev-poppler.cc

Modified: trunk/backend/pdf/ev-poppler.cc
==============================================================================
--- trunk/backend/pdf/ev-poppler.cc	(original)
+++ trunk/backend/pdf/ev-poppler.cc	Sun Feb  1 10:12:10 2009
@@ -883,7 +883,7 @@
 			poppler_page_get_size (poppler_page, NULL, &height);
 			ev_dest = ev_link_dest_new_xyz (dest->page_num - 1,
 							dest->left,
-							height - dest->top,
+							height - MIN (height, dest->top),
 							dest->zoom,
 							dest->change_left,
 							dest->change_top,
@@ -902,7 +902,7 @@
 								  MAX (0, dest->page_num - 1));
 			poppler_page_get_size (poppler_page, NULL, &height);
 			ev_dest = ev_link_dest_new_fith (dest->page_num - 1,
-							 height - dest->top,
+							 height - MIN (height, dest->top),
 							 dest->change_top);
 			g_object_unref (poppler_page);
 		}
@@ -921,9 +921,9 @@
 			poppler_page_get_size (poppler_page, NULL, &height);
 			ev_dest = ev_link_dest_new_fitr (dest->page_num - 1,
 							 dest->left,
-							 height - dest->bottom,
+							 height - MIN (height, dest->bottom),
 							 dest->right,
-							 height - dest->top);
+							 height - MIN (height, dest->top));
 			g_object_unref (poppler_page);
 		}
 			break;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]