download.lst                                          |    4 
 external/poppler/UnpackedTarball_poppler.mk           |    1 
 external/poppler/clang-std-ranges.patch.1             |  340 ++++++++++++++++++
 external/poppler/inc/pch/precompiled_poppler.hxx      |   10 
 external/poppler/pch.patch.0                          |   11 
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |    9 
 sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx      |   17 
 7 files changed, 364 insertions(+), 28 deletions(-)

New commits:
commit 0a4fac8abfd7f6038b344916fdee29c5f67a92a4
Author:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
AuthorDate: Tue Apr 22 15:59:23 2025 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Apr 25 17:56:43 2025 +0200

    poppler: avoid more std::ranges afer update to 25.04.0
    
    Not supported by macOS 12.7 / XCode 14.2
    
    Change-Id: I114190ddc9e36c2660c78a4ea2eb1e7797dadf13
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184444
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 8cdbe3666440f81aa71539e8d38d5a93eec17b26)

diff --git a/external/poppler/clang-std-ranges.patch.1 
b/external/poppler/clang-std-ranges.patch.1
index c1484d9ab81b..28841ed6a005 100644
--- a/external/poppler/clang-std-ranges.patch.1
+++ b/external/poppler/clang-std-ranges.patch.1
@@ -415,3 +415,48 @@ In file included from 
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linu
      }
  }
  
+diff -ur poppler.org/poppler/TextOutputDev.cc poppler/poppler/TextOutputDev.cc
+--- poppler.org/poppler/TextOutputDev.cc       2025-04-22 15:42:57.000000000 
+0200
++++ poppler/poppler/TextOutputDev.cc   2025-04-22 15:49:06.000000000 +0200
+@@ -2419,7 +2419,11 @@
+                 }
+             }
+         }
++#ifndef __clang__
+         std::ranges::sort(words, &TextWord::cmpYX);
++#else
++        std::sort(words.begin(), words.end(), &TextWord::cmpYX);
++#endif
+ 
+     } else {
+         for (flow = text->flows; flow; flow = flow->next) {
+@@ -4402,9 +4406,17 @@
+         // if all lines in the region have the same rotation, use it;
+         // otherwise, use the page's primary rotation
+         if (oneRot) {
++#ifndef __clang__
+             std::ranges::sort(frags, &TextLineFrag::cmpYXLineRot);
++#else
++            std::sort(frags.begin(), frags.end(), 
&TextLineFrag::cmpYXLineRot);
++#endif
+         } else {
++#ifndef __clang__
+             std::ranges::sort(frags, &TextLineFrag::cmpYXPrimaryRot);
++#else
++            std::sort(frags.begin(), frags.end(), 
&TextLineFrag::cmpYXPrimaryRot);
++#endif
+         }
+         for (auto it = frags.begin(); it != frags.end();) {
+             double delta = maxIntraLineDelta * it->line->words->fontSize;
+@@ -5416,7 +5428,11 @@
+                 frags.back().computeCoords(true);
+             }
+         }
++#ifndef __clang__
+         std::ranges::sort(frags, &TextLineFrag::cmpYXPrimaryRot);
++#else
++        std::sort(frags.begin(), frags.end(), &TextLineFrag::cmpYXPrimaryRot);
++#endif
+         for (auto it = frags.begin(); it != frags.end();) {
+             double delta = maxIntraLineDelta * it->line->words->fontSize;
+             double base = it->base;
commit 741994747b7d0f5e41f414cde4acb0259a1dbb03
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Apr 2 16:27:00 2025 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Apr 25 17:54:50 2025 +0200

    poppler: upgrade to 25.04.0
    
    After 032d035220702523cf10d924fd436c9e6c83d24c
    "Enforce error checking on stream::reset" the return from reset
    has to be checked, otherwise it fails with
    error: ignoring return value of ‘bool ImageStream::reset()’, declared with 
attribute ‘nodiscard’ [-Werror=unused-result]
    
    Downloaded from https://poppler.freedesktop.org/poppler-25.04.0.tar.xz
    
    Change-Id: I5c6022b11c307f4293e4b2ea566e811053e3ab6f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183632
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 4f13305178c1bf88dffceb42ec15d0944b808a5c)

diff --git a/download.lst b/download.lst
index 749990c5f89e..8624eec8c307 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 := 
21234cb2a9647d73c752ce4031e65a79d11a511a835f2798284c2497b8701dee
-POPPLER_TARBALL := poppler-25.02.0.tar.xz
+POPPLER_SHA256SUM := 
b010c596dce127fba88532fd2f1043e55ea30601767952d0f2c0a80e7dc0da3d
+POPPLER_TARBALL := poppler-25.04.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/clang-std-ranges.patch.1 
b/external/poppler/clang-std-ranges.patch.1
index 0ba895cf1024..c1484d9ab81b 100644
--- a/external/poppler/clang-std-ranges.patch.1
+++ b/external/poppler/clang-std-ranges.patch.1
@@ -311,8 +311,8 @@ In file included from 
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linu
          }
  
          lines.push_back(std::move(words));
