diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2019-10-26 14:11:35 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-10-11 00:05:59 +0200 |
commit | aa86ebdd7793a76ba35a704fd9608bdaad347eb0 (patch) | |
tree | b1da020e25aa43e3875f296108923ca08283e118 | |
parent | 599f3108a97ccb3bb804c623519e7af782267d85 (diff) |
Fix build with poppler-0.82
Reviewed-on: https://gerrit.libreoffice.org/81545
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit 2eadd46ab81058087af95bdfc1fea28fcdb65998)
Reviewed-on: https://gerrit.libreoffice.org/83363
Reviewed-by: Rasmus Thomsen <oss@cogitri.dev>
(cherry picked from commit 928a372775a0758aa76eb10e568d5c106a8586eb)
Change-Id: I3b6b3faea7986f3e5a6ae4790580d03bc9c955fc
-rw-r--r-- | sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 25 | ||||
-rw-r--r-- | sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 14 |
2 files changed, 39 insertions, 0 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index cd6a5b65e30a..ed9ea6cc5440 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -877,11 +877,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 ) @@ -995,6 +1004,13 @@ 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, #if POPPLER_CHECK_VERSION(0, 12, 0) @@ -1002,6 +1018,7 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, #endif int* maskColors, poppler_bool /*inlineImg*/ ) { +#endif if (m_bSkipImages) return; OutputBuffer aBuf; initBuf(aBuf); @@ -1022,12 +1039,20 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, { GfxRGB aMinRGB; colorMap->getColorSpace()->getRGB( +#if POPPLER_CHECK_VERSION(0, 82, 0) + reinterpret_cast<const GfxColor*>(maskColors), +#else reinterpret_cast<GfxColor*>(maskColors), +#endif &aMinRGB ); GfxRGB aMaxRGB; colorMap->getColorSpace()->getRGB( +#if POPPLER_CHECK_VERSION(0, 82, 0) + reinterpret_cast<const GfxColor*>(maskColors)+gfxColorMaxComps, +#else reinterpret_cast<GfxColor*>(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 ced1a653a494..ccf5b8fa9535 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 @@ -250,12 +257,19 @@ namespace pdfi poppler_bool interpolate, #endif 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, + const int* maskColors, poppler_bool inlineImg) override; +#else virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, #if POPPLER_CHECK_VERSION(0, 12, 0) poppler_bool interpolate, #endif int *maskColors, poppler_bool inlineImg) override; +#endif virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, |