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
|
From f6f8f67460bba296c49f794d14621b7313df4f7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 19 Jul 2011 08:54:07 +0100
Subject: [PATCH] poppler 0.17.0 changed its api for no some reason or other
From 91313fc05abbfe35ee1e0c2464a28dd580780f07 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 2 Sep 2011 13:15:49 +0100
Subject: [PATCH] Resolves: rhbz#735182 libreoffice doesn't build with
poppler-0.17.3
---
.../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 8 ++++++++
.../pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 7 +++++++
2 files changed, 15 insertions(+), 0 deletions(-)
diff --git sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index f7741b4..bd6d721 100644
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -150,7 +150,11 @@ void writeBinaryBuffer( const OutputBuffer& rBuffer )
void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* str, bool bWithLinefeed )
{
// dump JPEG file as-is
+#if POPPLER_CHECK_VERSION(0, 17, 3)
+ str = str->getBaseStream();
+#else
str = ((DCTStream *)str)->getRawStream();
+#endif
str->reset();
int c;
@@ -489,7 +493,11 @@ void PDFOutDev::endPage()
printf("endPage\n");
}
+#if POPPLER_CHECK_VERSION(0, 17, 0)
+void PDFOutDev::processLink(AnnotLink *link, Catalog *)
+#else
void PDFOutDev::processLink(Link* link, Catalog*)
+#endif
{
assert(link);
diff --git sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
index 3ac0f49..88a60d6 100644
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -65,7 +65,10 @@ class GfxPath;
class GfxFont;
class PDFDoc;
#ifndef SYSTEM_POPPLER
+#define POPPLER_CHECK_VERSION(major,minor,micro) (0)
typedef GString GooString;
+#else
+#include <glib/poppler-features.h>
#endif
namespace pdfi
@@ -194,8 +197,12 @@ namespace pdfi
// virtual void cvtDevToUser(double dx, double dy, double *ux, double *uy);
// virtual void cvtUserToDev(double ux, double uy, int *dx, int *dy);
+ #if POPPLER_CHECK_VERSION(0, 17, 0)
+ virtual void processLink(AnnotLink *link, Catalog *catalog);
+ #else
//----- link borders
virtual void processLink(Link *link, Catalog *catalog);
+ #endif
//----- save/restore graphics state
virtual void saveState(GfxState *state);
|