Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2009-02-01 10:12:10 (GMT)
committer Carlos Garcia Campos <carlosgc@src.gnome.org>2009-02-01 10:12:10 (GMT)
commit4801638536a61e0b81df1f2278703a819918ce11 (patch)
tree6eb7c39333c8314200a45901e78084945900a5c7
parent90839f7bfb620f737de365e45384b4b1f90470e9 (diff)
Clamp top/bottom values of destinations to make sure they are not bigger
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. svn path=/trunk/; revision=3396
-rw-r--r--ChangeLog7
-rw-r--r--backend/pdf/ev-poppler.cc8
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index f14fa1b..4215dc3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
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.
+
+2009-02-01 Carlos Garcia Campos <carlosgc@gnome.org>
+
* libdocument/ev-debug.h:
Fix build when debug mode is disabled.
diff --git a/backend/pdf/ev-poppler.cc b/backend/pdf/ev-poppler.cc
index bdce0b5..a0c0f89 100644
--- a/backend/pdf/ev-poppler.cc
+++ b/backend/pdf/ev-poppler.cc
@@ -883,7 +883,7 @@ ev_link_dest_from_dest (PdfDocument *pdf_document,
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 @@ ev_link_dest_from_dest (PdfDocument *pdf_document,
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 @@ ev_link_dest_from_dest (PdfDocument *pdf_document,
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;