download.lst | 4 - external/poppler/UnpackedTarball_poppler.mk | 1 external/poppler/disable-freetype.patch.1 | 40 +++++++++--------- external/poppler/missinginclude.patch | 40 ------------------ external/poppler/poppler-config.patch.1 | 12 ++--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 22 +++++++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 21 +++++++++ 7 files changed, 69 insertions(+), 71 deletions(-)
New commits: commit 3c29b709cd2b5b18776b3c15638b66bd8a7dcb07 Author: Xisco Fauli <[email protected]> AuthorDate: Fri Feb 6 00:53:12 2026 +0100 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Feb 6 17:21:15 2026 +0100 poppler: upgrade to 26.02.0 * external/poppler/missinginclude.patch has been fixed upstream Downloaded from https://poppler.freedesktop.org/poppler-26.02.0.tar.x Change-Id: I7641b7b544e853a86563dbe312af4b36444dea8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198803 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> diff --git a/download.lst b/download.lst index c4d8a03a37e3..4bdba861104e 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 := 1cb944a4b88847f5fb6551683bc799db59f04990f5d8be07aba2acbf38601089 -POPPLER_TARBALL := poppler-26.01.0.tar.xz +POPPLER_SHA256SUM := dded8621f7b2f695c91063aab1558691c8418374cd583501e89ed39487e7ab77 +POPPLER_TARBALL := poppler-26.02.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/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk index 5cbc8e4bceb2..42b6e479c7a8 100644 --- a/external/poppler/UnpackedTarball_poppler.mk +++ b/external/poppler/UnpackedTarball_poppler.mk @@ -16,7 +16,6 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,poppler,0)) $(eval $(call gb_UnpackedTarball_add_patches,poppler,\ external/poppler/disable-freetype.patch.1 \ external/poppler/poppler-config.patch.1 \ - external/poppler/missinginclude.patch \ )) ifneq ($(filter -fsanitize=%,$(CC)),) diff --git a/external/poppler/disable-freetype.patch.1 b/external/poppler/disable-freetype.patch.1 index 98e00cd4b406..49a76ec41426 100644 --- a/external/poppler/disable-freetype.patch.1 +++ b/external/poppler/disable-freetype.patch.1 @@ -32,25 +32,25 @@ disable freetype dependent code if (!filepath.ends_with(".ttf") && !filepath.ends_with(".ttc") && !filepath.ends_with(".otf")) { error(errIO, -1, "We only support embedding ttf/ttc/otf fonts for now. The font file for {0:s} {1:s} was {2:s}", fontFamily.c_str(), fontStyle.c_str(), filepath.c_str()); return {}; -@@ -2994,6 +2996,7 @@ +@@ -2974,6 +2974,7 @@ } - return { dictFontName, fontDictRef }; + return { .fontName = dictFontName, .ref = fontDictRef }; +#endif } std::string Form::getFallbackFontForChar(Unicode uChar, const GfxFont &fontToEmulate) const --- poppler/splash/SplashFontEngine.cc.orig 2024-02-21 01:28:10.479645185 +0000 +++ popller/splash/SplashFontEngine.cc 2023-09-05 22:15:14.000000000 +0100 -@@ -66,7 +66,7 @@ +@@ -59,8 +59,6 @@ + for (auto *font : fontCache) { delete font; } - +- - delete ftEngine; -+ //delete ftEngine; } - SplashFontFile *SplashFontEngine::getFontFile(const SplashFontFileID &id) + std::shared_ptr<SplashFontFile> SplashFontEngine::getFontFile(const SplashFontFileID &id) --- poppler/splash/SplashFTFontEngine.h.orig 2023-09-05 22:15:14.000000000 +0100 +++ poppler/splash/SplashFTFontEngine.h 2024-02-21 13:53:29.715423742 +0000 @@ -27,8 +27,6 @@ @@ -71,23 +71,23 @@ disable freetype dependent code ~SplashFTFontEngine(); -@@ -51,22 +49,20 @@ +@@ -49,22 +49,20 @@ SplashFTFontEngine &operator=(const SplashFTFontEngine &) = delete; // Load fonts. -- SplashFontFile *loadType1Font(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, const char **enc, int faceIndex); -- SplashFontFile *loadType1CFont(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, const char **enc, int faceIndex); -- SplashFontFile *loadOpenTypeT1CFont(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, const char **enc, int faceIndex); -- SplashFontFile *loadCIDFont(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, int faceIndex); -- SplashFontFile *loadOpenTypeCFFFont(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, std::vector<int> &&codeToGID, int faceIndex); -- SplashFontFile *loadTrueTypeFont(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, std::vector<int> &&codeToGID, int faceIndex); -+ SplashFontFile *loadType1Font(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, const char **enc, int faceIndex) { return nullptr; }; -+ SplashFontFile *loadType1CFont(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, const char **enc, int faceIndex) { return nullptr; }; -+ SplashFontFile *loadOpenTypeT1CFont(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, const char **enc, int faceIndex) { return nullptr; }; -+ SplashFontFile *loadCIDFont(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, int faceIndex) { return nullptr; }; -+ SplashFontFile *loadOpenTypeCFFFont(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, std::vector<int> &&codeToGID, int faceIndex) { return nullptr; }; -+ SplashFontFile *loadTrueTypeFont(std::unique_ptr<SplashFontFileID> idA, SplashFontSrc *src, std::vector<int> &&codeToGID, int faceIndex) { return nullptr; }; - bool getAA() { return aa; } +- std::shared_ptr<SplashFontFile> loadType1Font(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, const char **enc, int faceIndex); +- std::shared_ptr<SplashFontFile> loadType1CFont(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, const char **enc, int faceIndex); +- std::shared_ptr<SplashFontFile> loadOpenTypeT1CFont(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, const char **enc, int faceIndex); +- std::shared_ptr<SplashFontFile> loadCIDFont(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, int faceIndex); +- std::shared_ptr<SplashFontFile> loadOpenTypeCFFFont(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, std::vector<int> &&codeToGID, int faceIndex); +- std::shared_ptr<SplashFontFile> loadTrueTypeFont(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, std::vector<int> &&codeToGID, int faceIndex); ++ std::shared_ptr<SplashFontFile> loadType1Font(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, const char **enc, int faceIndex) { return nullptr; }; ++ std::shared_ptr<SplashFontFile> loadType1CFont(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, const char **enc, int faceIndex) { return nullptr; }; ++ std::shared_ptr<SplashFontFile> loadOpenTypeT1CFont(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, const char **enc, int faceIndex) { return nullptr; }; ++ std::shared_ptr<SplashFontFile> loadCIDFont(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, int faceIndex) { return nullptr; }; ++ std::shared_ptr<SplashFontFile> loadOpenTypeCFFFont(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, std::vector<int> &&codeToGID, int faceIndex) { return nullptr; }; ++ std::shared_ptr<SplashFontFile> loadTrueTypeFont(std::unique_ptr<SplashFontFileID> idA, std::unique_ptr<SplashFontSrc> src, std::vector<int> &&codeToGID, int faceIndex) { return nullptr; }; + bool getAA() const { return aa; } void setAA(bool aaA) { aa = aaA; } private: diff --git a/external/poppler/missinginclude.patch b/external/poppler/missinginclude.patch deleted file mode 100644 index 8da9664496c0..000000000000 --- a/external/poppler/missinginclude.patch +++ /dev/null @@ -1,40 +0,0 @@ ---- poppler/Function.cc -+++ poppler/Function.cc -@@ -33,6 +33,7 @@ - #include <cstdlib> - #include <cstring> - #include <cctype> -+#include <climits> - #include <cmath> - #include "goo/gmem.h" - #include "goo/gstrtod.h" ---- poppler/Gfx.cc -+++ poppler/Gfx.cc -@@ -63,6 +63,7 @@ - #include <cstdlib> - #include <cstdio> - #include <cstring> -+#include <climits> - #include <cmath> - #include <memory> - #include "goo/GooTimer.h" ---- poppler/Parser.cc -+++ poppler/Parser.cc -@@ -33,6 +33,7 @@ - - #include <config.h> - -+#include <climits> - #include "Object.h" - #include "Array.h" - #include "Dict.h" ---- poppler/SplashOutputDev.cc -+++ poppler/SplashOutputDev.cc -@@ -54,6 +54,7 @@ - #include <config.h> - - #include <cstring> -+#include <climits> - #include <cmath> - #include <vector> - #include "Stream.h" diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1 index edf04d4af2ef..53685b1c8712 100644 --- a/external/poppler/poppler-config.patch.1 +++ b/external/poppler/poppler-config.patch.1 @@ -120,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 26.01.0" ++#define PACKAGE_STRING "poppler 26.02.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "poppler" @@ -129,7 +129,7 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_URL "" + +/* Define to the version of this package. */ -+#define PACKAGE_VERSION "26.01.0" ++#define PACKAGE_VERSION "26.02.0" + +/* Poppler data dir */ +#define POPPLER_DATADIR "/usr/local/share/poppler" @@ -144,7 +144,7 @@ index 0fbd336a..451213f8 100644 +#define USE_FLOAT 0 + +/* Version number of package */ -+#define VERSION "26.01.0" ++#define VERSION "26.02.0" + +#if defined(__APPLE__) +#elif defined (_WIN32) @@ -222,7 +222,7 @@ index 0fbd336a..451213f8 100644 +#define POPPLER_CONFIG_H + +/* Defines the poppler version. */ -+#define POPPLER_VERSION "26.01.0" ++#define POPPLER_VERSION "26.02.0" + +/* Use single precision arithmetic in the Splash backend */ +#define USE_FLOAT 0 @@ -310,9 +310,9 @@ index 0fbd336a..451213f8 100644 + +#include "poppler-global.h" + -+#define POPPLER_VERSION "26.01.0" ++#define POPPLER_VERSION "26.02.0" +#define POPPLER_VERSION_MAJOR 26 -+#define POPPLER_VERSION_MINOR 01 ++#define POPPLER_VERSION_MINOR 02 +#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 6b9184809803..f1487453eb50 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx @@ -711,13 +711,17 @@ void PDFOutDev::restoreState(GfxState*) printf( "restoreState " ); } -#if POPPLER_CHECK_VERSION(0, 71, 0) +#if POPPLER_CHECK_VERSION(26, 2, 0) +void PDFOutDev::setDefaultCTM(const std::array<double, 6> &pMat) +#elif POPPLER_CHECK_VERSION(0, 71, 0) void PDFOutDev::setDefaultCTM(const double *pMat) #else void PDFOutDev::setDefaultCTM(double *pMat) #endif { +#if !POPPLER_CHECK_VERSION(26, 2, 0) assert(pMat); +#endif OutputDev::setDefaultCTM(pMat); @@ -737,8 +741,12 @@ void PDFOutDev::updateCTM(GfxState* state, { assert(state); +#if POPPLER_CHECK_VERSION(26, 2, 0) + const std::array<double, 6> pMat = state->getCTM(); +#else const double* const pMat = state->getCTM(); assert(pMat); +#endif printf( "updateCtm %f %f %f %f %f %f ", normalize(pMat[0]), @@ -1044,7 +1052,11 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y, double csdx = 0.0; double csdy = 0.0; +#if POPPLER_CHECK_VERSION(26, 2, 0) + if (!state->getFont() || GfxFont::WritingMode::Horizontal == state->getFont()->getWMode()) +#else if (!state->getFont() || !state->getFont()->getWMode()) +#endif { csdx = state->getCharSpace(); if (*u == ' ') @@ -1067,7 +1079,11 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y, const double aPositionX(x-originX); const double aPositionY(y-originY); +#if POPPLER_CHECK_VERSION(26, 2, 0) + const std::array<double, 6> pTextMat=state->getTextMat(); +#else const double* pTextMat=state->getTextMat(); +#endif printf( "drawChar %f %f %f %f %f %f %f %f %f ", normalize(aPositionX), normalize(aPositionY), @@ -1348,7 +1364,11 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState *state, Gfx *, Catalog *, const int nDPI = 72; // GfxState seems to have 72.0 as magic for some reason auto pSplashGfxState = new GfxState(nDPI, nDPI, &aBox, 0, false); +#if POPPLER_CHECK_VERSION(26, 2, 0) + auto pSplashOut = new SplashOutputDev(splashModeRGB8, 1, nullptr); +#else auto pSplashOut = new SplashOutputDev(splashModeRGB8, 1, false, nullptr); +#endif pSplashOut->setEnableFreeType(false); pSplashOut->startDoc(m_pDoc); pSplashOut->startPage(0 /* pageNum */, pSplashGfxState, nullptr /* xref */); diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx index b7bd912406b5..da587b1522d6 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx @@ -85,13 +85,21 @@ namespace pdfi isUnderline(rSrc.isUnderline), size(rSrc.size) { +#if POPPLER_CHECK_VERSION(26, 2, 0) + familyName.append(rSrc.getFamilyName()); +#else familyName.append(&rSrc.getFamilyName()); +#endif } FontAttributes& operator=( const FontAttributes& rSrc ) { familyName.clear(); +#if POPPLER_CHECK_VERSION(26, 2, 0) + familyName.append(rSrc.getFamilyName()); +#else familyName.append(&rSrc.getFamilyName()); +#endif isEmbedded = rSrc.isEmbedded; maFontWeight= rSrc.maFontWeight; @@ -104,12 +112,21 @@ namespace pdfi bool operator==(const FontAttributes& rFont) const { +#if POPPLER_CHECK_VERSION(26, 2, 0) + return getFamilyName().compare(rFont.getFamilyName())==0 && + isEmbedded == rFont.isEmbedded && + maFontWeight == rFont.maFontWeight && + isItalic == rFont.isItalic && + isUnderline == rFont.isUnderline && + size == rFont.size; +#else return getFamilyName().cmp(&rFont.getFamilyName())==0 && isEmbedded == rFont.isEmbedded && maFontWeight == rFont.maFontWeight && isItalic == rFont.isItalic && isUnderline == rFont.isUnderline && size == rFont.size; +#endif } GooString familyName; @@ -172,7 +189,9 @@ namespace pdfi //----- initialization and control // Set default transform matrix. -#if POPPLER_CHECK_VERSION(0, 71, 0) +#if POPPLER_CHECK_VERSION(26, 2, 0) +void setDefaultCTM(const std::array<double, 6> &pMat) override; +#elif POPPLER_CHECK_VERSION(0, 71, 0) virtual void setDefaultCTM(const double *ctm) override; #else virtual void setDefaultCTM(double *ctm) override;
