From b1dcd4d14e9c700ef03d1acd967c1f3766784d69 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Mon, 23 Mar 2020 01:04:30 +0100 Subject: [PATCH] - fix building with poppler 0.83 --- libreoffice.spec | 2 ++ poppler-0.83.patch | 79 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) create mode 100644 poppler-0.83.patch diff --git a/libreoffice.spec b/libreoffice.spec index a37a960..c8004fc 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -95,6 +95,7 @@ Source28: https://dev-www.libreoffice.org/extern/884ed41809687c3e168fc7c19b16585 Patch0: disable-failing-test.patch Patch1: mdds-1.5-orcus-0.15.patch Patch2: poppler-0.82.patch +Patch3: poppler-0.83.patch URL: http://www.documentfoundation.org/ BuildRequires: /usr/bin/getopt @@ -3027,6 +3028,7 @@ dialogs. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 for dir in *-%{version}; do [ -f $dir/ChangeLog ] && mv $dir/ChangeLog ChangeLog-$dir diff --git a/poppler-0.83.patch b/poppler-0.83.patch new file mode 100644 index 0000000..e448cd8 --- /dev/null +++ b/poppler-0.83.patch @@ -0,0 +1,79 @@ +From 035830400393e075fca364a444e04c40516730b2 Mon Sep 17 00:00:00 2001 +From: Martin Milata +Date: Wed, 4 Dec 2019 02:37:40 +0100 +Subject: [PATCH] Fix build with poppler-0.83 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Change-Id: I7a3684932b8f9c403a3368b42fa4d8039c67f1a9 +Reviewed-on: https://gerrit.libreoffice.org/84384 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86905 +Reviewed-by: Tomáš Chvátal +Tested-by: Tomáš Chvátal +--- + sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 7 +++++++ + sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++++ + sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 4 ++++ + 3 files changed, 15 insertions(+) + +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +index 26048177e87d..e9c2a407c279 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -491,11 +491,18 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const + gfree(pBuf); + } + ++#if POPPLER_CHECK_VERSION(0, 83, 0) ++void PDFOutDev::printPath( const GfxPath* pPath ) ++#else + void PDFOutDev::printPath( GfxPath* pPath ) ++#endif + { + int nSubPaths = pPath ? pPath->getNumSubpaths() : 0; + for( int i=0; igetSubpath( i ); + const int nPoints = pSub->getNumPoints(); + +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +index 02f6b59f6f15..2e7d2186f9a1 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +@@ -149,7 +149,11 @@ namespace pdfi + + int parseFont( long long nNewId, GfxFont* pFont, GfxState* state ) const; + void writeFontFile( GfxFont* gfxFont ) const; ++#if POPPLER_CHECK_VERSION(0, 83, 0) ++ static void printPath( const GfxPath* pPath ); ++#else + static void printPath( GfxPath* pPath ); ++#endif + + public: + explicit PDFOutDev( PDFDoc* pDoc ); +diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +index 42178b650cdd..b1a54bd09c5f 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +@@ -68,7 +68,11 @@ int main(int argc, char **argv) + } + + // read config file ++#if POPPLER_CHECK_VERSION(0, 83, 0) ++ globalParams = std::make_unique(); ++#else + globalParams = new GlobalParams(); ++#endif + globalParams->setErrQuiet(true); + #if defined(_MSC_VER) + globalParams->setupBaseFonts(nullptr); +-- +2.24.1 + -- 2.44.0