summaryrefslogtreecommitdiff
path: root/office/evince/evince_poppler016.patch
blob: db13cc968159af89f3800cf5fb88fb0c08749ccd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--- evince-2.28.2/backend/pdf/ev-poppler.cc	2010-06-24 10:19:28.000000000 +0200
+++ evince-2.28.2_patched/backend/pdf/ev-poppler.cc	2011-02-02 10:46:54.000000000 +0100
@@ -1923,12 +1923,18 @@
 				 EvRectangle     *points)
 {
 	PopplerPage *poppler_page;
-	PopplerRectangle r;
-	double height;
 	char *retval;
-	
+
 	poppler_page = POPPLER_PAGE (rc->page->backend_page);
 
+#ifdef HAVE_POPPLER_PAGE_GET_SELECTED_TEXT
+	retval = poppler_page_get_selected_text (poppler_page,
+						 (PopplerSelectionStyle)style,
+						 (PopplerRectangle *)points);
+#else
+	PopplerRectangle r;
+	double height;
+
 	poppler_page_get_size (poppler_page, NULL, &height);
 	r.x1 = points->x1;
 	r.y1 = height - points->y2;
@@ -1938,6 +1944,7 @@
 	retval = poppler_page_get_text (poppler_page,
 					(PopplerSelectionStyle)style,
 					&r);
+#endif /* HAVE_POPPLER_PAGE_GET_SELECTED_TEXT */
 
 	return retval;
 }
--- evince-2.28.2/config.h.in	2009-12-14 18:04:12.000000000 -0200
+++ evince-2.28.2_patched/config.h.in	2011-03-11 14:32:31.000000000 -0300
@@ -88,6 +88,9 @@
 /* Define to 1 if you have the `poppler_page_render' function. */
 #undef HAVE_POPPLER_PAGE_RENDER
 
+/* Define to 1 if you have the `poppler_page_get_selected_text' function. */
+#undef HAVE_POPPLER_PAGE_GET_SELECTED_TEXT
+
 /* Have libspectre */
 #undef HAVE_SPECTRE
 
--- evince-2.28.2/configure	2009-12-14 18:04:12.000000000 -0200
+++ evince-2.28.2_patched/configure	2011-03-23 13:32:27.000000000 -0300
@@ -23503,7 +23503,7 @@
 done
 
 
-for ac_func in poppler_page_get_image
+for ac_func in poppler_page_get_image poppler_page_get_selected_text
 do
 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 { $as_echo "$as_me:$LINENO: checking for $ac_func" >&5