summaryrefslogtreecommitdiff
blob: e6795ec14165a8e0b2d3cfb7010e65458fe4e29a (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Index: /trunk/src/IDocument.cxx
===================================================================
--- /trunk/src/IDocument.cxx	(revision 338)
+++ /trunk/src/IDocument.cxx	(revision 357)
@@ -750,4 +750,8 @@
 IDocument::getLinearized ()
 {
+#if defined (HAVE_POPPLER_0_15_1)
+    if ( m_Linearized ) return "Yes";
+    else return "No";
+#else
     if ( NULL == m_Linearized )
     {
@@ -755,4 +759,5 @@
     }
     return m_Linearized;
+#endif
 }
 
@@ -763,6 +768,13 @@
 ///                   otherwise. IDocument will free it.
 ///
-void
-IDocument::setLinearized (gchar *linearized)
+#if defined (HAVE_POPPLER_0_15_1)
+void
+IDocument::setLinearized (gboolean *linearized)
+{
+    m_Linearized = linearized;
+}
+#else
+void
+    IDocument::setLinearized (gchar *linearized)
 {
     g_free (m_Linearized);
@@ -770,4 +782,5 @@
     g_free (linearized);
 }
+#endif
 
 ///
Index: /trunk/src/PDFDocument.cxx
===================================================================
--- /trunk/src/PDFDocument.cxx	(revision 356)
+++ /trunk/src/PDFDocument.cxx	(revision 357)
@@ -328,5 +328,9 @@
     gchar *keywords = NULL;
     PopplerPageLayout layout = POPPLER_PAGE_LAYOUT_UNSET;
+#if defined (HAVE_POPPLER_0_15_1)
+    gboolean *linearized = NULL;
+#else
     gchar *linearized = NULL;
+#endif
     GTime modDate;
     PopplerPageMode mode = POPPLER_PAGE_MODE_UNSET;
Index: /trunk/src/IDocument.h
===================================================================
--- /trunk/src/IDocument.h	(revision 340)
+++ /trunk/src/IDocument.h	(revision 357)
@@ -307,5 +307,9 @@
             void setFormat (gchar *format);
             const gchar *getLinearized (void);
+#if defined (HAVE_POPPLER_0_15_1)
+            void setLinearized (gboolean *linearized);
+#else
             void setLinearized (gchar *linearized);
+#endif
             const gchar *getCreationDate (void);
             void setCreationDate (gchar *date);
@@ -383,5 +387,9 @@
             gchar *m_Keywords;
             /// Tells if the document is linearized or not.
+#if defined (HAVE_POPPLER_0_15_1)
+            gboolean *m_Linearized;
+#else
             gchar *m_Linearized;
+#endif
             /// The document's modification date and time.
             gchar *m_ModifiedDate;
Index: /trunk/configure.ac
===================================================================
--- /trunk/configure.ac	(revision 354)
+++ /trunk/configure.ac	(revision 357)
@@ -58,4 +58,9 @@
     AC_DEFINE([HAVE_POPPLER_0_15_0], [1], [Define to 1 if you have Poppler version 0.15.0 or higher.])
 fi
+PKG_CHECK_EXISTS([poppler-glib >= 0.15.1], [have_poppler_0_15_1=yes])
+if test "x$have_poppler_0_15_1" = "xyes"; then
+    AC_DEFINE([HAVE_POPPLER_0_15_1], [1], [Define to 1 if you have Poppler version 0.15.1 or higher.])
+fi
+
 
 AC_MSG_CHECKING([for native Win32])