-@@ -5456,7 +5460,11 @@
-         for (word = rawWords; word; word = word->next) {
+@@ -5385,7 +5385,11 @@
+         for (TextWord *word = rawWords; word; word = word->next) {
              s.clear();
              uText.resize(word->len());
 +#ifndef __clang__
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index a46932944ede..3ad86bf085c2 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -212,7 +212,8 @@ static void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* 
str )
 #else
     str = ((DCTStream *)str)->getRawStream();
 #endif
-    str->reset();
+    if (!str->reset())
+        return;
 
     o_rOutputBuf.clear();
     ExtractJpegData(str, o_rOutputBuf);
@@ -248,7 +249,8 @@ static void writePbm_(OutputBuffer& o_rOutputBuf, Stream* 
str, int width, int he
     o_rOutputBuf.resize(header_size);
 
     // initialize stream
-    str->reset();
+    if (!str->reset())
+        return;
 
     // copy the raw stream
     if( bInvert )
@@ -305,7 +307,8 @@ static void writePpm_( OutputBuffer&     o_rOutputBuf,
                         width,
                         colorMap->getNumPixelComps(),
                         colorMap->getBits()));
-    imgStr->reset();
+    if (!imgStr->reset())
+        return;
 
     for( int y=0; y<height; ++y)
     {
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
index 798555fe2f54..c0547e761e59 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
@@ -214,7 +214,8 @@ void PngHelper::createPng( OutputBuffer&     o_rOutputBuf,
     int nLineSize = (width + 7)/8;
     aScanlines.reserve( nLineSize * height + height );
 
-    str->reset();
+    if (!str->reset())
+        return;
     for( int y = 0; y < height; y++ )
     {
         // determine filter type (none) for this scanline
@@ -252,7 +253,8 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
                         width,
                         colorMap->getNumPixelComps(),
                         colorMap->getBits()));
-    imgStr->reset();
+    if (!imgStr->reset())
+        return;
 
     // create scan line data buffer
     OutputBuffer aScanlines;
@@ -289,7 +291,9 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
                         maskColorMap->getNumPixelComps(),
                         maskColorMap->getBits()));
 
-    imgStrMask->reset();
+    if (!imgStrMask->reset())
+        return;
+
     for( int y = 0; y < maskHeight; ++y )
     {
         pm = imgStrMask->getLine();
@@ -337,7 +341,8 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
                         width,
                         colorMap->getNumPixelComps(),
                         colorMap->getBits()));
-    imgStr->reset();
+    if (!imgStr->reset())
+        return;
 
     // create scan line data buffer
     OutputBuffer aScanlines;
@@ -371,7 +376,9 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
     std::unique_ptr<ImageStream> imgStrMask(
         new ImageStream(maskStr, maskWidth, 1, 1));
 
-    imgStrMask->reset();
+    if (!imgStrMask->reset())
+        return;
+
     for( int y = 0; y < maskHeight; ++y )
     {
         for( int x = 0; x < maskWidth; ++x )
commit b7d6bb65ba6e0dfa9b18b603c264c1d14f514533
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Tue Feb 25 14:09:16 2025 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Apr 25 17:48:10 2025 +0200

    related tdf#165433: poppler: upgrade to 25.02.0
    
    Downloaded from https://poppler.freedesktop.org/poppler-25.02.0.tar.xz
    
    Change-Id: I22cf1bd4dc3d27cabd8ce291d3bafd962d3f45f7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182169
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Tested-by: Jenkins
    (cherry picked from commit 12c1596b0fd152399bed90f3d26014a32efc24e3)

diff --git a/download.lst b/download.lst
index fd366d48f68d..749990c5f89e 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 := 
7eefc122207bbbd72a303c5e0743f4941e8ae861e24dcf0501e18ce1d1414112
-POPPLER_TARBALL := poppler-25.01.0.tar.xz
+POPPLER_SHA256SUM := 
21234cb2a9647d73c752ce4031e65a79d11a511a835f2798284c2497b8701dee
+POPPLER_TARBALL := poppler-25.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 3ebb9bb9492c..2d7a0a939071 100644
--- a/external/poppler/UnpackedTarball_poppler.mk
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -17,7 +17,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,poppler,\
        external/poppler/disable-freetype.patch.1 \
        external/poppler/clang-std-ranges.patch.1 \
        external/poppler/poppler-config.patch.1 \
-       external/poppler/pch.patch.0 \
 ))
 
 ifneq ($(filter -fsanitize=%,$(CC)),)
