File 0002-poppler-upgrade-to-25.09.0.patch of Package collaboraoffice

From 6032cad09b1c93f40154f4d148506af0b9700d8c Mon Sep 17 00:00:00 2001
From: Xisco Fauli <xiscofauli@libreoffice.org>
Date: Tue, 2 Sep 2025 10:42:44 +0200
Subject: [PATCH 2/3] poppler: upgrade to 25.09.0

Downloaded from https://poppler.freedesktop.org/poppler-25.09.0.tar.xz

Change-Id: Ic7f3abd64d129543dcdc370816a0d69e5a59be90
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190513
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
---
 download.lst                                  |  4 +--
 external/poppler/poppler-config.patch.1       | 12 +++----
 .../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx  | 34 +++++++++++++++++++
 .../pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx  | 19 +++++++++++
 4 files changed, 61 insertions(+), 8 deletions(-)

diff --git a/download.lst b/download.lst
index b7bf5efefc3c..bf9e9022142b 100644
--- a/download.lst
+++ b/download.lst
@@ -656,8 +656,8 @@ LIBTIFF_TARBALL := tiff-4.7.1.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-POPPLER_SHA256SUM := 425ed4d4515a093bdcdbbaac6876f20617451edc710df6a4fd6c45dd67eb418d
-POPPLER_TARBALL := poppler-25.08.0.tar.xz
+POPPLER_SHA256SUM := 758abfe0c77108c72d654b291dfbce54964b5315a53028e3875f07ef55ff20a3
+POPPLER_TARBALL := poppler-25.09.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 573c23ab284f..6c653ab3d050 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.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.05.0"
++#define PACKAGE_STRING "poppler 25.09.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.05.0"
++#define PACKAGE_VERSION "25.09.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.05.0"
++#define VERSION "25.09.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.05.0"
++#define POPPLER_VERSION "25.09.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.05.0"
++#define POPPLER_VERSION "25.09.0"
 +#define POPPLER_VERSION_MAJOR 25
-+#define POPPLER_VERSION_MINOR 5
++#define POPPLER_VERSION_MINOR 9
 +#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 f4b03f067827..8bea75831574 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -1137,6 +1137,32 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str,
     writeBinaryBuffer(aBuf);
 }
 
+#if POPPLER_CHECK_VERSION(0, 70, 0)
+#if POPPLER_CHECK_VERSION(25, 9, 0)
+void PDFOutDev::beginTransparencyGroup(GfxState * /*state*/, const std::array<double, 4> & /*bbox*/,
+#else
+void PDFOutDev::beginTransparencyGroup(GfxState * /*state*/, const double * /*bbox*/,
+#endif
+#else
+void PDFOutDev::beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,
+#endif
+                                    GfxColorSpace * /*blendingColorSpace*/,
+                                    poppler_bool /*isolated*/,
+                                    poppler_bool /*knockout*/,
+                                    poppler_bool forSoftMask)
+{
+    // We're not doing full transparency group yet, just trying to hide the
+    // soft mask temporaries.
+    printf( "beginTransparencyGroup %d", !!forSoftMask);
+    printf("\n");
+}
+
+void PDFOutDev::endTransparencyGroup(GfxState * /* state */)
+{
+    printf( "endTransparencyGroup");
+    printf("\n");
+}
+
 #if POPPLER_CHECK_VERSION(0, 82, 0)
 void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
                           int width, int height, GfxImageColorMap* colorMap,
@@ -1249,11 +1275,19 @@ void PDFOutDev::setSkipImages( bool bSkipImages )
 
 #if POPPLER_CHECK_VERSION(21, 3, 0)
 poppler_bool PDFOutDev::tilingPatternFill(GfxState *state, Gfx *, Catalog *,
+#if POPPLER_CHECK_VERSION(25, 9, 0)
+                                          GfxTilingPattern *tPat, const std::array<double, 6> &mat,
+#else
                                           GfxTilingPattern *tPat, const double *mat,
+#endif
                                           int x0, int y0, int x1, int y1,
                                           double xStep, double yStep)
 {
+#if POPPLER_CHECK_VERSION(25, 9, 0)
+    const std::array<double, 4> pBbox = tPat->getBBox();
+#else
     const double *pBbox = tPat->getBBox();
+#endif
     const int nPaintType = tPat->getPaintType();
     Dict *pResDict = tPat->getResDict();
     Object *aStr = tPat->getContentStream();
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
index eb0e3e29f5f5..679dae9cdb2b 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -287,10 +287,29 @@ namespace pdfi
 #if POPPLER_CHECK_VERSION(21, 3, 0)
         poppler_bool useTilingPatternFill() override { return true; };
         poppler_bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat,
+#if POPPLER_CHECK_VERSION(25, 9, 0)
+                                       GfxTilingPattern *tPat, const std::array<double, 6> &mat,
+#else
                                        GfxTilingPattern *tPat, const double *mat,
+#endif
                                        int x0, int y0, int x1, int y1,
                                        double xStep, double yStep) override;
 #endif
+
+#if POPPLER_CHECK_VERSION(0, 70, 0)
+#if POPPLER_CHECK_VERSION(25, 9, 0)
+        void beginTransparencyGroup(GfxState *state, const std::array<double, 4> &bbox,
+#else
+        void beginTransparencyGroup(GfxState *state, const double *bbox,
+#endif
+#else
+        void beginTransparencyGroup(GfxState *state, double *bbox,
+#endif
+                                    GfxColorSpace *blendingColorSpace,
+                                    poppler_bool isolated,
+                                    poppler_bool knockout,
+                                    poppler_bool forSoftMask) override;
+        void endTransparencyGroup(GfxState *state) override;
     };
 }
 
-- 
2.52.0

openSUSE Build Service is sponsored by