download.lst                                          |    4 
 external/poppler/StaticLibrary_poppler.mk             |    2 
 external/poppler/UnpackedTarball_poppler.mk           |    2 
 external/poppler/clang-std-ranges.patch.1             |  122 ++++++++++++++++++
 external/poppler/disable-freetype.patch.1             |    7 -
 external/poppler/disable-nss-and-gpgmepp.patch.1      |  103 ---------------
 external/poppler/inc/pch/precompiled_poppler.hxx      |    9 -
 external/poppler/poppler-config.patch.1               |   26 +--
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |    5 
 9 files changed, 155 insertions(+), 125 deletions(-)

New commits:
commit 3bb689dfbac211696029c767250e841f67711088
Author:     Michael Stahl <[email protected]>
AuthorDate: Tue Jan 7 18:45:34 2025 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Wed Jan 8 20:07:30 2025 +0100

    poppler: upgrade to release 25.01
    
    Fixes CVE-2024-56378
    
    - remove disable-nss-and-gpgmepp.patch.1 and instead build
      CryptoSignBackend.cc which appears to have working ifdefs now
    - run the update_pch script
    - add clang-std-rotate.patch.1 because jenkins failed
    
    Change-Id: I7fcdd10766287e83dc666041644f129378584d91
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179903
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit e28c5a2c93477d167eb449f08eca220cb3b26b31)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179958
    Tested-by: Michael Stahl <[email protected]>

diff --git a/download.lst b/download.lst
index d6767f4e9654..88db65ac6dbb 100644
--- a/download.lst
+++ b/download.lst
@@ -543,8 +543,8 @@ LIBTIFF_TARBALL := tiff-4.7.0.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-POPPLER_SHA256SUM := 
97453fbddf0c9a9eafa0ea45ac710d3d49bcf23a62e864585385d3c0b4403174
-POPPLER_TARBALL := poppler-24.08.0.tar.xz
+POPPLER_SHA256SUM := 
7eefc122207bbbd72a303c5e0743f4941e8ae861e24dcf0501e18ce1d1414112
+POPPLER_TARBALL := poppler-25.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/StaticLibrary_poppler.mk 
b/external/poppler/StaticLibrary_poppler.mk
index 7b6f958245ac..bb179bfbfdbe 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_StaticLibrary_use_externals,poppler,\
 
 $(eval $(call gb_StaticLibrary_set_warnings_disabled,poppler))
 
+# note: the "fofi" and "goo" subdirs are required for the PCH
 $(eval $(call gb_StaticLibrary_set_include,poppler,\
        -I$(WORKDIR)/UnpackedTarball/poppler \
        -I$(WORKDIR)/UnpackedTarball/poppler/fofi \
@@ -87,6 +88,7 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,poppler,\
        UnpackedTarball/poppler/poppler/CertificateInfo \
        UnpackedTarball/poppler/poppler/CharCodeToUnicode \
        UnpackedTarball/poppler/poppler/CMap \
+       UnpackedTarball/poppler/poppler/CryptoSignBackend \
        UnpackedTarball/poppler/poppler/DCTStream \
        UnpackedTarball/poppler/poppler/DateInfo \
        UnpackedTarball/poppler/poppler/Decrypt \
diff --git a/external/poppler/UnpackedTarball_poppler.mk 
b/external/poppler/UnpackedTarball_poppler.mk
index 784fc768e2a7..3ebb9bb9492c 100644
--- a/external/poppler/UnpackedTarball_poppler.mk
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -15,7 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,poppler,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,poppler,\
        external/poppler/disable-freetype.patch.1 \
-       external/poppler/disable-nss-and-gpgmepp.patch.1 \
+       external/poppler/clang-std-ranges.patch.1 \
        external/poppler/poppler-config.patch.1 \
        external/poppler/pch.patch.0 \
 ))
