download.lst | 4 external/poppler/poppler-config.patch.1 | 221 +++--------------- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 15 - sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx | 25 +- 4 files changed, 81 insertions(+), 184 deletions(-)
New commits: commit d32948512dd8d403b2a4af4537b10e37dfffaec5 Author: Xisco Fauli <[email protected]> AuthorDate: Wed Jan 7 14:06:55 2026 +0100 Commit: Christian Lohmaier <[email protected]> CommitDate: Wed Jan 14 23:46:08 2026 +0100 poppler: upgrade to 26.01.0 Adapt external/poppler/poppler-config.patch.1 after commit 808094b11c07b1895bc9a1d03e338584045e6087 Author: Albert Astals Cid <[email protected]> Date: Fri Dec 5 01:59:41 2025 +0100 cmakedefine -> cmakedefine01 Downloaded from https://poppler.freedesktop.org/poppler-26.01.0.tar.xz Change-Id: I8cf88d535e6fbd85fa0761fa23ac790c01711e01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196684 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> (cherry picked from commit b307d254a88a87fe59f9c041346657790c75ac16) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196883 Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/download.lst b/download.lst index b110bbc8fcc4..a97e795c4506 100644 --- a/download.lst +++ b/download.lst @@ -599,8 +599,8 @@ LIBTIFF_TARBALL := tiff-4.7.1.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -POPPLER_SHA256SUM := c18b40eb36b1a0c5b86e29ca054bf0770304583da4f2cdd42fe86eca6a20de48 -POPPLER_TARBALL := poppler-25.12.0.tar.xz +POPPLER_SHA256SUM := 1cb944a4b88847f5fb6551683bc799db59f04990f5d8be07aba2acbf38601089 +POPPLER_TARBALL := poppler-26.01.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 78f1c4fe2f72..edf04d4af2ef 100644 --- a/external/poppler/poppler-config.patch.1 +++ b/external/poppler/poppler-config.patch.1 @@ -2,7 +2,7 @@ note: to get the 3rd one, use -DENABLE_CPP=on -(cd workdir/UnpackedTarball/poppler && cmake -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_LCMS=off -DENABLE_LIBCURL=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_NSS3=off -DENABLE_GPGME=off -DENABLE_PGP_SIGNATURES=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_BOOST=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off -DENABLE_QT6=off +(cd workdir/UnpackedTarball/poppler && cmake -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_LCMS=off -DENABLE_LIBCURL=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_NSS3=off -DENABLE_GPGME=off -DENABLE_PGP_SIGNATURES=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_BOOST=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off -DENABLE_QT6=off) manually disabled these because cmake failed to do it: HAVE_CAIRO @@ -13,41 +13,41 @@ new file mode 100644 index 0fbd336a..451213f8 100644 --- /dev/null +++ b/config.h -@@ -0,0 +1,232 @@ +@@ -0,0 +1,170 @@ +/* config.h. Generated from config.h.cmake by cmake. */ + +/* Build against libcurl. */ -+/* #undef ENABLE_LIBCURL */ ++#define ENABLE_LIBCURL 0 + +/* Use libjpeg instead of builtin jpeg decoder. */ +#define ENABLE_LIBJPEG 1 + +/* Use libopenjpeg instead of builtin jpeg2000 decoder. */ -+/* #undef ENABLE_LIBOPENJPEG */ ++#define ENABLE_LIBOPENJPEG 0 + +/* Build against libtiff. */ -+/* #undef ENABLE_LIBTIFF */ ++#define ENABLE_LIBTIFF 0 + +/* Build against libpng. */ -+/* #define ENABLE_LIBPNG 1 */ ++#define ENABLE_LIBPNG 0 + +/* Do not hardcode the library location */ -+/* #undef ENABLE_RELOCATABLE */ ++#define ENABLE_RELOCATABLE 0 + +/* Use zlib instead of builtin zlib decoder to uncompress flate streams. */ -+/* #undef ENABLE_ZLIB_UNCOMPRESS */ ++#define ENABLE_ZLIB_UNCOMPRESS 0 + +/* Build against libnss3 for digital signature validation */ -+/* #undef ENABLE_NSS3 */ ++#define ENABLE_NSS3 0 + +/* Build against libgpgme for digital signature validation */ -+/* #undef ENABLE_GPGME */ ++#define ENABLE_GPGME 0 + +/* Enable pgp signatures in GPG backend by default */ -+/* #undef ENABLE_PGP_SIGNATURES */ ++#define ENABLE_PGP_SIGNATURES 0 + +/* Signatures enabled */ -+/* #undef ENABLE_SIGNATURES */ ++#define ENABLE_SIGNATURES 0 + +/* Default signature backend */ +#define DEFAULT_SIGNATURE_BACKEND "None" @@ -59,33 +59,16 @@ index 0fbd336a..451213f8 100644 +#define HAVE_DCT_DECODER 1 + +/* Do we have any JPX decoder?. */ -+/* #undef HAVE_JPX_DECODER */ -+ -+#if !defined(_WIN32) -+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. -+ */ -+#define HAVE_DIRENT_H 1 -+#endif -+ -+#if !defined(_WIN32) -+/* Define to 1 if you have the <dlfcn.h> header file. */ -+#define HAVE_DLFCN_H 1 -+#endif -+ -+/* Define to 1 if you have the <fcntl.h> header file. */ -+#define HAVE_FCNTL_H 1 ++#define HAVE_JPX_DECODER 0 + +/* Define to 1 if you have the `fseek64' function. */ -+/* #undef HAVE_FSEEK64 */ ++#define HAVE_FSEEK64 0 + +#if !defined(_WIN32) +/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ +#define HAVE_FSEEKO 1 +#endif + -+/* Define to 1 if you have the `ftell64' function. */ -+/* #undef HAVE_FTELL64 */ -+ +#if !defined(__APPLE__) && !defined(_WIN32) +/* Define to 1 if you have the `pread64' function. */ +#define HAVE_PREAD64 1 @@ -97,11 +80,6 @@ index 0fbd336a..451213f8 100644 +#endif + +#if !defined(_WIN32) -+/* Defines if gettimeofday is available on your system */ -+#define HAVE_GETTIMEOFDAY 1 -+#endif -+ -+#if !defined(_WIN32) +/* Defines if gmtime_r is available on your system */ +#define HAVE_GMTIME_R 1 +#endif @@ -111,64 +89,27 @@ index 0fbd336a..451213f8 100644 +#define HAVE_TIMEGM 1 +#endif + -+/* Define to 1 if you have the `z' library (-lz). */ -+/* #undef HAVE_LIBZ */ -+ +#if !defined(_WIN32) +/* Defines if localtime_r is available on your system */ +#define HAVE_LOCALTIME_R 1 +#endif + +#if !defined(_WIN32) -+/* Define to 1 if you have the `mkstemp' function. */ -+#define HAVE_MKSTEMP 1 -+#endif -+ -+#if !defined(_WIN32) +/* Defines if strtok_r is available on your system */ +#define HAVE_STRTOK_R 1 +#endif + -+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ -+/* #undef HAVE_NDIR_H */ -+ +#if !defined(_WIN32) +/* Define to 1 if you have the `popen' function. */ +#define HAVE_POPEN 1 +#endif + -+#if !defined(__APPLE__) && !defined(_WIN32) -+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. -+ */ -+#define HAVE_SYS_DIR_H 1 -+#endif -+ -+#if !defined(__APPLE__) && !defined(_WIN32) -+/* Define to 1 if you have the <sys/mman.h> header file. */ -+#define HAVE_SYS_MMAN_H 1 -+#endif -+ -+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. -+ */ -+/* #undef HAVE_SYS_NDIR_H */ -+ -+/* Define to 1 if you have the <sys/stat.h> header file. */ -+#define HAVE_SYS_STAT_H 1 -+ -+#if !defined(_WIN32) -+/* Define to 1 if you have the <unistd.h> header file. */ -+#define HAVE_UNISTD_H 1 -+#endif -+ +/* Define to 1 if you have a big endian machine */ -+/* #undef WORDS_BIGENDIAN */ ++#define WORDS_BIGENDIAN 0 + +/* Define as const if the declaration of iconv() needs const. */ +#define ICONV_CONST + -+/* Generate OPI comments in PS output. */ -+#define OPI_SUPPORT 1 -+ +/* Name of package */ +#define PACKAGE "poppler" + @@ -179,7 +120,7 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_NAME "poppler" + +/* Define to the full name and version of this package. */ -+#define PACKAGE_STRING "poppler 25.12.0" ++#define PACKAGE_STRING "poppler 26.01.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "poppler" @@ -188,25 +129,22 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_URL "" + +/* Define to the version of this package. */ -+#define PACKAGE_VERSION "25.12.0" ++#define PACKAGE_VERSION "26.01.0" + +/* Poppler data dir */ +#define POPPLER_DATADIR "/usr/local/share/poppler" + +/* Support for curl based doc builder is compiled in. */ -+/* #undef POPPLER_HAS_CURL_SUPPORT */ -+ -+/* Enable word list support. */ -+#define TEXTOUT_WORD_LIST 1 ++#define POPPLER_HAS_CURL_SUPPORT 0 + +/* Defines if use cms */ -+/* #undef USE_CMS */ ++#define USE_CMS 0 + +/* Use single precision arithmetic in the Splash backend */ -+/* #undef USE_FLOAT */ ++#define USE_FLOAT 0 + +/* Version number of package */ -+#define VERSION "25.12.0" ++#define VERSION "26.01.0" + +#if defined(__APPLE__) +#elif defined (_WIN32) @@ -221,7 +159,7 @@ index 0fbd336a..451213f8 100644 +#endif + +/* OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag */ -+/* #undef WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG */ ++#define WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG 0 + +/* MS defined snprintf as deprecated but then added it in Visual Studio 2015. */ +#if defined(_MSC_VER) && _MSC_VER < 1900 @@ -239,7 +177,7 @@ index 0fbd336a..451213f8 100644 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ -+/* #undef _FILE_OFFSET_BITS */ ++#define _FILE_OFFSET_BITS 0 + +/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ +/* TODO This is wrong, port if needed #undef _LARGEFILE_SOURCE */ @@ -251,7 +189,7 @@ new file mode 100644 index 0fbd336a..451213f8 100644 --- /dev/null +++ b/poppler/poppler-config.h -@@ -0,0 +1,156 @@ +@@ -0,0 +1,91 @@ +//================================================= -*- mode: c++ -*- ==== +// +// poppler-config.h @@ -273,7 +211,7 @@ index 0fbd336a..451213f8 100644 +// Copyright (C) 2017 Adrian Johnson <[email protected]> +// Copyright (C) 2018 Adam Reichold <[email protected]> +// Copyright (C) 2018 Stefan BrĂ¼ns <[email protected]> -+// Copyright (C) 2020 Albert Astals Cid <[email protected]> ++// Copyright (C) 2020, 2025 Albert Astals Cid <[email protected]> +// +// To see a description of the changes please see the Changelog file that +// came with your tarball or type make ChangeLog if you are building from git @@ -283,101 +221,39 @@ index 0fbd336a..451213f8 100644 +#ifndef POPPLER_CONFIG_H +#define POPPLER_CONFIG_H + -+// We duplicate some of the config.h #define's here since they are -+// used in some of the header files we install. The #ifndef/#endif -+// around #undef look odd, but it's to silence warnings about -+// redefining those symbols. -+ +/* Defines the poppler version. */ -+#ifndef POPPLER_VERSION -+#define POPPLER_VERSION "25.12.0" -+#endif ++#define POPPLER_VERSION "26.01.0" + +/* Use single precision arithmetic in the Splash backend */ -+#ifndef USE_FLOAT -+/* #undef USE_FLOAT */ -+#endif -+ -+/* Include support for OPI comments. */ -+#ifndef OPI_SUPPORT -+#define OPI_SUPPORT 1 -+#endif -+ -+/* Enable word list support. */ -+#ifndef TEXTOUT_WORD_LIST -+#define TEXTOUT_WORD_LIST 1 -+#endif ++#define USE_FLOAT 0 + +/* Support for curl is compiled in. */ -+#ifndef POPPLER_HAS_CURL_SUPPORT -+/* #undef POPPLER_HAS_CURL_SUPPORT */ -+#endif ++#define POPPLER_HAS_CURL_SUPPORT 0 + +/* Use libjpeg instead of builtin jpeg decoder. */ -+#ifndef ENABLE_LIBJPEG +#define ENABLE_LIBJPEG 1 -+#endif + +/* Build against libtiff. */ -+#ifndef ENABLE_LIBTIFF -+/* #undef ENABLE_LIBTIFF */ -+#endif ++#define ENABLE_LIBTIFF 0 + +/* Build against libpng. */ -+#ifndef ENABLE_LIBPNG -+/* #define ENABLE_LIBPNG 1 */ -+#endif -+ -+/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. -+ */ -+#ifndef HAVE_DIRENT_H -+#if !defined(_WIN32) -+#define HAVE_DIRENT_H 1 -+#endif -+#endif -+ -+/* Defines if gettimeofday is available on your system */ -+#ifndef HAVE_GETTIMEOFDAY -+#if !defined(_WIN32) -+#define HAVE_GETTIMEOFDAY 1 -+#endif -+#endif -+ -+/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */ -+#ifndef HAVE_NDIR_H -+/* #undef HAVE_NDIR_H */ -+#endif ++#define ENABLE_LIBPNG 0 + -+/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'. -+ */ -+#ifndef HAVE_SYS_DIR_H -+#if !defined(__APPLE__) && !defined(_WIN32) -+#define HAVE_SYS_DIR_H 1 -+#endif -+#endif -+ -+/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'. -+ */ -+#ifndef HAVE_SYS_NDIR_H -+/* #undef HAVE_SYS_NDIR_H */ -+#endif ++/* Use zlib instead of builtin zlib decoder to uncompress flate streams. */ ++#define ENABLE_ZLIB_UNCOMPRESS 0 + +/* Defines if use cms */ -+#ifndef USE_CMS -+/* #undef USE_CMS */ -+#endif ++#define USE_CMS 0 + +/* Use header-only classes from Boost in the Splash backend */ -+#ifndef USE_BOOST_HEADERS -+/* #undef USE_BOOST_HEADERS */ -+#endif ++#define USE_BOOST_HEADERS 0 + +//------------------------------------------------------------------------ +// version +//------------------------------------------------------------------------ + +// copyright notice -+#define popplerCopyright "Copyright 2005-2025 The Poppler Developers - http://poppler.freedesktop.org" ++#define popplerCopyright "Copyright 2005-2026 The Poppler Developers - http://poppler.freedesktop.org" +#define xpdfCopyright "Copyright 1996-2011, 2022 Glyph & Cog, LLC" + +//------------------------------------------------------------------------ @@ -385,26 +261,23 @@ index 0fbd336a..451213f8 100644 +//------------------------------------------------------------------------ + +#if defined(_WIN32) && !defined(_MSC_VER) -+#include <windef.h> ++# include <windef.h> +#else -+#define CDECL ++# define CDECL +#endif + +//------------------------------------------------------------------------ +// Compiler +//------------------------------------------------------------------------ + -+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) -+#include <cstdio> // __MINGW_PRINTF_FORMAT is defined in the mingw stdio.h -+#ifdef __MINGW_PRINTF_FORMAT -+#define GCC_PRINTF_FORMAT(fmt_index, va_index) \ -+ __attribute__((__format__(__MINGW_PRINTF_FORMAT, fmt_index, va_index))) -+#else -+#define GCC_PRINTF_FORMAT(fmt_index, va_index) \ -+ __attribute__((__format__(__printf__, fmt_index, va_index))) -+#endif ++#ifdef __GNUC__ ++# ifdef __MINGW32__ ++# define GCC_PRINTF_FORMAT(fmt_index, va_index) __attribute__((__format__(gnu_printf, fmt_index, va_index))) ++# else ++# define GCC_PRINTF_FORMAT(fmt_index, va_index) __attribute__((__format__(printf, fmt_index, va_index))) ++# endif +#else -+#define GCC_PRINTF_FORMAT(fmt_index, va_index) ++# define GCC_PRINTF_FORMAT(fmt_index, va_index) +#endif + +#endif /* POPPLER_CONFIG_H */ @@ -437,9 +310,9 @@ index 0fbd336a..451213f8 100644 + +#include "poppler-global.h" + -+#define POPPLER_VERSION "25.12.0" -+#define POPPLER_VERSION_MAJOR 25 -+#define POPPLER_VERSION_MINOR 12 ++#define POPPLER_VERSION "26.01.0" ++#define POPPLER_VERSION_MAJOR 26 ++#define POPPLER_VERSION_MINOR 01 +#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 a3b34db15464..6b9184809803 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -231,7 +231,10 @@ static void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* str ) #else str = ((DCTStream *)str)->getRawStream(); #endif -#if POPPLER_CHECK_VERSION(25, 2, 0) +#if POPPLER_CHECK_VERSION(26, 1, 0) + if (!str->rewind()) + return; +#elif POPPLER_CHECK_VERSION(25, 2, 0) if (!str->reset()) return; #else @@ -272,7 +275,10 @@ 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 POPPLER_CHECK_VERSION(26, 1, 0) + if (!str->rewind()) + return; +#elif POPPLER_CHECK_VERSION(25, 2, 0) if (!str->reset()) return; #else @@ -334,7 +340,10 @@ static void writePpm_( OutputBuffer& o_rOutputBuf, width, colorMap->getNumPixelComps(), colorMap->getBits())); -#if POPPLER_CHECK_VERSION(25, 2, 0) +#if POPPLER_CHECK_VERSION(26, 1, 0) + if (!imgStr->rewind()) + return; +#elif POPPLER_CHECK_VERSION(25, 2, 0) if (!imgStr->reset()) return; #else diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx index e21d9192f563..6e9784d4aa6b 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx @@ -214,7 +214,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, int nLineSize = (width + 7)/8; aScanlines.reserve( nLineSize * height + height ); -#if POPPLER_CHECK_VERSION(25, 2, 0) +#if POPPLER_CHECK_VERSION(26, 1, 0) + if (!str->rewind()) + return; +#elif POPPLER_CHECK_VERSION(25, 2, 0) if (!str->reset()) return; #else @@ -257,7 +260,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, width, colorMap->getNumPixelComps(), colorMap->getBits())); -#if POPPLER_CHECK_VERSION(25, 2, 0) +#if POPPLER_CHECK_VERSION(26, 1, 0) + if (!imgStr->rewind()) + return; +#elif POPPLER_CHECK_VERSION(25, 2, 0) if (!imgStr->reset()) return; #else @@ -299,7 +305,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, maskColorMap->getNumPixelComps(), maskColorMap->getBits())); -#if POPPLER_CHECK_VERSION(25, 2, 0) +#if POPPLER_CHECK_VERSION(26, 1, 0) + if (!imgStrMask->rewind()) + return; +#elif POPPLER_CHECK_VERSION(25, 2, 0) if (!imgStrMask->reset()) return; #else @@ -353,7 +362,10 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, width, colorMap->getNumPixelComps(), colorMap->getBits())); -#if POPPLER_CHECK_VERSION(25, 2, 0) +#if POPPLER_CHECK_VERSION(26, 1, 0) + if (!imgStr->rewind()) + return; +#elif POPPLER_CHECK_VERSION(25, 2, 0) if (!imgStr->reset()) return; #else @@ -392,7 +404,10 @@ 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 POPPLER_CHECK_VERSION(26, 1, 0) + if (!imgStrMask->rewind()) + return; +#elif POPPLER_CHECK_VERSION(25, 2, 0) if (!imgStrMask->reset()) return; #else
