download.lst | 4 +-- external/poppler/poppler-config.patch.1 | 14 ++++++------ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 20 ++++++++++++++++++ sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx | 20 ++++++++++++++++++ 4 files changed, 49 insertions(+), 9 deletions(-)
New commits: commit dd67bacd021916952008ac15955628f2dc9ad1c2 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Tue Jun 17 10:41:25 2025 +0200 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Fri Jun 27 13:01:44 2025 +0200 tdf#167010: fix build when poppler is older than 25.2.0 After commit 4f13305178c1bf88dffceb42ec15d0944b808a5c Author: Xisco Fauli <xiscofa...@libreoffice.org> Date: Wed Apr 2 16:27:00 2025 +0200 poppler: upgrade to 25.04.0 and the upstream commit commit 5d71c95d08aa0e097f711254e1c69ee0cf275328 Author: Nelson Benítez León <nbenit...@gmail.com> Date: Sun Jan 5 21:33:23 2025 +0000 Detect malformed Streams in Annot Appearances Change-Id: Id308aac0331a77aca88ebf8e31bf3aa0a688533a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186599 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 04b92e6eab3d58e90efa04165dec4f04e9131690) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186639 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index 604ba3b7db2c..f4b03f067827 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -231,8 +231,12 @@ static void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* str ) #else str = ((DCTStream *)str)->getRawStream(); #endif +#if POPPLER_CHECK_VERSION(25, 2, 0) if (!str->reset()) return; +#else + str->reset(); +#endif o_rOutputBuf.clear(); ExtractJpegData(str, o_rOutputBuf); @@ -268,8 +272,12 @@ static void writePbm_(OutputBuffer& o_rOutputBuf, Stream* str, int width, int he o_rOutputBuf.resize(header_size); // initialize stream +#if POPPLER_CHECK_VERSION(25, 2, 0) if (!str->reset()) return; +#else + str->reset(); +#endif // copy the raw stream if( bInvert ) @@ -326,8 +334,12 @@ static void writePpm_( OutputBuffer& o_rOutputBuf, width, colorMap->getNumPixelComps(), colorMap->getBits())); +#if POPPLER_CHECK_VERSION(25, 2, 0) if (!imgStr->reset()) return; +#else + imgStr->reset(); +#endif for( int y=0; y<height; ++y) { diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx index c0547e761e59..e21d9192f563 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx @@ -214,8 +214,12 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, int nLineSize = (width + 7)/8; aScanlines.reserve( nLineSize * height + height ); +#if POPPLER_CHECK_VERSION(25, 2, 0) if (!str->reset()) return; +#else + str->reset(); +#endif for( int y = 0; y < height; y++ ) { // determine filter type (none) for this scanline @@ -253,8 +257,12 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, width, colorMap->getNumPixelComps(), colorMap->getBits())); +#if POPPLER_CHECK_VERSION(25, 2, 0) if (!imgStr->reset()) return; +#else + imgStr->reset(); +#endif // create scan line data buffer OutputBuffer aScanlines; @@ -291,8 +299,12 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, maskColorMap->getNumPixelComps(), maskColorMap->getBits())); +#if POPPLER_CHECK_VERSION(25, 2, 0) if (!imgStrMask->reset()) return; +#else + imgStrMask->reset(); +#endif for( int y = 0; y < maskHeight; ++y ) { @@ -341,8 +353,12 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, width, colorMap->getNumPixelComps(), colorMap->getBits())); +#if POPPLER_CHECK_VERSION(25, 2, 0) if (!imgStr->reset()) return; +#else + imgStr->reset(); +#endif // create scan line data buffer OutputBuffer aScanlines; @@ -376,8 +392,12 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, std::unique_ptr<ImageStream> imgStrMask( new ImageStream(maskStr, maskWidth, 1, 1)); +#if POPPLER_CHECK_VERSION(25, 2, 0) if (!imgStrMask->reset()) return; +#else + imgStrMask->reset(); +#endif for( int y = 0; y < maskHeight; ++y ) { commit 365c078c76440d2ef21cfe2f9be588c08506a2b2 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Mon May 5 10:03:10 2025 +0200 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Fri Jun 27 13:01:37 2025 +0200 poppler: uggrade to 25.05 Downloaded from https://poppler.freedesktop.org/poppler-25.05.0.tar.xz Change-Id: Icd2b318cc01bedc5baeb4445a463a136ed6d7c48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184953 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofa...@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186651 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/download.lst b/download.lst index c431f72a7d10..649b9f604b14 100644 --- a/download.lst +++ b/download.lst @@ -578,8 +578,8 @@ LIBTIFF_TARBALL := tiff-4.7.0.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -POPPLER_SHA256SUM := b010c596dce127fba88532fd2f1043e55ea30601767952d0f2c0a80e7dc0da3d -POPPLER_TARBALL := poppler-25.04.0.tar.xz +POPPLER_SHA256SUM := 9b1627c5b76816ac5e4052a03f5b605ba40b45cf06b02cadd0479620b499ab38 +POPPLER_TARBALL := poppler-25.05.0.tar.xz POPPLER_DATA_SHA256SUM := c835b640a40ce357e1b83666aabd95edffa24ddddd49b8daff63adb851cdab74 POPPLER_DATA_TARBALL := poppler-data-0.4.12.tar.gz # three static lines diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1 index ff1af699add4..573c23ab284f 100644 --- a/external/poppler/poppler-config.patch.1 +++ b/external/poppler/poppler-config.patch.1 @@ -164,7 +164,7 @@ index 0fbd336a..451213f8 100644 +/* #undef WORDS_BIGENDIAN */ + +/* Define as const if the declaration of iconv() needs const. */ -+#define ICONV_CONST ++#define ICONV_CONST + +/* Generate OPI comments in PS output. */ +#define OPI_SUPPORT 1 @@ -179,7 +179,7 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_NAME "poppler" + +/* Define to the full name and version of this package. */ -+#define PACKAGE_STRING "poppler 25.01.0" ++#define PACKAGE_STRING "poppler 25.05.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "poppler" @@ -188,7 +188,7 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_URL "" + +/* Define to the version of this package. */ -+#define PACKAGE_VERSION "25.01.0" ++#define PACKAGE_VERSION "25.05.0" + +/* Poppler data dir */ +#define POPPLER_DATADIR "/usr/local/share/poppler" @@ -206,7 +206,7 @@ index 0fbd336a..451213f8 100644 +/* #undef USE_FLOAT */ + +/* Version number of package */ -+#define VERSION "25.01.0" ++#define VERSION "25.05.0" + +#if defined(__APPLE__) +#elif defined (_WIN32) @@ -290,7 +290,7 @@ index 0fbd336a..451213f8 100644 + +/* Defines the poppler version. */ +#ifndef POPPLER_VERSION -+#define POPPLER_VERSION "25.01.0" ++#define POPPLER_VERSION "25.05.0" +#endif + +/* Use single precision arithmetic in the Splash backend */ @@ -437,9 +437,9 @@ index 0fbd336a..451213f8 100644 + +#include "poppler-global.h" + -+#define POPPLER_VERSION "25.01.0" ++#define POPPLER_VERSION "25.05.0" +#define POPPLER_VERSION_MAJOR 25 -+#define POPPLER_VERSION_MINOR 1 ++#define POPPLER_VERSION_MINOR 5 +#define POPPLER_VERSION_MICRO 0 + +namespace poppler diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx index dcc1932f7ad7..604ba3b7db2c 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -1320,11 +1320,19 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState *state, Gfx *, Catalog *, } } +#if POPPLER_CHECK_VERSION(25, 5, 0) + std::unique_ptr<MemStream> pRgbStr(new MemStream(pBitmapData, 0, + nBitmapWidth * nBitmapHeight * 3, Object::null())); + std::unique_ptr<MemStream> pAlphaStr(new MemStream(reinterpret_cast<char *>(pSplashBitmap->getAlphaPtr()), + 0, nBitmapWidth * nBitmapHeight, Object::null())); + auto aDecode = Object::null(); +#else std::unique_ptr<MemStream> pRgbStr(new MemStream(pBitmapData, 0, nBitmapWidth * nBitmapHeight * 3, Object(objNull))); std::unique_ptr<MemStream> pAlphaStr(new MemStream(reinterpret_cast<char *>(pSplashBitmap->getAlphaPtr()), 0, nBitmapWidth * nBitmapHeight, Object(objNull))); auto aDecode = Object(objNull); +#endif #if POPPLER_CHECK_VERSION(24, 10, 0) std::unique_ptr<GfxImageColorMap> pRgbIdentityColorMap(new GfxImageColorMap(8, &aDecode, std::make_unique<GfxDeviceRGBColorSpace>()));