diff --git a/external/poppler/clang-std-ranges.patch.1 
b/external/poppler/clang-std-ranges.patch.1
new file mode 100644
index 000000000000..3fae66b25fcf
--- /dev/null
+++ b/external/poppler/clang-std-ranges.patch.1
@@ -0,0 +1,122 @@
+clang jenkins bot fails with:
+
+In file included from 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/UnpackedTarball/poppler/splash/SplashFontEngine.cc:38:
+In file included from 
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/algorithm:60:
+In file included from 
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_algobase.h:65:
+In file included from 
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/stl_iterator_base_types.h:71:
+/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/iterator_concepts.h:982:13:
 error: no matching function for call to '__begin'
+        = decltype(ranges::__cust_access::__begin(std::declval<_Tp&>()));
+                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/ranges_base.h:595:5:
 note: in instantiation of template type alias '__range_iter_t' requested here
+    using iterator_t = std::__detail::__range_iter_t<_Tp>;
+    ^
+/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/ranges_util.h:121:36:
 note: in instantiation of template type alias 'iterator_t' requested here
+      requires contiguous_iterator<iterator_t<_Derived>>
+                                   ^
+/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/ranges_util.h:228:29:
 note: in instantiation of template class 
'std::ranges::view_interface<std::ranges::subrange<SplashFont **, SplashFont 
**, std::ranges::subrange_kind::sized>>' requested here
+    class subrange : public view_interface<subrange<_It, _Sent, _Kind>>
+                            ^
+/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/ranges_algo.h:1499:7:
 note: in instantiation of template class 'std::ranges::subrange<SplashFont **, 
SplashFont **, std::ranges::subrange_kind::sized>' requested here
+      operator()(_Range&& __r, iterator_t<_Range> __middle) const
+      ^
+/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/workdir/UnpackedTarball/poppler/splash/SplashFontEngine.cc:246:24:
 note: in instantiation of function template specialization 
'std::ranges::__rotate_fn::operator()<std::array<SplashFont *, 16> &>' 
requested here
+    std::ranges::rotate(fontCache, fontCache.end() - 1);
+                       ^
+/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/iterator_concepts.h:966:7:
 note: candidate template ignored: constraints not satisfied [with _Tp = 
std::ranges::subrange<SplashFont **, SplashFont **, 
std::ranges::subrange_kind::sized>]
+      __begin(_Tp& __t)
+      ^
+/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/iterator_concepts.h:964:16:
 note: because 'is_array_v<std::ranges::subrange<SplashFont **, SplashFont **, 
std::ranges::subrange_kind::sized> >' evaluated to false
+      requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&>
+               ^
+/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/iterator_concepts.h:964:35:
 note: and 'std::ranges::subrange<SplashFont **, SplashFont **, 
std::ranges::subrange_kind::sized> &' does not satisfy '__member_begin'
+      requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&>
+                                  ^
+/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/iterator_concepts.h:947:23:
 note: because '__decay_copy(__t.begin())' would be invalid: no member named 
'begin' in 'std::ranges::subrange<SplashFont **, SplashFont **, 
std::ranges::subrange_kind::sized>'
+          { __decay_copy(__t.begin()) } -> input_or_output_iterator;
+                             ^
+/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/iterator_concepts.h:964:59:
 note: and 'std::ranges::subrange<SplashFont **, SplashFont **, 
std::ranges::subrange_kind::sized> &' does not satisfy '__adl_begin'
+      requires is_array_v<_Tp> || __member_begin<_Tp&> || __adl_begin<_Tp&>
+                                                          ^
+/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12/../../../../include/c++/12/bits/iterator_concepts.h:958:19:
 note: because '__decay_copy(begin(__t))' would be invalid: call to deleted 