diff --git a/external/poppler/inc/pch/precompiled_poppler.hxx 
b/external/poppler/inc/pch/precompiled_poppler.hxx
index 9351ca348282..b2a9a78d30da 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 2025-01-08 10:27:46 using:
- ../master/bin/update_pch ../master/external/poppler poppler --cutoff=1 
--exclude:system --include:module --include:local
+ Generated on 2025-02-25 16:55:58 using:
+ ./bin/update_pch ./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 
./../master/external/poppler/inc/pch/precompiled_poppler.hxx "make 
../master/external/poppler.build" --find-conflicts
+ ./bin/update_pch_bisect ././external/poppler/inc/pch/precompiled_poppler.hxx 
"make ./external/poppler.build" --find-conflicts
 */
 
 #include <sal/config.h>
@@ -56,10 +56,10 @@
 #include <cstdlib>
 #include <cstring>
 #include <ctime>
+#include <filesystem>
 #include <functional>
 #include <gbase64.h>
 #include <gbasename.h>
-#include <gdir.h>
 #include <gfile.h>
 #include <glibc.h>
 #include <gmem.h>
@@ -73,7 +73,6 @@
 #include <optional>
 #include <poppler-config.h>
 #include <random>
-#include <ranges>
 #include <regex>
 #include <set>
 #include <sstream>
@@ -96,7 +95,6 @@
 #include <goo/JpegWriter.h>
 #include <goo/PNGWriter.h>
 #include <goo/TiffWriter.h>
-#include <goo/gdir.h>
 #include <goo/gfile.h>
 #include <goo/glibc.h>
 #include <goo/gmem.h>
diff --git a/external/poppler/pch.patch.0 b/external/poppler/pch.patch.0
deleted file mode 100644
index 9ffeeb8421f5..000000000000
--- a/external/poppler/pch.patch.0
+++ /dev/null
@@ -1,11 +0,0 @@
---- ./goo/gdir.h.sav   2021-01-02 17:54:42.000000000 +0100
-+++ ./goo/gdir.h       2021-11-03 15:16:04.306277081 +0100
-@@ -37,6 +37,8 @@
- 
- #include <memory>
- 
-+#include "gfile.h"
-+
- class GooString;
- 
- #if defined(_WIN32)
commit d79c74a2729e3f402688cfb50aaad4d6c8936b8e
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Jan 9 17:50:53 2025 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Apr 25 17:42:15 2025 +0200

    poppler: try to patch out all uses of std::ranges
    
    Cloph reports it is not supported by macOS baseline XCode 14.2
    
    Change-Id: I70a2e4c3ffd91c1a41123d1fa4d371406b300cba
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180026
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Tested-by: Jenkins
    (cherry picked from commit 670e3fe7358dc69d80ed25b178cc7a2d3c76f0ee)

