| 1 |
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
| 2 |
+++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
| 3 |
@@ -150,7 +150,11 @@ void writeBinaryBuffer( const OutputBuffer& rBuffer )
|
| 4 |
void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* str, bool bWithLinefeed )
|
| 5 |
{
|
| 6 |
// dump JPEG file as-is
|
| 7 |
+#if POPPLER_CHECK_VERSION(0, 17, 3)
|
| 8 |
+ str = str->getBaseStream();
|
| 9 |
+#else
|
| 10 |
str = ((DCTStream *)str)->getRawStream();
|
| 11 |
+#endif
|
| 12 |
str->reset();
|
| 13 |
|
| 14 |
int c;
|
| 15 |
@@ -489,7 +493,11 @@ void PDFOutDev::endPage()
|
| 16 |
printf("endPage\n");
|
| 17 |
}
|
| 18 |
|
| 19 |
+#if POPPLER_CHECK_VERSION(0, 17, 0)
|
| 20 |
+void PDFOutDev::processLink(AnnotLink *link, Catalog *)
|
| 21 |
+#else
|
| 22 |
void PDFOutDev::processLink(Link* link, Catalog*)
|
| 23 |
+#endif
|
| 24 |
{
|
| 25 |
assert(link);
|
| 26 |
|
| 27 |
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
| 28 |
+++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
| 29 |
@@ -65,7 +65,10 @@ class GfxPath;
|
| 30 |
class GfxFont;
|
| 31 |
class PDFDoc;
|
| 32 |
#ifndef SYSTEM_POPPLER
|
| 33 |
+#define POPPLER_CHECK_VERSION(major,minor,micro) (0)
|
| 34 |
typedef GString GooString;
|
| 35 |
+#else
|
| 36 |
+#include <glib/poppler-features.h>
|
| 37 |
#endif
|
| 38 |
|
| 39 |
namespace pdfi
|
| 40 |
@@ -194,8 +197,12 @@ namespace pdfi
|
| 41 |
// virtual void cvtDevToUser(double dx, double dy, double *ux, double *uy);
|
| 42 |
// virtual void cvtUserToDev(double ux, double uy, int *dx, int *dy);
|
| 43 |
|
| 44 |
+ #if POPPLER_CHECK_VERSION(0, 17, 0)
|
| 45 |
+ virtual void processLink(AnnotLink *link, Catalog *catalog);
|
| 46 |
+ #else
|
| 47 |
//----- link borders
|
| 48 |
virtual void processLink(Link *link, Catalog *catalog);
|
| 49 |
+ #endif
|
| 50 |
|
| 51 |
//----- save/restore graphics state
|
| 52 |
virtual void saveState(GfxState *state);
|