function 'begin'
+          { __decay_copy(begin(__t)) } -> input_or_output_iterator;
+                         ^
+
+--- poppler/splash/SplashFontEngine.cc.orig2   2025-01-08 10:58:44.891336796 
+0100
++++ poppler/splash/SplashFontEngine.cc 2025-01-08 11:02:24.548166442 +0100
+@@ -243,7 +243,11 @@
+     if (fontCache.back()) {
+         delete fontCache.back();
+     }
++#ifndef __clang__
+     std::ranges::rotate(fontCache, fontCache.end() - 1);
++#else
++    std::rotate(fontCache.begin(), fontCache.end() - 1, fontCache.end());
++#endif
+ 
+     fontCache[0] = newFont;
+     return fontCache[0];
+--- poppler/fofi/FoFiTrueType.cc.orig  2025-01-08 12:26:45.256494256 +0100
++++ poppler/fofi/FoFiTrueType.cc       2025-01-08 12:22:26.462723118 +0100
+@@ -1160,12 +1160,20 @@
+             locaTable[i].origOffset = glyfTableLen;
+         }
+     }
++#ifndef __clang__
+     std::ranges::sort(locaTable, cmpTrueTypeLocaOffsetFunctor());
++#else
++    std::sort(locaTable.begin(), locaTable.end(), 
cmpTrueTypeLocaOffsetFunctor());
++#endif
+     for (i = 0; i < nGlyphs; ++i) {
+         locaTable[i].len = locaTable[i + 1].origOffset - 
locaTable[i].origOffset;
+     }
+     locaTable[nGlyphs].len = 0;
++#ifndef __clang__
+     std::ranges::sort(locaTable, cmpTrueTypeLocaIdxFunctor());
++#else
++    std::sort(locaTable.begin(), locaTable.end(), 
cmpTrueTypeLocaIdxFunctor());
++#endif
+     pos = 0;
+     for (i = 0; i <= nGlyphs; ++i) {
+         locaTable[i].newOffset = pos;
+--- poppler/poppler/CIDFontsWidthsBuilder.h.orig       2025-01-08 
12:34:25.458714665 +0100
++++ poppler/poppler/CIDFontsWidthsBuilder.h    2025-01-08 12:35:05.809036940 
+0100
+@@ -89,7 +89,11 @@
+         // How many elements at the end has this
+         int uniqueElementsFromEnd(int value)
+         {
++#ifndef __clang__
+             auto lastDifferent = 
std::ranges::find_if(std::ranges::reverse_view(m_values), [value](auto 
&&element) { return element != value; });
++#else
++            auto lastDifferent = std::find_if(m_values.rbegin(), 
m_values.rend(), [value](auto &&element) { return element != value; });
++#endif
+             return std::distance(m_values.rbegin(), lastDifferent);
+         }
+ 
+--- poppler/poppler/Dict.cc.orig       2025-01-08 12:17:07.701541557 +0100
++++ poppler/poppler/Dict.cc    2025-01-08 12:29:29.609619053 +0100
+@@ -125,7 +125,11 @@
+             return &*pos;
+         }
+     } else {
++#ifndef __clang__
+         const auto pos = 
std::ranges::find_if(std::ranges::reverse_view(entries), [key](const DictEntry 
&entry) { return entry.first == key; });
++#else
++        const auto pos = std::find_if(entries.rbegin(), entries.rend(), 
[key](const DictEntry &entry) { return entry.first == key; });
++#endif
+         if (pos != entries.rend()) {
+             return &*pos;
+         }
+--- poppler/poppler/CIDFontsWidthsBuilder.h.orig2      2025-01-08 
13:26:29.167797754 +0100
++++ poppler/poppler/CIDFontsWidthsBuilder.h    2025-01-08 13:27:03.165988989 
+0100
+@@ -152,7 +152,11 @@
+             if (differentValues || m_values.size() < 4) {
+                 std::vector<int> savedValues;
+                 if (m_values.size() >= 4) {
++#ifndef __clang__
+                     auto lastDifferent = 
std::ranges::find_if(std::ranges::reverse_view(m_values), [value = 
m_values.back()](auto &&element) { return element != value; });
++#else
++                    auto lastDifferent = std::find_if(m_values.rbegin(), 
m_values.rend(), [value = m_values.back()](auto &&element) { return element != 
value; });
++#endif
+                     if (std::distance(m_values.rbegin(), lastDifferent) >= 3) 
{
+                         savedValues.push_back(m_values.back());
+                         m_values.pop_back();
diff --git a/external/poppler/disable-freetype.patch.1 
b/external/poppler/disable-freetype.patch.1
index 5d7426242c35..211214eebb3e 100644
--- a/external/poppler/disable-freetype.patch.1
+++ b/external/poppler/disable-freetype.patch.1
@@ -8,16 +8,17 @@ disable freetype dependent code
  #include <cctype>
 -#include "goo/ft_utils.h"
 +//#include "goo/ft_utils.h"
- #include "goo/gmem.h"
  #include "goo/gfile.h"
  #include "goo/GooString.h"
-@@ -78,8 +78,8 @@
+ #include "Error.h"
+@@ -78,9 +78,9 @@
  #include "fofi/FoFiTrueType.h"
  #include "fofi/FoFiIdentifier.h"
  
 -#include <ft2build.h>
--#include FT_FREETYPE_H
 +//#include <ft2build.h>
+ #include <variant>
+-#include FT_FREETYPE_H
 +//#include FT_FREETYPE_H
  #include <unordered_set>
  
diff --git a/external/poppler/disable-nss-and-gpgmepp.patch.1 
b/external/poppler/disable-nss-and-gpgmepp.patch.1
deleted file mode 100644
index 1fc9ede6035c..000000000000
--- a/external/poppler/disable-nss-and-gpgmepp.patch.1
+++ /dev/null
@@ -1,103 +0,0 @@
-disable NSS/GPGMEPP dependent code.
-
---- poppler/poppler/Form.cc.orig       2023-06-05 19:29:14.000000000 +0900
-+++ poppler/poppler/Form.cc    2023-06-17 16:51:27.873431500 +0900
-@@ -64,7 +64,7 @@
- #include "Form.h"
- #include "PDFDoc.h"
- #include "DateInfo.h"
--#include "CryptoSignBackend.h"
-+/*#include "CryptoSignBackend.h"*/
- #include "SignatureInfo.h"
- #include "CertificateInfo.h"
- #include "XRef.h"
-@@ -584,7 +584,7 @@
- {
-     return static_cast<FormFieldSignature 
*>(field)->validateSignatureResult();
- }
--
-+#if 0
- // update hash with the specified range of data from the file
- static bool hashFileRange(FILE *f, CryptoSign::SigningInterface *handler, 
Goffset start, Goffset end)
- {
-@@ -608,10 +608,12 @@
-     delete[] buf;
-     return true;
- }
-+#endif
-
- bool FormWidgetSignature::signDocument(const std::string &saveFilename, const 
std::string &certNickname, const std::string &password, const GooString 
*reason, const GooString *location, const std::optional<GooString> 
&ownerPassword,
-                                        const std::optional<GooString> 
&userPassword)
- {
-+#if 0
-     auto backend = CryptoSign::Factory::createActive();
-     if (!backend) {
-         return false;
-@@ -697,8 +699,8 @@
-     signatureField->setSignature(*signature);
-
-     fclose(file);
--
--    return true;
-+#endif
-+    return false;
- }
-
- static std::tuple<double, double> calculateDxDy(int rot, const PDFRectangle 
*rect)
-@@ -2355,6 +2357,7 @@
-
- void 
FormFieldSignature::hashSignedDataBlock(CryptoSign::VerificationInterface 
*handler, Goffset block_len)
- {
-+#if 0
-     if (!handler) {
-         return;
-     }
-@@ -2374,6 +2377,7 @@
-             i += BLOCK_SIZE;
-         }
-     }
-+#endif
- }
-
- FormSignatureType FormWidgetSignature::signatureType() const
-@@ -2395,6 +2399,7 @@
- 
- SignatureInfo *FormFieldSignature::validateSignatureAsync(bool doVerifyCert, 
bool forceRevalidation, time_t validationTime, bool ocspRevocationCheck, bool 
enableAIA, const std::function<void()> &doneCallback)
- {
-+#if 0
-     auto backend = CryptoSign::Factory::createActive();
-     if (!backend) {
-         if (doneCallback) {
-@@ -2497,6 +2502,7 @@
- 
-     
signature_handler->validateCertificateAsync(std::chrono::system_clock::from_time_t(validationTime),
 ocspRevocationCheck, enableAIA, doneCallback);
- 
-+#endif
-     return signature_info;
- }
-
-@@ -2508,10 +2508,13 @@
- 
- CertificateValidationStatus FormFieldSignature::validateSignatureResult()
- {
-+#if 0
-     if (!signature_handler) {
-         return CERTIFICATE_GENERIC_ERROR;
-     }
-     return signature_handler->validateCertificateResult();
-+#endif
-+    return CERTIFICATE_GENERIC_ERROR;
- }
- 
- std::vector<Goffset> FormFieldSignature::getSignedRangeBounds() const
-
---- poppler/poppler/Form.h     2024-05-13 10:18:04.303912457 +0200
-+++ poppler/poppler/Form.h     2024-05-13 11:41:51.547002511 +0200
-@@ -669,7 +669,6 @@
-     double customAppearanceLeftFontSize = 20;
-     Ref imageResource = Ref::INVALID();
-     std::unique_ptr<X509CertificateInfo> certificate_info;
--    std::unique_ptr<CryptoSign::VerificationInterface> signature_handler;
- 
-     void print(int indent) override;
- };
diff --git a/external/poppler/inc/pch/precompiled_poppler.hxx 
b/external/poppler/inc/pch/precompiled_poppler.hxx
index 0a3c0a98353c..9351ca348282 100644
--- a/external/poppler/inc/pch/precompiled_poppler.hxx
+++ b/external/poppler/inc/pch/precompiled_poppler.hxx
@@ -13,11 +13,11 @@
  manual changes will be rewritten by the next run of update_pch.sh (which 
presumably
  also fixes all possible problems, so it's usually better to use it).
 
- Generated on 2024-06-10 17:25:06 using:
- ./bin/update_pch external/poppler poppler --cutoff=1 --exclude:system 
--include:module --include:local
+ Generated on 2025-01-08 10:27:46 using:
+ ../master/bin/update_pch ../master/external/poppler poppler --cutoff=1 
--exclude:system --include:module --include:local
 
  If after updating build fails, use the following command to locate 
conflicting headers:
- ./bin/update_pch_bisect ./external/poppler/inc/pch/precompiled_poppler.hxx 
"make external/poppler.build" --find-conflicts
+ ./bin/update_pch_bisect 
./../master/external/poppler/inc/pch/precompiled_poppler.hxx "make 
../master/external/poppler.build" --find-conflicts
 */
 
 #include <sal/config.h>
@@ -69,13 +69,16 @@
 #include <iostream>
 #include <limits>
 #include <memory>
+#include <numbers>
 #include <optional>
 #include <poppler-config.h>
 #include <random>
+#include <ranges>
 #include <regex>
 #include <set>
 #include <sstream>
 #include <unordered_set>
+#include <variant>
 #include <vector>
 #endif // PCH_LEVEL >= 1
 #if PCH_LEVEL >= 2
diff --git a/external/poppler/poppler-config.patch.1 
b/external/poppler/poppler-config.patch.1
index e2163319fd43..a12fb0107098 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -29,7 +29,7 @@ index 0fbd336a..451213f8 100644
 +/* #undef ENABLE_LIBOPENJPEG */
 +
 +/* Build against libtiff. */
-+/* #define ENABLE_LIBTIFF 1 */
++/* #undef ENABLE_LIBTIFF */
 +
 +/* Build against libpng. */
 +/* #define ENABLE_LIBPNG 1 */
@@ -41,16 +41,16 @@ index 0fbd336a..451213f8 100644
 +/* #undef ENABLE_ZLIB_UNCOMPRESS */
 +
 +/* Build against libnss3 for digital signature validation */
-+/* #define ENABLE_NSS3 1 */
++/* #undef ENABLE_NSS3 */
 +
 +/* Build against libgpgme for digital signature validation */
 +/* #undef ENABLE_GPGME */
 +
 +/* Signatures enabled */
-+/* #define ENABLE_SIGNATURES 1 */
++/* #undef ENABLE_SIGNATURES */
 +
 +/* Default signature backend */
-+/* #define DEFAULT_SIGNATURE_BACKEND "NSS" */
++#define DEFAULT_SIGNATURE_BACKEND "None"
 +
 +/* Use cairo for rendering. */
 +/* #define HAVE_CAIRO 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 24.06.0"
++#define PACKAGE_STRING "poppler 25.01.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 "24.06.0"
++#define PACKAGE_VERSION "25.01.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 "24.06.0"
++#define VERSION "25.01.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 "24.06.0"
++#define POPPLER_VERSION "25.01.0"
 +#endif
 +
 +/* Use single precision arithmetic in the Splash backend */
@@ -320,7 +320,7 @@ index 0fbd336a..451213f8 100644
 +
 +/* Build against libtiff. */
 +#ifndef ENABLE_LIBTIFF
-+/* #define ENABLE_LIBTIFF 1 */
++/* #undef ENABLE_LIBTIFF */
 +#endif
 +
 +/* Build against libpng. */
@@ -377,7 +377,7 @@ index 0fbd336a..451213f8 100644
 +//------------------------------------------------------------------------
 +
 +// copyright notice
-+#define popplerCopyright "Copyright 2005-2023 The Poppler Developers - 
http://poppler.freedesktop.org";
++#define popplerCopyright "Copyright 2005-2025 The Poppler Developers - 
http://poppler.freedesktop.org";
 +#define xpdfCopyright "Copyright 1996-2011, 2022 Glyph & Cog, LLC"
 +
 +//------------------------------------------------------------------------
@@ -437,9 +437,9 @@ index 0fbd336a..451213f8 100644
 +
 +#include "poppler-global.h"
 +
-+#define POPPLER_VERSION "24.06.0"
-+#define POPPLER_VERSION_MAJOR 24
-+#define POPPLER_VERSION_MINOR 6
++#define POPPLER_VERSION "25.01.0"
++#define POPPLER_VERSION_MAJOR 25
++#define POPPLER_VERSION_MINOR 1
 +#define POPPLER_VERSION_MICRO 0
 +
 +namespace poppler
commit 052c9859e2bd5dfeb54d834a3d7910140d5a8535
Author:     Michael Stahl <[email protected]>
AuthorDate: Tue Jan 7 18:42:29 2025 +0100
Commit:     Michael Stahl <[email protected]>
CommitDate: Wed Jan 8 20:07:19 2025 +0100

    sdext: adapt xpdfwrapper to poppler 24.12
    
    Change-Id: Ia47edf2ac821e3ef5c40f7582253f894eac74060
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179902
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit aa94faf493945e854a888e809a9c5cc8d6d0b978)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179957
    Tested-by: Michael Stahl <[email protected]>

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 2517618e1019..a46932944ede 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -1037,7 +1037,12 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object*, 
Stream* str,
 
     int bitsPerComponent = 1;
     StreamColorSpaceMode csMode = streamCSNone;
+#if POPPLER_CHECK_VERSION(24, 12, 0)
+    bool hasAlpha;
+    str->getImageParams( &bitsPerComponent, &csMode, &hasAlpha );
+#else
     str->getImageParams( &bitsPerComponent, &csMode );
+#endif
     if( bitsPerComponent == 1 && (csMode == streamCSNone || csMode == 
streamCSDeviceGray) )
     {
         GfxRGB oneColor = { dblToCol( 1.0 ), dblToCol( 1.0 ), dblToCol( 1.0 ) 
};

Reply via email to