diff --git a/external/poppler/clang-std-ranges.patch.1 
b/external/poppler/clang-std-ranges.patch.1
index 3fae66b25fcf..0ba895cf1024 100644
--- a/external/poppler/clang-std-ranges.patch.1
+++ b/external/poppler/clang-std-ranges.patch.1
@@ -120,3 +120,298 @@ In file included from 
/opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linu
                      if (std::distance(m_values.rbegin(), lastDifferent) >= 3) 
{
                          savedValues.push_back(m_values.back());
                          m_values.pop_back();
+--- poppler/poppler/Dict.cc.orig       2025-01-09 17:07:59.770799229 +0100
++++ poppler/poppler/Dict.cc    2025-01-09 17:04:28.369931616 +0100
+@@ -113,14 +113,22 @@
+             if (!sorted) {
+                 Dict *that = const_cast<Dict *>(this);
+ 
++#ifndef __clang__
+                 std::ranges::sort(that->entries, CmpDictEntry {});
++#else
++                std::sort(that->entries.begin(), that->entries.end(), 
CmpDictEntry {});
++#endif
+                 that->sorted = true;
+             }
+         }
+     }
+ 
+     if (sorted) {
++#ifndef __clang__
+         const auto pos = std::ranges::lower_bound(entries, key, std::less<> 
{}, &DictEntry::first);
++#else
++        const auto pos = std::lower_bound(entries.begin(), entries.end(), 
key, CmpDictEntry {});
++#endif
+         if (pos != entries.end() && pos->first == key) {
+             return &*pos;
+         }
+--- poppler/poppler/GlobalParams.cc.orig       2025-01-02 01:28:08.000000000 
+0100
++++ poppler/poppler/GlobalParams.cc    2025-01-09 17:13:51.367905376 +0100
+@@ -366,7 +366,11 @@
+     for (const SysFontInfo *f : fonts) {
+         fi = f;
+         if (fi->match(name2, bold, italic, oblique, fixedWidth)) {
++#ifndef __clang__
+             if (std::ranges::find(filesToIgnore, fi->path->toStr()) == 
filesToIgnore.end()) {
++#else
++            if (std::find(filesToIgnore.begin(), filesToIgnore.end(), 
fi->path->toStr()) == filesToIgnore.end()) {
++#endif
+                 break;
+             }
+         }
+@@ -377,7 +381,11 @@
+         for (const SysFontInfo *f : fonts) {
+             fi = f;
+             if (fi->match(name2, false, italic)) {
++#ifndef __clang__
+                 if (std::ranges::find(filesToIgnore, fi->path->toStr()) == 
filesToIgnore.end()) {
++#else
++                if (std::find(filesToIgnore.begin(), filesToIgnore.end(), 
fi->path->toStr()) == filesToIgnore.end()) {
++#endif
+                     break;
+                 }
+             }
+@@ -389,7 +397,11 @@
+         for (const SysFontInfo *f : fonts) {
+             fi = f;
+             if (fi->match(name2, false, false)) {
++#ifndef __clang__
+                 if (std::ranges::find(filesToIgnore, fi->path->toStr()) == 
filesToIgnore.end()) {
++#else
++                if (std::find(filesToIgnore.begin(), filesToIgnore.end(), 
fi->path->toStr()) == filesToIgnore.end()) {
++#endif
+                     break;
+                 }
+             }
+@@ -737,7 +749,11 @@
+ 
+     // remove the - from the names, for some reason, Fontconfig does not
+     // understand "MS-Mincho" but does with "MS Mincho"
++#ifndef __clang__
+     std::ranges::replace(fontName, '-', ' ');
++#else
++    std::replace(fontName.begin(), fontName.end(), '-', ' ');
++#endif
+ 
+     size_t start = std::string::npos;
+     findModifier(fontName, modStart, "Regular", start);
+@@ -1120,7 +1136,11 @@
+                     FcPatternGetInteger(fontSet->fonts[i], FC_INDEX, 0, 
&faceIndex);
+ 
+                     const std::string sFilePath = reinterpret_cast<char 
*>(fcFilePath);
++#ifndef __clang__
+                     if (std::ranges::find(filesToIgnore, sFilePath) == 
filesToIgnore.end()) {
++#else
++                    if (std::find(filesToIgnore.begin(), filesToIgnore.end(), 
sFilePath) == filesToIgnore.end()) {
++#endif
+                         return FamilyStyleFontSearchResult(sFilePath, 
faceIndex);
+                     }
+                 }
+--- poppler/poppler/Catalog.cc.orig    2025-01-09 17:19:48.592089218 +0100
++++ poppler/poppler/Catalog.cc 2025-01-09 17:19:36.361030948 +0100
+@@ -705,7 +705,11 @@
+     RefRecursionChecker seen;
+     parse(tree, seen);
+     if (!entries.empty()) {
++#ifndef __clang__
+         std::ranges::sort(entries, [](const auto &first, const auto &second) 
{ return first->name.cmp(&second->name) < 0; });
++#else
++        std::sort(entries.begin(), entries.end(), [](const auto &first, const 
auto &second) { return first->name.cmp(&second->name) < 0; });
++#endif
+     }
+ }
+ 
+@@ -754,7 +758,11 @@
+ 
+ Object NameTree::lookup(const GooString *name)
+ {
++#ifndef __clang__
+     auto entry = std::ranges::lower_bound(entries, name, 
EntryGooStringComparer {});
++#else
++    auto entry = std::lower_bound(entries.begin(), entries.end(), name, 
[](const auto &element, const GooString *n) { return element->name.cmp(n) < 0; 
});
++#endif
+ 
+     if (entry != entries.end() && (*entry)->name.cmp(name) == 0) {
+         return (*entry)->value.fetch(xref);
+--- poppler/poppler/GfxFont.cc.orig2   2025-01-09 17:26:15.227421640 +0100
++++ poppler/poppler/GfxFont.cc 2025-01-09 17:27:06.930929833 +0100
+@@ -1868,7 +1868,11 @@
+                 ++i;
+             }
+         }
++#ifndef __clang__
+         std::ranges::sort(widths.exceps, cmpWidthExcepFunctor());
++#else
++        std::sort(widths.exceps.begin(), widths.exceps.end(), 
cmpWidthExcepFunctor());
++#endif
+     }
+ 
+     // default metrics for vertical font
+@@ -1916,7 +1920,11 @@
+                 ++i;
+             }
+         }
++#ifndef __clang__
+         std::ranges::sort(widths.excepsV, cmpWidthExcepVFunctor());
++#else
++        std::sort(widths.excepsV.begin(), widths.excepsV.end(), 
cmpWidthExcepVFunctor());
++#endif
+     }
+ 
+     ok = true;
+--- poppler/poppler/Gfx.cc.orig        2025-01-09 17:31:05.423273919 +0100
++++ poppler/poppler/Gfx.cc     2025-01-09 17:31:07.340292763 +0100
+@@ -2545,7 +2545,11 @@
+         bboxIntersections[1] = ((xMin - x0) * dx + (yMax - y0) * dy) * mul;
+         bboxIntersections[2] = ((xMax - x0) * dx + (yMin - y0) * dy) * mul;
+         bboxIntersections[3] = ((xMax - x0) * dx + (yMax - y0) * dy) * mul;
++#ifndef __clang__
+         std::ranges::sort(bboxIntersections);
++#else
++        std::sort(std::begin(bboxIntersections), std::end(bboxIntersections));
++#endif
+         tMin = bboxIntersections[0];
+         tMax = bboxIntersections[3];
+         if (tMin < 0 && !shading->getExtend0()) {
+@@ -2646,7 +2650,11 @@
+         s[1] = (yMax - ty) / dx;
+         s[2] = (xMin - tx) / -dy;
+         s[3] = (xMax - tx) / -dy;
++#ifndef __clang__
+         std::ranges::sort(s);
++#else
++        std::sort(std::begin(s), std::end(s));
++#endif
+         sMin = s[1];
+         sMax = s[2];
+     }
+@@ -2787,7 +2795,11 @@
+             s[1] = (yMax - ty) / dx;
+             s[2] = (xMin - tx) / -dy;
+             s[3] = (xMax - tx) / -dy;
++#ifndef __clang__
+             std::ranges::sort(s);
++#else
++            std::sort(std::begin(s), std::end(s));
++#endif
+             sMin = s[1];
+             sMax = s[2];
+         }
+--- poppler/poppler/TextOutputDev.cc.orig      2025-01-09 17:37:28.163110149 
+0100
++++ poppler/poppler/TextOutputDev.cc   2025-01-09 17:36:48.827864411 +0100
+@@ -4574,7 +4574,11 @@
+     if (!words.empty()) {
+         // Reverse word order for RTL text. Fixes #53 for glib backend 
(Evince)
+         if (!page->primaryLR) {
++#ifndef __clang__
+             std::ranges::reverse(words);
++#else
++            std::reverse(words.begin(), words.end());
++#endif
+         }
+ 
+         lines.push_back(std::move(words));
+@@ -5456,7 +5460,11 @@
+         for (word = rawWords; word; word = word->next) {
+             s.clear();
+             uText.resize(word->len());
++#ifndef __clang__
+             std::ranges::transform(word->chars, uText.begin(), [](auto &c) { 
return c.text; });
++#else
++            std::transform(word->chars.begin(), word->chars.end(), 
uText.begin(), [](auto &c) { return c.text; });
++#endif
+             dumpFragment(uText.data(), uText.size(), uMap, &s);
+             (*outputFunc)(outputStream, s.c_str(), s.getLength());
+ 
+--- poppler/poppler/PDFDoc.cc.orig     2025-01-09 17:38:49.498598893 +0100
++++ poppler/poppler/PDFDoc.cc  2025-01-09 17:38:22.459449316 +0100
+@@ -596,7 +596,11 @@
+                 if (fw->getType() == formSignature) {
+                     assert(fw->getField()->getType() == formSignature);
+                     FormFieldSignature *ffs = static_cast<FormFieldSignature 
*>(fw->getField());
++#ifndef __clang__
+                     if (std::ranges::find(res, ffs) == res.end()) {
++#else
++                    if (std::find(res.begin(), res.end(), ffs) == res.end()) {
++#endif
+                         res.push_back(ffs);
+                     }
+                 }
+--- poppler/poppler/Annot.cc.orig      2025-01-09 17:40:31.125125064 +0100
++++ poppler/poppler/Annot.cc   2025-01-09 17:40:14.021036519 +0100
+@@ -7499,7 +7499,11 @@
+ 
+ bool Annots::removeAnnot(Annot *annot)
+ {
++#ifndef __clang__
+     auto idx = std::ranges::find(annots, annot);
++#else
++    auto idx = std::find(annots.begin(), annots.end(), annot);
++#endif
+ 
+     if (idx == annots.end()) {
+         return false;
+--- poppler/poppler/Dict.cc.orig       2025-01-09 18:35:56.796874707 +0100
++++ poppler/poppler/Dict.cc    2025-01-09 18:36:22.159050403 +0100
+@@ -32,7 +32,9 @@
+ #include <config.h>
+ 
+ #include <algorithm>
++#ifndef __clang__
+ #include <ranges>
++#endif
+ 
+ #include "XRef.h"
+ #include "Dict.h"
+--- poppler/poppler/CIDFontsWidthsBuilder.h.orig       2025-01-09 
18:37:58.541718087 +0100
++++ poppler/poppler/CIDFontsWidthsBuilder.h    2025-01-09 18:38:02.766747356 
+0100
+@@ -15,7 +15,9 @@
+ #include <vector>
+ #include <variant>
+ #include <algorithm>
++#ifndef __clang__
+ #include <ranges>
++#endif
+ #include <cassert>
+ 
+ /** Class to help build the widths array as defined in
+--- poppler/splash/SplashFontEngine.cc.orig2   2025-01-13 13:54:15.234884955 
+0100
++++ poppler/splash/SplashFontEngine.cc 2025-01-13 13:55:16.961211421 +0100
+@@ -52,7 +52,11 @@
+ 
+ SplashFontEngine::SplashFontEngine(bool enableFreeType, bool 
enableFreeTypeHinting, bool enableSlightHinting, bool aa)
+ {
++#ifndef __clang__
+     std::ranges::fill(fontCache, nullptr);
++#else
++    std::fill(fontCache.begin(), fontCache.end(), nullptr);
++#endif
+ 
+     if (enableFreeType) {
+         ftEngine = SplashFTFontEngine::init(aa, enableFreeTypeHinting, 
enableSlightHinting);
+@@ -230,7 +234,11 @@
+     }
+ 
+     // Try to find the font in the cache
++#ifndef __clang__
+     auto fontIt = std::ranges::find_if(fontCache, [&](const SplashFont *font) 
{ return font && font->matches(fontFile, mat, textMat); });
++#else
++    auto fontIt = std::find_if(fontCache.begin(), fontCache.end(), [&](const 
SplashFont *font) { return font && font->matches(fontFile, mat, textMat); });
++#endif
+ 
+     // The requested font has been found in the cache
+     if (fontIt != fontCache.end()) {
+--- poppler/splash/SplashXPathScanner.cc.orig2 2025-01-13 13:56:58.560748715 
+0100
++++ poppler/splash/SplashXPathScanner.cc       2025-01-13 13:56:12.643505904 
+0100
+@@ -318,7 +318,11 @@
+         }
+     }
+     for (auto &line : allIntersections) {
++#ifndef __clang__
+         std::ranges::sort(line, [](const SplashIntersect i0, const 
SplashIntersect i1) { return i0.x0 < i1.x0; });
++#else
++        std::sort(line.begin(), line.end(), [](const SplashIntersect i0, 
const SplashIntersect i1) { return i0.x0 < i1.x0; });
++#endif
+     }
+ }
+ 

Reply via email to