summaryrefslogtreecommitdiff
path: root/community-testing/gambas2/poppler-0.18.patch
blob: fbcc430bfa990a603a0727e5ee9dd96cb015b216 (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
--- gambas/trunk/gb.pdf/configure.ac	2010/07/14 01:50:18	3038
+++ gambas/trunk/gb.pdf/configure.ac	2011/08/09 10:43:30	3997
@@ -22,6 +22,8 @@
   AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_8, $((1-$?)), Poppler version >= 0.8)
   pkg-config --atleast-version=0.11.3 poppler
   AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_11_3, $((1-$?)), Poppler version >= 0.11.3)
+  pkg-config --atleast-version=0.17.0 poppler
+  AC_DEFINE_UNQUOTED(POPPLER_VERSION_0_17, $((1-$?)), Poppler version >= 0.17)
 fi
 
 AC_OUTPUT( \

--- gambas/trunk/gb.pdf/src/CPdfDocument.cpp	2011/06/03 00:51:09	3870
+++ gambas/trunk/gb.pdf/src/CPdfDocument.cpp	2011/08/09 10:43:30	3997
@@ -44,6 +44,7 @@
 #include <Outline.h>
 #include <Link.h>
 #include <Gfx.h>
+#include <glib/poppler-features.h>
 
 /*****************************************************************************
 
@@ -956,12 +957,17 @@
  Bookmarks of a PDF page
 
 ******************************************************************************/
+
 void aux_fill_links(void *_object)
 {
+	#if POPPLER_VERSION_0_17
+	THIS->links = new Links (THIS->page->getAnnots (THIS->doc->getCatalog()));
+	#else
 	Object obj;
 	
 	THIS->links = new Links (THIS->page->getAnnots (&obj),THIS->doc->getCatalog()->getBaseURI ());
 	obj.free();
+	#endif
 }
 
 BEGIN_PROPERTY (PDFPAGELINKS_count)