From: Jan Rękorajski Date: Fri, 1 Nov 2019 08:18:00 +0000 (+0100) Subject: - upstream fix to build with poppler-0.82 X-Git-Tag: auto/th/libreoffice-6.3.0.4-3~1 X-Git-Url: http://git.pld-linux.org/?p=packages%2Flibreoffice.git;a=commitdiff_plain;h=62714dd - upstream fix to build with poppler-0.82 - updated BRs --- diff --git a/libreoffice.spec b/libreoffice.spec index 5e32823..aa4d68d 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -94,6 +94,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 URL: http://www.documentfoundation.org/ BuildRequires: /usr/bin/getopt @@ -215,6 +216,7 @@ BuildRequires: portaudio-devel BuildRequires: postgresql-devel BuildRequires: python3 >= 1:3.3 BuildRequires: python3-devel >= 1:3.3 +BuildRequires: python3-lxml BuildRequires: python3-modules >= 1:3.3 BuildRequires: redland-devel >= 1.0.16 BuildRequires: rpm-pythonprov @@ -3024,6 +3026,7 @@ dialogs. %setup -q -a1 -a2 -a3 %patch0 -p1 %patch1 -p1 +%patch2 -p1 for dir in *-%{version}; do [ -f $dir/ChangeLog ] && mv $dir/ChangeLog ChangeLog-$dir diff --git a/poppler-0.82.patch b/poppler-0.82.patch new file mode 100644 index 0000000..f1861a7 --- /dev/null +++ b/poppler-0.82.patch @@ -0,0 +1,121 @@ +From 2eadd46ab81058087af95bdfc1fea28fcdb65998 Mon Sep 17 00:00:00 2001 +From: Rasmus Thomsen +Date: Sat, 26 Oct 2019 14:11:35 +0200 +Subject: [PATCH] Fix build with poppler-0.82 + +Change-Id: I3b6b3faea7986f3e5a6ae4790580d03bc9c955fc +Reviewed-on: https://gerrit.libreoffice.org/81545 +Tested-by: Jenkins +Reviewed-by: Michael Stahl +--- + .../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 25 +++++++++++++++++++ + .../pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 16 +++++++++++- + 2 files changed, 40 insertions(+), 1 deletion(-) + +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +index ce32a4139c45..3ae3bdc503e0 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -863,11 +863,20 @@ void PDFOutDev::eoClip(GfxState *state) + local offset of character (zero for horizontal writing mode). not + taken into account for output pos updates. Used for vertical writing. + */ ++ ++#if POPPLER_CHECK_VERSION(0, 82, 0) ++void PDFOutDev::drawChar(GfxState *state, double x, double y, ++ double dx, double dy, ++ double originX, double originY, ++ CharCode, int /*nBytes*/, const Unicode *u, int uLen) ++{ ++#else + void PDFOutDev::drawChar(GfxState *state, double x, double y, + double dx, double dy, + double originX, double originY, + CharCode, int /*nBytes*/, Unicode *u, int uLen) + { ++#endif + assert(state); + + if( u == nullptr ) +@@ -979,11 +988,19 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str, + writeBinaryBuffer(aBuf); + } + ++#if POPPLER_CHECK_VERSION(0, 82, 0) ++void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, ++ int width, int height, GfxImageColorMap* colorMap, ++ poppler_bool /*interpolate*/, ++ const int* maskColors, poppler_bool /*inlineImg*/ ) ++{ ++#else + void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, + int width, int height, GfxImageColorMap* colorMap, + poppler_bool /*interpolate*/, + int* maskColors, poppler_bool /*inlineImg*/ ) + { ++#endif + if (m_bSkipImages) + return; + OutputBuffer aBuf; initBuf(aBuf); +@@ -1004,12 +1021,20 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, + { + GfxRGB aMinRGB; + colorMap->getColorSpace()->getRGB( ++#if POPPLER_CHECK_VERSION(0, 82, 0) ++ reinterpret_cast(maskColors), ++#else + reinterpret_cast(maskColors), ++#endif + &aMinRGB ); + + GfxRGB aMaxRGB; + colorMap->getColorSpace()->getRGB( ++#if POPPLER_CHECK_VERSION(0, 82, 0) ++ reinterpret_cast(maskColors)+gfxColorMaxComps, ++#else + reinterpret_cast(maskColors)+gfxColorMaxComps, ++#endif + &aMaxRGB ); + + aMaskBuf.push_back( colToByte(aMinRGB.r) ); +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +index 1a0c3f0caad1..02f6b59f6f15 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +@@ -232,10 +232,17 @@ namespace pdfi + virtual void eoClip(GfxState *state) override; + + //----- text drawing ++#if POPPLER_CHECK_VERSION(0, 82, 0) ++ virtual void drawChar(GfxState *state, double x, double y, ++ double dx, double dy, ++ double originX, double originY, ++ CharCode code, int nBytes, const Unicode *u, int uLen) override; ++#else + virtual void drawChar(GfxState *state, double x, double y, + double dx, double dy, + double originX, double originY, + CharCode code, int nBytes, Unicode *u, int uLen) override; ++#endif + #if POPPLER_CHECK_VERSION(0, 64, 0) + virtual void drawString(GfxState *state, const GooString *s) override; + #else +@@ -248,10 +255,17 @@ namespace pdfi + int width, int height, poppler_bool invert, + poppler_bool interpolate, + poppler_bool inlineImg) override; ++#if POPPLER_CHECK_VERSION(0, 82, 0) + virtual void drawImage(GfxState *state, Object *ref, Stream *str, + int width, int height, GfxImageColorMap *colorMap, + poppler_bool interpolate, +- int* maskColors, poppler_bool inlineImg) override; ++ const int* maskColors, poppler_bool inlineImg) override; ++#else ++ virtual void drawImage(GfxState *state, Object *ref, Stream *str, ++ int width, int height, GfxImageColorMap *colorMap, ++ poppler_bool interpolate, ++ int* maskColors, poppler_bool inlineImg) override; ++#endif + virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str, + int width, int height, + GfxImageColorMap *colorMap,