diff options
author | CyberLeo <cyberleo@cyberleo.net> | 2020-03-28 05:45:52 -0500 |
---|---|---|
committer | CyberLeo <cyberleo@cyberleo.net> | 2020-03-28 05:45:52 -0500 |
commit | 9297468fa579836e3a6a381b798feb6b78217c2d (patch) | |
tree | 53168212f427afbcf0693b534530a4af803152e9 /user/calligra/poppler-81.patch | |
parent | a63cc05c53a6f4c22422dc8c69808b14d87a6f6e (diff) | |
parent | da5a69b65a8791fffa6e93366ee585f87eff136d (diff) | |
download | packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.gz packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.bz2 packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.xz packages-9297468fa579836e3a6a381b798feb6b78217c2d.zip |
Merge branch 'master' into zfs
Diffstat (limited to 'user/calligra/poppler-81.patch')
-rw-r--r-- | user/calligra/poppler-81.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/user/calligra/poppler-81.patch b/user/calligra/poppler-81.patch new file mode 100644 index 000000000..3211b7b8e --- /dev/null +++ b/user/calligra/poppler-81.patch @@ -0,0 +1,70 @@ +diff --git a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt +index 8f462b7b597..945eebbe676 100644 +--- a/filters/karbon/pdf/CMakeLists.txt ++++ b/filters/karbon/pdf/CMakeLists.txt +@@ -1,4 +1,8 @@ + ++if(Poppler_VERSION VERSION_LESS "0.82.0") ++ add_definitions("-DHAVE_POPPLER_PRE_0_82") ++endif() ++ + set(pdf2svg_PART_SRCS PdfImportDebug.cpp PdfImport.cpp SvgOutputDev.cpp ) + + add_library(calligra_filter_pdf2svg MODULE ${pdf2svg_PART_SRCS}) +diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp +index 18c6fbb4a44..3ebb2281bf3 100644 +--- a/filters/karbon/pdf/SvgOutputDev.cpp ++++ b/filters/karbon/pdf/SvgOutputDev.cpp +@@ -405,7 +405,11 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) + const char * p = s->c_str(); + int len = s->getLength(); + CharCode code; ++#ifdef HAVE_POPPLER_PRE_0_82 + Unicode *u = nullptr; ++#else ++ const Unicode *u = nullptr; ++#endif + int uLen; + double dx, dy, originX, originY; + while (len > 0) { +@@ -474,9 +478,15 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) + *d->body << "</text>" << endl; + } + +-void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, ++#ifdef HAVE_POPPLER_PRE_0_82 ++ void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, ++ int width, int height, GfxImageColorMap *colorMap, ++ bool /*interpolate*/, int *maskColors, bool /*inlineImg*/) ++#else ++ void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, + int width, int height, GfxImageColorMap *colorMap, +- bool /*interpolate*/, int *maskColors, bool inlineImg) ++ bool /*interpolate*/, const int *maskColors, bool inlineImg) ++#endif + { + ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); + imgStr->reset(); +diff --git a/filters/karbon/pdf/SvgOutputDev.h b/filters/karbon/pdf/SvgOutputDev.h +index 2c161ce50af..2b0ea41e30c 100644 +--- a/filters/karbon/pdf/SvgOutputDev.h ++++ b/filters/karbon/pdf/SvgOutputDev.h +@@ -61,9 +61,17 @@ public: + void drawString(GfxState * state, const GooString * s) override; + ++#ifdef HAVE_POPPLER_PRE_0_82 ++ // images ++ void drawImage(GfxState *state, Object *ref, Stream *str, ++ int width, int height, GfxImageColorMap *colorMap, ++ bool interpolate, int *maskColors, bool inlineImg) override; ++#else + // images + void drawImage(GfxState *state, Object *ref, Stream *str, + int width, int height, GfxImageColorMap *colorMap, +- bool interpolate, int *maskColors, bool inlineImg) override; ++ bool interpolate, const int *maskColors, bool inlineImg) override; ++#endif ++ + + // styles + void updateAll(GfxState *state) override; |