void-packages/srcpkgs/epdfview/patches/epdfview-0.1.7-poppler-chan...

86 lines
2.3 KiB
Diff

--- src/IDocument.cxx (revision 338)
+++ 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
///
--- src/PDFDocument.cxx (revision 356)
+++ 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;
--- src/IDocument.h (revision 340)
+++ 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;
--- configure.ac (revision 354)
+++ 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])