Added
Link Here
|
1 |
From 9065cd8d9a19864f6b618f2dc10daf577badd9ee Mon Sep 17 00:00:00 2001 |
2 |
From: Martin Milata <martin@martinmilata.cz> |
3 |
Date: Wed, 4 Dec 2019 02:37:40 +0100 |
4 |
Subject: [PATCH] Fix build with poppler-0.83 |
5 |
|
6 |
Change-Id: I7a3684932b8f9c403a3368b42fa4d8039c67f1a9 |
7 |
Reviewed-on: https://gerrit.libreoffice.org/84384 |
8 |
Tested-by: Jenkins |
9 |
Reviewed-by: Michael Stahl <michael.stahl@cib.de> |
10 |
--- |
11 |
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 7 +++++++ |
12 |
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++++ |
13 |
sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 4 ++++ |
14 |
3 files changed, 15 insertions(+) |
15 |
|
16 |
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |
17 |
index 26048177e87d..e9c2a407c279 100644 |
18 |
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |
19 |
+++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |
20 |
@@ -491,11 +491,18 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const |
21 |
gfree(pBuf); |
22 |
} |
23 |
|
24 |
+#if POPPLER_CHECK_VERSION(0, 83, 0) |
25 |
+void PDFOutDev::printPath( const GfxPath* pPath ) |
26 |
+#else |
27 |
void PDFOutDev::printPath( GfxPath* pPath ) |
28 |
+#endif |
29 |
{ |
30 |
int nSubPaths = pPath ? pPath->getNumSubpaths() : 0; |
31 |
for( int i=0; i<nSubPaths; i++ ) |
32 |
{ |
33 |
+#if POPPLER_CHECK_VERSION(0, 83, 0) |
34 |
+ const |
35 |
+#endif |
36 |
GfxSubpath* pSub = pPath->getSubpath( i ); |
37 |
const int nPoints = pSub->getNumPoints(); |
38 |
|
39 |
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |
40 |
index 02f6b59f6f15..2e7d2186f9a1 100644 |
41 |
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |
42 |
+++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |
43 |
@@ -149,7 +149,11 @@ namespace pdfi |
44 |
|
45 |
int parseFont( long long nNewId, GfxFont* pFont, GfxState* state ) const; |
46 |
void writeFontFile( GfxFont* gfxFont ) const; |
47 |
+#if POPPLER_CHECK_VERSION(0, 83, 0) |
48 |
+ static void printPath( const GfxPath* pPath ); |
49 |
+#else |
50 |
static void printPath( GfxPath* pPath ); |
51 |
+#endif |
52 |
|
53 |
public: |
54 |
explicit PDFOutDev( PDFDoc* pDoc ); |
55 |
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx |
56 |
index 42178b650cdd..b1a54bd09c5f 100644 |
57 |
--- sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx |
58 |
+++ sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx |
59 |
@@ -68,7 +68,11 @@ int main(int argc, char **argv) |
60 |
} |
61 |
|
62 |
// read config file |
63 |
+#if POPPLER_CHECK_VERSION(0, 83, 0) |
64 |
+ globalParams = std::make_unique<GlobalParams>(); |
65 |
+#else |
66 |
globalParams = new GlobalParams(); |
67 |
+#endif |
68 |
globalParams->setErrQuiet(true); |
69 |
#if defined(_MSC_VER) |
70 |
globalParams->setupBaseFonts(nullptr); |