app-office/libreoffice: Fix build w/ app-text/poppler-26.06.0

Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Andreas Sturmlechner
2026-09-21 18:05:05 +02:00
parent eea3a5f058
commit e3be057790
3 changed files with 74 additions and 5 deletions
@@ -3,12 +3,8 @@ From: Xisco Fauli <xiscofauli@libreoffice.org>
Date: Thu, 2 Apr 2026 11:32:02 +0200
Subject: [PATCH] poppler: upgrade to 26.04
Downloaded from https://poppler.freedesktop.org/poppler-26.04.0.tar.xz
stripped of all the bundled update stuff ...
Change-Id: I1e43d4a63da2f380b613718a897c3973ec9e16ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203153
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
---
.../source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 +++-
.../source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 +++-
@@ -0,0 +1,72 @@
From b08afae7e41fd5ca3a4101de07366783b17b3887 Mon Sep 17 00:00:00 2001
From: Xisco Fauli <xiscofauli@libreoffice.org>
Date: Wed, 3 Jun 2026 17:37:11 +0200
Subject: [PATCH] poppler: upgrade to 26.06
stripped of all the bundled update stuff ...
---
.../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 20 +++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 18c855908f024..ed91b55533349 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -60,6 +60,10 @@
#include "UTF8.h"
#endif
+#if POPPLER_CHECK_VERSION(26, 6, 0)
+#include <Annot.h>
+#endif
+
#ifdef _WIN32
# define snprintf _snprintf
@@ -1223,7 +1227,9 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
{
GfxRGB aMinRGB;
colorMap->getColorSpace()->getRGB(
-#if POPPLER_CHECK_VERSION(0, 82, 0)
+#if POPPLER_CHECK_VERSION(26, 6, 0)
+ *reinterpret_cast<const GfxColor*>(maskColors),
+#elif POPPLER_CHECK_VERSION(0, 82, 0)
reinterpret_cast<const GfxColor*>(maskColors),
#else
reinterpret_cast<GfxColor*>(maskColors),
@@ -1232,7 +1238,9 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
GfxRGB aMaxRGB;
colorMap->getColorSpace()->getRGB(
-#if POPPLER_CHECK_VERSION(0, 82, 0)
+#if POPPLER_CHECK_VERSION(26, 6, 0)
+ *(reinterpret_cast<const GfxColor*>(maskColors)+gfxColorMaxComps),
+#elif POPPLER_CHECK_VERSION(0, 82, 0)
reinterpret_cast<const GfxColor*>(maskColors)+gfxColorMaxComps,
#else
reinterpret_cast<GfxColor*>(maskColors)+gfxColorMaxComps,
@@ -1365,7 +1373,11 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState *state, Gfx *, Catalog *,
aBox.y2 = pBbox[3];
const int nDPI = 72; // GfxState seems to have 72.0 as magic for some reason
+#if POPPLER_CHECK_VERSION(26, 6, 0)
+ auto pSplashGfxState = new GfxState(nDPI, nDPI, aBox, 0, false);
+#else
auto pSplashGfxState = new GfxState(nDPI, nDPI, &aBox, 0, false);
+#endif
#if POPPLER_CHECK_VERSION(26, 2, 0)
auto pSplashOut = new SplashOutputDev(splashModeRGB8, 1, nullptr);
#else
@@ -1375,7 +1387,11 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState *state, Gfx *, Catalog *,
pSplashOut->startDoc(m_pDoc);
pSplashOut->startPage(0 /* pageNum */, pSplashGfxState, nullptr /* xref */);
+#if POPPLER_CHECK_VERSION(26, 6, 0)
+ auto pSplashGfx = new Gfx(m_pDoc, pSplashOut, pResDict, aBox, nullptr);
+#else
auto pSplashGfx = new Gfx(m_pDoc, pSplashOut, pResDict, &aBox, nullptr);
+#endif
pSplashGfx->display(aStr);
std::unique_ptr<SplashBitmap> pSplashBitmap(pSplashOut->takeBitmap());
// Poppler tells us to free the splash device immediately after taking the
@@ -302,6 +302,7 @@ PATCHES=(
"${FILESDIR}/${P}-poppler-26.01.patch"
"${FILESDIR}/${P}-poppler-26.02.patch"
"${FILESDIR}/${P}-poppler-26.04.patch"
"${FILESDIR}/${P}-poppler-26.06.patch"
# add qt6 backend as possible fallback for gtk-based desktop environments:
# https://bugs.gentoo.org/950170