avmedia/source/viewer/mediawindow_impl.cxx                                     
           |   13 
 configure.ac                                                                   
           |    4 
 desktop/source/app/cmdlineargs.cxx                                             
           |    2 
 download.lst                                                                   
           |   24 
 editeng/source/items/frmitems.cxx                                              
           |    9 
 embeddedobj/source/commonembedding/persistence.cxx                             
           |   17 
 external/curl/configurable-z-option.patch.0                                    
           |    2 
 external/curl/curl-msvc-disable-protocols.patch.1                              
           |    6 
 external/curl/curl-msvc.patch.1                                                
           |   18 
 external/curl/zlib.patch.0                                                     
           |   40 
 external/poppler/StaticLibrary_poppler.mk                                      
           |    2 
 external/poppler/UnpackedTarball_poppler.mk                                    
           |    3 
 external/poppler/char_traits.patch                                             
           |   11 
 external/poppler/clang-std-ranges.patch.1                                      
           |  122 ++
 external/poppler/disable-freetype.patch.1                                      
           |   11 
 external/poppler/disable-nss-and-gpgmepp.patch.1                               
           |   76 -
 external/poppler/inc/pch/precompiled_poppler.hxx                               
           |   26 
 external/poppler/poppler-config.patch.1                                        
           |   26 
 external/redland/ExternalProject_raptor.mk                                     
           |   19 
 external/redland/ExternalProject_redland.mk                                    
           |    6 
 external/redland/Library_raptor.mk                                             
           |    2 
 external/redland/README                                                        
           |    2 
 external/redland/UnpackedTarball_raptor.mk                                     
           |    6 
 external/redland/UnpackedTarball_redland.mk                                    
           |    1 
 
external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1
 |   33 
 
external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1
 |   43 
 external/redland/raptor/CVE-2024-57823.patch.1                                 
           |   35 
 external/redland/raptor/Wint-conversion.patch                                  
           |   22 
 external/redland/raptor/libtool.patch                                          
           |   27 
 external/redland/raptor/raptor-android.patch.1                                 
           |   10 
 external/redland/raptor/raptor-bundled-soname.patch.1                          
           |   12 
 external/redland/raptor/raptor-emscripten.patch.1                              
           |    8 
 external/redland/raptor/raptor-freebsd.patch.1                                 
           |   31 
 external/redland/raptor/raptor-icu.patch                                       
           |   11 
 external/redland/raptor/raptor-msvc.patch.1                                    
           |   10 
 external/redland/raptor/raptor2.h                                              
           |   32 
 external/redland/raptor/raptor_config.h                                        
           |   46 -
 external/redland/raptor/ubsan.patch                                            
           |   14 
 external/redland/raptor/xml2-config.patch                                      
           |    6 
 external/redland/rasqal/rasqal-pkgconfig.patch.1                               
           |    3 
 external/redland/redland/ubsan.patch                                           
           |   11 
 forms/source/component/ImageControl.cxx                                        
           |    7 
 forms/source/component/clickableimage.cxx                                      
           |   11 
 include/toolkit/controls/unocontrols.hxx                                       
           |    2 
 package/CppunitTest_package2_test.mk                                           
           |    3 
 package/inc/ZipFile.hxx                                                        
           |   12 
 package/qa/cppunit/data/casing.docx                                            
           |binary
 package/qa/cppunit/data/dd-deflated.docx                                       
           |binary
 package/qa/cppunit/data/dd-stored.docx                                         
           |binary
 package/qa/cppunit/data/dot-slash.docx                                         
           |binary
 package/qa/cppunit/data/duplicate-files.odt                                    
           |binary
 package/qa/cppunit/data/inner-gap.docx                                         
           |binary
 package/qa/cppunit/data/overlap.docx                                           
           |binary
 package/qa/cppunit/data/pass/no_usb_2024-11-06.xlsx                            
           |binary
 package/qa/cppunit/data/slash.odt                                              
           |binary
 package/qa/cppunit/data/tdf163341.ods                                          
           |binary
 package/qa/cppunit/data/tdf163364.ods                                          
           |binary
 package/qa/cppunit/data/tdf163818.odg                                          
           |binary
 package/qa/cppunit/data/two-zips.docx                                          
           |binary
 package/qa/cppunit/data/two-zips.odt                                           
           |binary
 package/qa/cppunit/data/unicode-path.docx                                      
           |binary
 package/qa/cppunit/data/unicode-path.odt                                       
           |binary
 package/qa/cppunit/data/zip64-eocd.docx                                        
           |binary
 package/qa/cppunit/test_zippackage.cxx                                         
           |  453 ++++++++++
 package/source/zipapi/XUnbufferedStream.cxx                                    
           |   17 
 package/source/zipapi/XUnbufferedStream.hxx                                    
           |    4 
 package/source/zipapi/ZipFile.cxx                                              
           |   92 +-
 package/source/zipapi/ZipOutputStream.cxx                                      
           |    3 
 package/source/zippackage/ZipPackage.cxx                                       
           |   20 
 package/source/zippackage/ZipPackageStream.cxx                                 
           |   70 +
 package/source/zippackage/zipfileaccess.cxx                                    
           |    4 
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx                          
           |    5 
 sfx2/source/appl/linkmgr2.cxx                                                  
           |    5 
 shell/Library_syssh.mk                                                         
           |    4 
 shell/source/win32/SysShExec.cxx                                               
           |    9 
 sw/source/filter/html/htmlgrin.cxx                                             
           |    3 
 toolkit/inc/helper/property.hxx                                                
           |    1 
 toolkit/source/awt/vclxwindows.cxx                                             
           |    1 
 toolkit/source/controls/dialogcontrol.cxx                                      
           |    4 
 toolkit/source/controls/unocontrols.cxx                                        
           |   14 
 toolkit/source/helper/property.cxx                                             
           |    2 
 tools/qa/cppunit/test_urlobj.cxx                                               
           |   44 
 tools/source/fsys/urlobj.cxx                                                   
           |   31 
 unotools/source/misc/mediadescriptor.cxx                                       
           |    4 
 vcl/source/filter/graphicfilter.cxx                                            
           |    8 
 vcl/source/gdi/embeddedfontshelper.cxx                                         
           |   16 
 xmloff/source/forms/elementimport.cxx                                          
           |    9 
 xmlsecurity/CppunitTest_xmlsecurity_signing.mk                                 
           |    1 
 xmlsecurity/qa/unit/signing/data/signature-forgery-cdh-lfh.docx                
           |binary
 xmlsecurity/qa/unit/signing/signing.cxx                                        
           |   27 
 90 files changed, 1188 insertions(+), 500 deletions(-)

New commits:
commit db421b3eb7ef8f11472a172c7b9420e3c955ae7b
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Wed Jul 10 11:19:36 2024 +0200
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:42:46 2025 +0100

    Fix UBSan build of ExternalProject_redland
    
    ...after c75c21eef670fce33eb5a501357935dbd25be923 "Upgrade raptor to 
2.0.16",
    where it now started to fail with
    
    > libtool: link: LD_RUN_PATH="/usr/local/lib:" /usr/bin/ccache 
/home/tdf/lode/opt_private/clang-llvmorg-12.0.1/bin/clang 
--gcc-toolchain=/opt/rh/gcc-toolset-12/root/usr -fsanitize=address 
-fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds 
-fsanitize-blacklist=/home/tdf/lode/jenkins/workspace/lo_ubsan/sanitize-ubsan-excludelist
 -fno-sanitize=function -DLIBRDF_INTERNAL=1 -O0 -Wp,-U_FORTIFY_SOURCE 
-fstrict-aliasing -fstrict-overflow -ggdb2 -gsplit-dwarf -Xclang 
-debug-info-kind=constructor -Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN 
-Wl,-rpath-link -Wl,/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program 
-Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN -Wl,-rpath-link 
-Wl,/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program -o 
.libs/redland-db-upgrade db_upgrade.o  
-L/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/raptor/src/.libs
 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so
 -L/home/tdf/
 lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/libxml2/.libs 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/libxml2/.libs/libxml2.so
 
-L/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/rasqal/src/.libs
 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/rasqal/src/.libs/librasqal.so
 ../src/.libs/librdf.so
    > /opt/rh/gcc-toolset-12/root/usr/bin/ld: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libicuuc.so.74: 
undefined reference to `__ubsan_vptr_type_cache'
    > /opt/rh/gcc-toolset-12/root/usr/bin/ld: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libicuuc.so.74: 
undefined reference to `__ubsan_handle_function_type_mismatch_v1'
    > /opt/rh/gcc-toolset-12/root/usr/bin/ld: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libicuuc.so.74: 
undefined reference to `__ubsan_handle_dynamic_type_cache_miss'
    > clang-12: error: linker command failed with exit code 1 (use -v to see 
invocation)
    > make[3]: *** [Makefile:489: redland-db-upgrade] Error 1
    
    (<https://ci.libreoffice.org/job/lo_ubsan/3239/>) because $(CC) is used to 
link
    a (nominally C-only) executable that links against C++ ICU shared libraries 
that
    in turn require a C++-specific UBSan library to be linked in.  So just use
    $(CXX) for linking instead.
    
    Change-Id: If7c61c6ee7e1b43965a928b1560f8ab4ae2b0603
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170277
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>
    (cherry picked from commit b3300387f2e14ea59c70db513a8f6eda6fe17afa)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173793
    Tested-by: Stephan Bergmann <[email protected]>

diff --git a/external/redland/UnpackedTarball_redland.mk 
b/external/redland/UnpackedTarball_redland.mk
index 66e766d20fee..31ebcb8f2f0a 100644
--- a/external/redland/UnpackedTarball_redland.mk
+++ b/external/redland/UnpackedTarball_redland.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,redland,\
        external/redland/redland/rpath.patch \
        external/redland/redland/clang-cl.patch \
        external/redland/redland/libtool.patch \
+       external/redland/redland/ubsan.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/redland/redland/ubsan.patch 
b/external/redland/redland/ubsan.patch
new file mode 100644
index 000000000000..8226258ea38b
--- /dev/null
+++ b/external/redland/redland/ubsan.patch
@@ -0,0 +1,11 @@
+--- utils/Makefile.in
++++ utils/Makefile.in
+@@ -106,7 +106,7 @@
+ AM_V_at = $(am__v_at_@AM_V@)
+ am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+ am__v_at_0 = @
+-CCLD = $(CC)
++CCLD = $(CXX)
+ LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+       $(AM_LDFLAGS) $(LDFLAGS) -o $@
commit 50fd1637e8e6ceee8237fff76f07d4437634a14e
Author:     Michael Stahl <[email protected]>
AuthorDate: Tue Jan 7 18:42:29 2025 +0100
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:41:40 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 ) 
};
commit 297ff3192f1681621336adf980d3005681105c40
Author:     Caolán McNamara <[email protected]>
AuthorDate: Thu Jan 30 20:37:38 2025 +0000
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:37:40 2025 +0100

    Filter out more unwanted command URIs
    
    Change-Id: I24c95d73b4fee89bdf044d5dd6efc9cd89627c54
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181016
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit 7105fb698f897ddb38bd60315444c07356689e14)

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 3a3f876f6e90..331e3d309619 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -166,7 +166,7 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& arg, 
CommandLineEvent cur
     if (nURIlen < 0)
         nURIlen = rest2.getLength();
     auto const uri = rest2.subView(0, nURIlen);
-    if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) {
+    if (INetURLObject(uri).IsExoticProtocol()) {
         // Let the "Open" machinery process the full command URI (leading to 
failure, by intention,
         // as the "Open" machinery does not know about those command URI 
schemes):
         curEvt = CommandLineEvent::Open;
commit 780b8bde2cd5a0550eb4a2b35193cf1c6bab7583
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Jan 7 08:59:25 2025 +0000
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:37:34 2025 +0100

    check if non-file uris could be interpreted as a file system pathname
    
    Change-Id: If283bec44ad1d648c68a5d0f028855e09c09017e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179868
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit 400970acf4241632d084f66275161fc4b4ac1b21)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179990
    Reviewed-by: Christian Lohmaier <[email protected]>
    (cherry picked from commit df54e1e3532584ee11c6ebb54a35302a5c5f6201)

diff --git a/shell/Library_syssh.mk b/shell/Library_syssh.mk
index 72ff73842dc3..27657c4456aa 100644
--- a/shell/Library_syssh.mk
+++ b/shell/Library_syssh.mk
@@ -25,6 +25,10 @@ $(eval $(call gb_Library_use_system_win32_libs,syssh,\
        shell32 \
 ))
 
+$(eval $(call gb_Library_use_libraries,syssh,\
+       tl \
+))
+
 $(eval $(call 
gb_Library_set_componentfile,syssh,shell/source/win32/syssh,services))
 
 $(eval $(call gb_Library_add_exception_objects,syssh,\
diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index 57e59f96b6f0..41c9fd3be7fe 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -38,6 +38,7 @@
 #include <o3tl/runtimetooustring.hxx>
 #include <o3tl/safeCoInitUninit.hxx>
 #include <o3tl/string_view.hxx>
+#include <tools/urlobj.hxx>
 
 #include <prewin.h>
 #include <Shlobj.h>
@@ -360,6 +361,14 @@ void SAL_CALL CSysShExec::execute( const OUString& 
aCommand, const OUString& aPa
                     }
                 }
             }
+        } else {
+            // Filter out input that technically is a non-file URI, but could 
be interpreted by
+            // ShellExecuteExW as a file system pathname.
+            if (INetURLObject(aCommand, INetProtocol::File).GetProtocol() == 
INetProtocol::File) {
+                throw css::lang::IllegalArgumentException(
+                    "XSystemShellExecute.execute URIS_ONLY with non-URI 
pathname " + aCommand,
+                    getXWeak(), 0);
+            }
         }
     }
 
commit 9f59151db303eb2ae2d1940dd2a7f872a3c206af
Author:     Michael Stahl <[email protected]>
AuthorDate: Wed Jan 15 10:55:05 2025 +0100
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:37:24 2025 +0100

    redland: disable all raptor parsers except for "rdfxml"
    
    It's the only one the unordf component invokes.
    
    CVE-2024-57823 CVE-2024-57822 affect the "ntriples" and "turtle"
    parsers.
    
    However it appears that the function raptor_uri_normalize_path() could
    also be called from raptor_libxml_* functions?  Somewhat unclear, let's
    add the patch just in case.
    
    Change-Id: Idd7ebbc29c63e84ca2434b06c26f7aca34bdcaa5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180272
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit 2b50dc0e4482ac0ad27d69147b4175e05af4fba4)

diff --git a/external/redland/ExternalProject_raptor.mk 
b/external/redland/ExternalProject_raptor.mk
index 8b800f76eea0..944f7e0b40d4 100644
--- a/external/redland/ExternalProject_raptor.mk
+++ b/external/redland/ExternalProject_raptor.mk
@@ -36,7 +36,7 @@ $(call gb_ExternalProject_get_state_target,raptor,build):
                    $(if $(SYSBASE),$(if $(filter LINUX 
SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl)))' \
                CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include) 
$(gb_EMSCRIPTEN_CPPFLAGS)" \
                $(gb_RUN_CONFIGURE) ./configure --disable-gtk-doc \
-                       --enable-parsers="rdfxml ntriples turtle trig guess 
rss-tag-soup" \
+                       --enable-parsers="rdfxml" \
                        --without-www \
                        --without-xslt-config \
                        $(gb_CONFIGURE_PLATFORMS) \
diff --git a/external/redland/UnpackedTarball_raptor.mk 
b/external/redland/UnpackedTarball_raptor.mk
index 6dc6491132df..dddfb4ba7923 100644
--- a/external/redland/UnpackedTarball_raptor.mk
+++ b/external/redland/UnpackedTarball_raptor.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,raptor,\
        external/redland/raptor/xml2-config.patch \
        external/redland/raptor/raptor-libxml2-11.patch.1 \
        $(if $(SYSTEM_ICU),,external/redland/raptor/raptor-icu.patch) \
+       external/redland/raptor/CVE-2024-57823.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/redland/raptor/CVE-2024-57823.patch.1 
b/external/redland/raptor/CVE-2024-57823.patch.1
new file mode 100644
index 000000000000..b06689304b0a
--- /dev/null
+++ b/external/redland/raptor/CVE-2024-57823.patch.1
@@ -0,0 +1,35 @@
+--- raptor2-2.0.15/src/raptor_rfc2396.c.CVE-2024-57823 2014-07-26 
23:07:37.000000000 +0200
++++ raptor2-2.0.15/src/raptor_rfc2396.c        2025-01-13 12:59:22.175568228 
+0100
+@@ -289,10 +289,8 @@ raptor_uri_normalize_path(unsigned char*
+   }
+ 
+   
+-#if defined(RAPTOR_DEBUG)
+   if(path_len != strlen((const char*)path_buffer))
+     RAPTOR_FATAL4("Path '%s' length %ld does not match calculated %ld.", 
(const char*)path_buffer, (long)strlen((const char*)path_buffer), 
(long)path_len);
+-#endif
+     
+   /* Remove all "<component>/../" path components */
+ 
+@@ -327,10 +325,8 @@ raptor_uri_normalize_path(unsigned char*
+     if(!prev || !cur)
+       continue;
+ 
+-#if defined(RAPTOR_DEBUG)
+     if(path_len != strlen((const char*)path_buffer))
+       RAPTOR_FATAL3("Path length %ld does not match calculated %ld.", 
(long)strlen((const char*)path_buffer), (long)path_len);
+-#endif
+     
+     /* If the current one is '..' */
+     if(s == (cur+2) && cur[0] == '.' && cur[1] == '.') {
+@@ -393,10 +389,8 @@ raptor_uri_normalize_path(unsigned char*
+   }
+ 
+ 
+-#if defined(RAPTOR_DEBUG)
+   if(path_len != strlen((const char*)path_buffer))
+     RAPTOR_FATAL3("Path length %ld does not match calculated %ld.", 
(long)strlen((const char*)path_buffer), (long)path_len);
+-#endif
+ 
+   /* RFC3986 Appendix C.2 / 5.4.2 Abnormal Examples
+    * Remove leading /../ and /./ 
commit ee0917a4bdc405c91f57055eb724e7041203ce90
Author:     Xisco Fauli <[email protected]>
AuthorDate: Wed Jul 3 14:08:47 2024 +0200
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:37:24 2025 +0100

    raptor: Use --without-www
    
    it seems not used. Besides, it fails when upgrading
    to libxml2 2.13.
    See https://gerrit.libreoffice.org/c/core/+/169327
    
    Change-Id: If383130eac3b5d6de911c4c273c8e371a4980f23
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169933
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit 25b37b4c8c8c5aef7cd530d919258bd8e5dce068)

diff --git a/external/redland/ExternalProject_raptor.mk 
b/external/redland/ExternalProject_raptor.mk
index deff4f8dce4b..8b800f76eea0 100644
--- a/external/redland/ExternalProject_raptor.mk
+++ b/external/redland/ExternalProject_raptor.mk
@@ -36,8 +36,8 @@ $(call gb_ExternalProject_get_state_target,raptor,build):
                    $(if $(SYSBASE),$(if $(filter LINUX 
SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl)))' \
                CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include) 
$(gb_EMSCRIPTEN_CPPFLAGS)" \
                $(gb_RUN_CONFIGURE) ./configure --disable-gtk-doc \
-                        --enable-parsers="rdfxml ntriples turtle trig guess 
rss-tag-soup" \
-                       --with-www=xml \
+                       --enable-parsers="rdfxml ntriples turtle trig guess 
rss-tag-soup" \
+                       --without-www \
                        --without-xslt-config \
                        $(gb_CONFIGURE_PLATFORMS) \
                        $(if $(CROSS_COMPILING),$(if $(filter INTEL 
ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \
commit 6232f4b4443bf0ecfa9cf9ab5445eb42bca15a00
Author:     Christian Lohmaier <[email protected]>
AuthorDate: Wed Jul 17 13:38:22 2024 +0200
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:37:24 2025 +0100

    fix raptor build when using system-icu
    
    Change-Id: I1671e5872deb583c1c0395ab49ab33b171d0e086
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170620
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <[email protected]>
    (cherry picked from commit c1b00424f17eaea8f55565dae285521c1ec4d042)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174003
    Tested-by: Stephan Bergmann <[email protected]>
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/external/redland/ExternalProject_raptor.mk 
b/external/redland/ExternalProject_raptor.mk
index 02085cee5684..deff4f8dce4b 100644
--- a/external/redland/ExternalProject_raptor.mk
+++ b/external/redland/ExternalProject_raptor.mk
@@ -14,7 +14,9 @@ $(eval $(call gb_ExternalProject_use_externals,raptor,\
        libxml2 \
 ))
 
+ifeq ($(SYSTEM_ICU),)
 $(eval $(call gb_ExternalProject_use_package,raptor,icu_ure))
+endif
 
 $(eval $(call gb_ExternalProject_register_targets,raptor,\
        build \
commit 1931919866162e0c2191eee13d73f756a1203300
Author:     Taichi haradaguchi <[email protected]>
AuthorDate: Sat Jan 6 14:49:07 2024 +0900
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:37:24 2025 +0100

    Upgrade raptor to 2.0.16
    
    - Fixes CVE-2017-18926 and CVE-2020-25713.
    - drop 0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1:
      merged upstream
    - drop 0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1:
      merged upstream
    - drop libtool.patch: merged upstream
    - drop most of raptor-freebsd.patch.1: merged upstream
    - drop most of raptor-msvc.patch.1: merged upsttream
    - drop most of ubsan.patch: merged upstream
    - drop Wint-conversion.patch: merged upstream
    
    depend on package icu_ure to have libicuuc delivered and add corresponding
    directory to rpath-link to make sure the right copy is picked up
    use $(strip ...) in LDFLAGS to avoid having to escape , with $(COMMA)
    
    (cherry-picked from c75c21eef670fce33eb5a501357935dbd25be923)
    
    Change-Id: Ic05269ade5dae3761d98432ee504a51434a4c753
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161704
    Reviewed-by: Christian Lohmaier <[email protected]>
    Tested-by: Jenkins

diff --git a/configure.ac b/configure.ac
index 500e26b0ff32..7b9d68d480c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10857,7 +10857,7 @@ dnl 
===================================================================
 ICU_MAJOR=73
 ICU_MINOR=2
 ICU_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/icu/source/i18n 
-I${WORKDIR}/UnpackedTarball/icu/source/common"
-ICU_LIBS_internal="-L${WORKDIR}/UnpackedTarball/icu/source/lib"
+ICU_LIBS_internal="-L${WORKDIR}/UnpackedTarball/icu/source/lib -licuuc"
 libo_CHECK_SYSTEM_MODULE([icu],[ICU],[icu-i18n >= 66])
 if test "$SYSTEM_ICU" = TRUE; then
     AC_LANG_PUSH([C++])
diff --git a/download.lst b/download.lst
index 32f80ea3a774..fa5de7dfb1c1 100644
--- a/download.lst
+++ b/download.lst
@@ -565,8 +565,8 @@ QXP_TARBALL := libqxp-0.0.2.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-RAPTOR_SHA256SUM := 
ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed
-RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz
+RAPTOR_SHA256SUM := 
089db78d7ac982354bdbf39d973baf09581e6904ac4c92a98c5caadb3de44680
+RAPTOR_TARBALL := raptor2-2.0.16.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/redland/ExternalProject_raptor.mk 
b/external/redland/ExternalProject_raptor.mk
index 74759c65be31..02085cee5684 100644
--- a/external/redland/ExternalProject_raptor.mk
+++ b/external/redland/ExternalProject_raptor.mk
@@ -9,7 +9,12 @@
 
 $(eval $(call gb_ExternalProject_ExternalProject,raptor))
 
-$(eval $(call gb_ExternalProject_use_external,raptor,libxml2))
+$(eval $(call gb_ExternalProject_use_externals,raptor,\
+       icu \
+       libxml2 \
+))
+
+$(eval $(call gb_ExternalProject_use_package,raptor,icu_ure))
 
 $(eval $(call gb_ExternalProject_register_targets,raptor,\
        build \
@@ -24,9 +29,9 @@ $(call gb_ExternalProject_get_state_target,raptor,build):
                        $(call gb_ExternalProject_get_build_flags,raptor) \
                        $(if $(filter 
TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden) \
                        $(if $(filter 
GCCLINUXPOWERPC64,$(COM)$(OS)$(CPUNAME)),-mminimal-toc)" \
-               LDFLAGS=" \
-                       $(if $(filter LINUX 
FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin 
-Wl$(COMMA)-rpath$(COMMA)\"\$$\$$ORIGIN") \
-                       $(if $(SYSBASE),$(if $(filter LINUX 
SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl))" \
+               LDFLAGS='$(strip \
+                   $(if $(filter LINUX FREEBSD,$(OS)),$(strip -Wl,-z,origin 
-Wl,-rpath,\$$$$ORIGIN -Wl,-rpath-link,$(INSTROOT)/$(LIBO_URE_LIB_FOLDER))) \
+                   $(if $(SYSBASE),$(if $(filter LINUX 
SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl)))' \
                CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include) 
$(gb_EMSCRIPTEN_CPPFLAGS)" \
                $(gb_RUN_CONFIGURE) ./configure --disable-gtk-doc \
                         --enable-parsers="rdfxml ntriples turtle trig guess 
rss-tag-soup" \
diff --git a/external/redland/ExternalProject_redland.mk 
b/external/redland/ExternalProject_redland.mk
index 0f7afa6d8182..238384a1a545 100644
--- a/external/redland/ExternalProject_redland.mk
+++ b/external/redland/ExternalProject_redland.mk
@@ -25,9 +25,9 @@ $(call gb_ExternalProject_get_state_target,redland,build):
        $(call gb_ExternalProject_run,build,\
                $(if $(filter -fsanitize=undefined,$(CC)),CC='$(CC) 
-fno-sanitize=function') \
                CFLAGS="$(CFLAGS) $(if $(filter 
TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden) $(call 
gb_ExternalProject_get_build_flags,redland) $(gb_EMSCRIPTEN_CPPFLAGS)" \
-               LDFLAGS=" \
-                       $(if $(filter LINUX 
FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin 
-Wl$(COMMA)-rpath$(COMMA)\"\$$\$$ORIGIN") \
-                       $(if $(SYSBASE),$(if $(filter LINUX 
SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl))" \
+               LDFLAGS='$(strip \
+                   $(if $(filter LINUX FREEBSD,$(OS)),$(strip -Wl,-z,origin 
-Wl,-rpath,\$$$$ORIGIN -Wl,-rpath-link,$(INSTROOT)/$(LIBO_URE_LIB_FOLDER))) \
+                   $(if $(SYSBASE),$(if $(filter LINUX 
SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl)))' \
                CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include)" \
                PKG_CONFIG="" \
                RAPTOR2_CFLAGS="-I$(call 
gb_UnpackedTarball_get_dir,raptor)/src" \
diff --git a/external/redland/Library_raptor.mk 
b/external/redland/Library_raptor.mk
index b2779f7dec17..9cfc4aeb36fc 100644
--- a/external/redland/Library_raptor.mk
+++ b/external/redland/Library_raptor.mk
@@ -17,6 +17,8 @@ $(eval $(call gb_Library_set_include,raptor2, \
 $(eval $(call gb_Library_use_unpacked,raptor2,raptor))
 
 $(eval $(call gb_Library_use_externals,raptor2,\
+       icu_headers \
+       icuuc \
        libxml2 \
        libxslt \
 ))
diff --git a/external/redland/README b/external/redland/README
index 591e93398726..efa6f45d71ba 100644
--- a/external/redland/README
+++ b/external/redland/README
@@ -1,4 +1,4 @@
-Redland RDF library (librdf) from [http://librdf.org/]
+Redland RDF library (librdf) from [https://librdf.org/]
 
 == License ==
 [git:redland/LICENSE.txt]
diff --git a/external/redland/UnpackedTarball_raptor.mk 
b/external/redland/UnpackedTarball_raptor.mk
index ae61e9e4f3dd..6dc6491132df 100644
--- a/external/redland/UnpackedTarball_raptor.mk
+++ b/external/redland/UnpackedTarball_raptor.mk
@@ -28,11 +28,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,raptor,\
        external/redland/raptor/ubsan.patch \
        $(if $(SYSTEM_LIBXML),,external/redland/raptor/rpath.patch) \
        external/redland/raptor/xml2-config.patch \
-       
external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1
 \
-       
external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1
 \
-       external/redland/raptor/libtool.patch \
-       external/redland/raptor/Wint-conversion.patch \
        external/redland/raptor/raptor-libxml2-11.patch.1 \
+       $(if $(SYSTEM_ICU),,external/redland/raptor/raptor-icu.patch) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git 
a/external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1
 
b/external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1
deleted file mode 100644
index 1fb279df3e4d..000000000000
--- 
a/external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1
+++ /dev/null
@@ -1,33 +0,0 @@
-From a549457461874157c8c8e8e8a6e0eec06da4fbd0 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <[email protected]>
-Date: Tue, 24 Nov 2020 10:30:20 +0000
-Subject: [PATCH] CVE-2020-25713 raptor2: malformed input file can lead to a
- segfault
-
-due to an out of bounds array access in
-raptor_xml_writer_start_element_common
-
-See:
-https://bugs.mageia.org/show_bug.cgi?id=27605
-https://www.openwall.com/lists/oss-security/2020/11/13/1
-https://gerrit.libreoffice.org/c/core/+/106249
----
- src/raptor_xml_writer.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c
-index 56993dc3..4426d38c 100644
---- a/src/raptor_xml_writer.c
-+++ b/src/raptor_xml_writer.c
-@@ -227,7 +227,7 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* 
xml_writer,
-           
-           /* check it wasn't an earlier declaration too */
-           for(j = 0; j < nspace_declarations_count; j++)
--            if(nspace_declarations[j].nspace == 
element->attributes[j]->nspace) {
-+            if(nspace_declarations[j].nspace == 
element->attributes[i]->nspace) {
-               declare_me = 0;
-               break;
-             }
--- 
-2.28.0
-
diff --git 
a/external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1
 
b/external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1
deleted file mode 100644
index 6fa726cae6da..000000000000
--- 
a/external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1
+++ /dev/null
@@ -1,43 +0,0 @@
-From 590681e546cd9aa18d57dc2ea1858cb734a3863f Mon Sep 17 00:00:00 2001
-From: Dave Beckett <[email protected]>
-Date: Sun, 16 Apr 2017 23:15:12 +0100
-Subject: [PATCH] Calcualte max nspace declarations correctly for XML writer
-
-(raptor_xml_writer_start_element_common): Calculate max including for
-each attribute a potential name and value.
-
-Fixes Issues #0000617 http://bugs.librdf.org/mantis/view.php?id=617
-and #0000618 http://bugs.librdf.org/mantis/view.php?id=618
----
- src/raptor_xml_writer.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c
-index 693b946..0d3a36a 100644
---- a/src/raptor_xml_writer.c
-+++ b/src/raptor_xml_writer.c
-@@ -181,9 +181,10 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* 
xml_writer,
-   size_t nspace_declarations_count = 0;  
-   unsigned int i;
- 
--  /* max is 1 per element and 1 for each attribute + size of declared */
-   if(nstack) {
--    int nspace_max_count = element->attribute_count+1;
-+    int nspace_max_count = element->attribute_count * 2; /* attr and value */
-+    if(element->name->nspace)
-+      nspace_max_count++;
-     if(element->declared_nspaces)
-       nspace_max_count += raptor_sequence_size(element->declared_nspaces);
-     if(element->xml_language)
-@@ -237,7 +238,7 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* 
xml_writer,
-         }
-       }
- 
--      /* Add the attribute + value */
-+      /* Add the attribute's value */
-       nspace_declarations[nspace_declarations_count].declaration=
-         raptor_qname_format_as_xml(element->attributes[i],
-                                    
&nspace_declarations[nspace_declarations_count].length);
--- 
-2.9.3
-
diff --git a/external/redland/raptor/Wint-conversion.patch 
b/external/redland/raptor/Wint-conversion.patch
deleted file mode 100644
index fb85f4f13518..000000000000
--- a/external/redland/raptor/Wint-conversion.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/raptor_parse.c
-+++ src/raptor_parse.c
-@@ -257,7 +257,7 @@
- int
- raptor_world_get_parsers_count(raptor_world* world)
- {
--  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
-+  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, 0);
- 
-   raptor_world_open(world);
- 
---- src/raptor_serialize.c
-+++ src/raptor_serialize.c
-@@ -240,7 +240,7 @@
- int
- raptor_world_get_serializers_count(raptor_world* world)
- {
--  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL);
-+  RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, 0);
- 
-   raptor_world_open(world);
- 
diff --git a/external/redland/raptor/libtool.patch 
b/external/redland/raptor/libtool.patch
deleted file mode 100644
index b0baae661bab..000000000000
--- a/external/redland/raptor/libtool.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- build/ltmain.sh
-+++ build/ltmain.sh
-@@ -5301,6 +5301,12 @@
-         prev=
-         continue
-         ;;
-+      mllvm)
-+        # Clang does not use LLVM to link, so we can simply discard any
-+        # '-mllvm $arg' options when doing the link step.
-+        prev=
-+        continue
-+        ;;
-       objectlist)
-         if test -f "$arg"; then
-           save_arg=$arg
-@@ -5639,6 +5645,11 @@
-       continue
-       ;;
- 
-+      -mllvm)
-+      prev=mllvm
-+      continue
-+      ;;
-+
-       -module)
-       module=yes
-       continue
diff --git a/external/redland/raptor/raptor-android.patch.1 
b/external/redland/raptor/raptor-android.patch.1
index cb843839c848..854f1c6b3932 100644
--- a/external/redland/raptor/raptor-android.patch.1
+++ b/external/redland/raptor/raptor-android.patch.1
@@ -1,13 +1,13 @@
 No sonames on Android
 
---- a/configure        2013-03-29 19:46:34.922901756 +0100
-+++ b/configure        2013-03-29 19:46:56.051901574 +0100
-@@ -9866,7 +9866,7 @@
+--- a/configure        2023-03-02 02:58:10.000000000 +0900
++++ b/configure        2024-03-07 21:32:06.394607400 +0900
+@@ -11165,7 +11165,7 @@
        *Sun\ F*)                       # Sun Fortran 8.3
          tmp_sharedflag='-G' ;;
        esac
--      archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs 
$compiler_flags ${wl}-soname $wl$soname -o $lib'
+-      archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs 
$compiler_flags $wl-soname $wl$soname -o $lib'
 +      archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs 
$compiler_flags -o $lib'
  
-         if test "x$supports_anon_versioning" = xyes; then
+         if test yes = "$supports_anon_versioning"; then
            archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
diff --git a/external/redland/raptor/raptor-bundled-soname.patch.1 
b/external/redland/raptor/raptor-bundled-soname.patch.1
index cce2482d147f..5e3eef560542 100644
--- a/external/redland/raptor/raptor-bundled-soname.patch.1
+++ b/external/redland/raptor/raptor-bundled-soname.patch.1
@@ -1,11 +1,11 @@
 rhbz#809466 change soname of bundled redland libs
 
---- a/src/Makefile.in    2013-03-29 19:11:27.944919859 +0100
-+++ b/src/Makefile.in  2013-03-29 19:17:42.173916644 +0100
-@@ -507,7 +507,7 @@
-       $(am__append_21) $(am__append_22) $(am__append_23) \
-       $(am__append_24) $(am__append_25) $(am__append_26)
- libraptor2_la_LIBADD = $(am__append_29) @LTLIBOBJS@
+--- a/src/Makefile.in  2023-03-02 02:58:09.000000000 +0900
++++ b/src/Makefile.in  2024-01-06 13:59:13.424477428 +0900
+@@ -783,7 +783,7 @@
+       $(am__append_24) $(am__append_25) $(am__append_26) \
+       $(am__append_27) $(am__append_28)
+ libraptor2_la_LIBADD = $(am__append_31) @LTLIBOBJS@
 -libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ \
 +libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ -release lo \
  @RAPTOR_LDFLAGS@ $(MEM_LIBS)
diff --git a/external/redland/raptor/raptor-emscripten.patch.1 
b/external/redland/raptor/raptor-emscripten.patch.1
index e3c53b35b7b0..847ccfe8341b 100644
--- a/external/redland/raptor/raptor-emscripten.patch.1
+++ b/external/redland/raptor/raptor-emscripten.patch.1
@@ -1,12 +1,12 @@
 -*- Mode: Diff -*-
 --- raptor/src/sort_r.h
 +++ raptor/src/sort_r.h
-@@ -27,7 +27,7 @@
-      defined AMIGA)
+@@ -28,7 +28,7 @@
  #  define _SORT_R_BSD
  #elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \
--       defined __linux__ || defined __MINGW32__ || defined __GLIBC__)
-+       defined __linux__ || defined __MINGW32__ || defined __GLIBC__ || 
defined __EMSCRIPTEN__)
+        defined __linux__ || defined __MINGW32__ || defined __GLIBC__ || \
+-       defined __CYGWIN__)
++       defined __CYGWIN__ || defined __EMSCRIPTEN__)
  #  define _SORT_R_LINUX
  #elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
  #  define _SORT_R_WINDOWS
diff --git a/external/redland/raptor/raptor-freebsd.patch.1 
b/external/redland/raptor/raptor-freebsd.patch.1
index 349f3a197b8a..3909ada0a335 100644
--- a/external/redland/raptor/raptor-freebsd.patch.1
+++ b/external/redland/raptor/raptor-freebsd.patch.1
@@ -1,28 +1,17 @@
 Usual patch to produce Linux-like .so files on FreeBSD
 
---- a/build/ltmain.sh  2008-02-02 22:28:24.000000000 +0900
-+++ b/build/ltmain.sh  2008-07-08 11:58:42.000000000 +0900
-@@ -7341,9 +7341,9 @@
-           revision="$number_revision"
+--- a/build/ltmain.sh  2023-02-24 11:51:18.000000000 +0900
++++ b/build/ltmain.sh  2024-01-06 13:46:15.460224000 +0900
+@@ -9107,9 +9107,9 @@
+           revision=$number_revision
            ;;
-         freebsd-aout|freebsd-elf|qnx|sunos)
--          current="$number_major"
--          revision="$number_minor"
--          age="0"
+         freebsd-aout|qnx|sunos)
+-          current=$number_major
+-          revision=$number_minor
+-          age=0
 +          current=`expr $number_major + $number_minor`
-+          age="$number_minor"
-+          revision="$number_revision"
++          age=$number_minor
++          revision=$number_revision
            ;;
          irix|nonstopux)
            func_arith $number_major + $number_minor
-@@ -7420,8 +7420,8 @@
-         ;;
- 
-       freebsd-elf)
--        major=".$current"
--        versuffix=".$current"
-+        major=.`expr $current - $age`
-+        versuffix="$major.$age.$revision"
-         ;;
- 
-       irix | nonstopux)
diff --git a/external/redland/raptor/raptor-icu.patch 
b/external/redland/raptor/raptor-icu.patch
new file mode 100644
index 000000000000..227392dc5539
--- /dev/null
+++ b/external/redland/raptor/raptor-icu.patch
@@ -0,0 +1,11 @@
+--- configure  2023-03-02 02:58:10.000000000 +0900
++++ configure  2024-05-11 16:19:06.843539720 +0900
+@@ -16583,7 +16583,7 @@
+ printf "%s
" "yes" >&6; }
+ 
+   have_icu=yes
+-  ICU_UC_VERSION=`$PKG_CONFIG icu-uc --modversion`
++  ICU_UC_VERSION="$ICU_MAJOR.$ICU_MINOR"
+ 
+ fi
+ ICU_UC_MAJOR_VERSION=`echo "$ICU_UC_VERSION" | sed -e 's/\..*$//'`
diff --git a/external/redland/raptor/raptor-msvc.patch.1 
b/external/redland/raptor/raptor-msvc.patch.1
index 245b19bdca70..7bf9c76d01e8 100644
--- a/external/redland/raptor/raptor-msvc.patch.1
+++ b/external/redland/raptor/raptor-msvc.patch.1
@@ -1,13 +1,3 @@
---- raptor/src/raptor2.h.in.orig       2016-08-26 23:45:34.543400074 +0200
-+++ raptor/src/raptor2.h.in    2016-08-26 23:45:40.479399614 +0200
-@@ -2176,6 +2176,7 @@
- void* raptor_avltree_iterator_get(raptor_avltree_iterator* iterator);
- 
- /* utility methods */
-+RAPTOR_API
- void raptor_sort_r(void *base, size_t nel, size_t width, 
raptor_data_compare_arg_handler compar, void *user_data);
- 
- 
 --- raptor/src/raptor_uri.c    2016-08-26 23:45:34.543400074 +0200
 +++ raptor/src/raptor_uri.c    2016-08-26 23:45:40.479399614 +0200
 @@ -51,6 +51,10 @@
diff --git a/external/redland/raptor/raptor2.h 
b/external/redland/raptor/raptor2.h
index 4929117e772e..72935aa73a29 100644
--- a/external/redland/raptor/raptor2.h
+++ b/external/redland/raptor/raptor2.h
@@ -53,14 +53,14 @@ extern "C" {
  *
  * Format: major * 10000 + minor * 100 + release
  */
-#define RAPTOR_VERSION 20015
+#define RAPTOR_VERSION 20016
 
 /**
  * RAPTOR_VERSION_STRING:
  *
  * Raptor library version string
  */
-#define RAPTOR_VERSION_STRING "2.0.15"
+#define RAPTOR_VERSION_STRING "2.0.16"
 
 /**
  * RAPTOR_VERSION_MAJOR:
@@ -81,7 +81,7 @@ extern "C" {
  *
  * Raptor library release
  */
-#define RAPTOR_VERSION_RELEASE 15
+#define RAPTOR_VERSION_RELEASE 16
 
 /**
  * RAPTOR_API:
@@ -251,6 +251,14 @@ extern const unsigned int raptor_rdf_namespace_uri_len;
 RAPTOR_API
 extern const unsigned char * const raptor_rdf_schema_namespace_uri;
 
+/**
+ * raptor_rdf_schenma_namespace_uri_len:
+ *
+ * Length of #raptor_rdf_schenma_namespace_uri string
+ */
+RAPTOR_API
+extern const unsigned int raptor_rdf_schema_namespace_uri_len;
+
 /**
  * raptor_xmlschema_datatypes_namespace_uri:
  *
@@ -1433,10 +1441,16 @@ int raptor_www_set_ssl_cert_options(raptor_www* www, 
const char* cert_filename,
 RAPTOR_API
 int raptor_www_set_ssl_verify_options(raptor_www* www, int verify_peer, int 
verify_host);
 RAPTOR_API
+int raptor_www_set_user_agent2(raptor_www *www, const char *user_agent, size_t 
user_agent_len);
+RAPTOR_API RAPTOR_DEPRECATED
 void raptor_www_set_user_agent(raptor_www *www, const char *user_agent);
 RAPTOR_API
+int raptor_www_set_proxy2(raptor_www *www, const char *proxy, size_t 
proxy_len);
+RAPTOR_API RAPTOR_DEPRECATED
 void raptor_www_set_proxy(raptor_www *www, const char *proxy);
 RAPTOR_API
+int raptor_www_set_http_accept2(raptor_www *www, const char *value, size_t 
value_len);
+RAPTOR_API RAPTOR_DEPRECATED
 void raptor_www_set_http_accept(raptor_www *www, const char *value);
 RAPTOR_API
 void raptor_www_set_write_bytes_handler(raptor_www *www, 
raptor_www_write_bytes_handler handler, void *user_data);
@@ -1812,8 +1826,8 @@ int raptor_iostream_read_eof(raptor_iostream *iostr);
 /**
  * raptor_escaped_write_bitflags:
  * @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF   : Allow  ,
- * @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU : ALlow        
   \u
- * @RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8            : Allow UTF-8 for printable U 
*
+ * @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU : Allow        
   \u \U
+ * @RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8            : Use UTF-8 instead of \u \U 
for U+0080 or larger (will always use \u for U+0000..U+001F and U+007F)
  * @RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES: Must escape 
#x00-#x20<>\"{}|^` in URIs
  * @RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL: N-Triples literal
  * @RAPTOR_ESCAPED_WRITE_NTRIPLES_URI: N-Triples URI
@@ -1823,7 +1837,7 @@ int raptor_iostream_read_eof(raptor_iostream *iostr);
  * @RAPTOR_ESCAPED_WRITE_TURTLE_URI: Turtle 2013 URIs (like SPARQL)
  * @RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL: Turtle 2013 literals (like SPARQL)
  * @RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL: Turtle 2013 long literals (like 
SPARQL)
- * @RAPTOR_ESCAPED_WRITE_JSON_LITERAL: JSON literals:           
 and \u \U
+ * @RAPTOR_ESCAPED_WRITE_JSON_LITERAL: JSON literals: UTF-8 plus        
, \uXXXX only, no \U
  *
  * Bit flags for raptor_string_escaped_write() and friends.
  */
@@ -1851,8 +1865,8 @@ typedef enum {
   RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL = RAPTOR_ESCAPED_WRITE_SPARQL_LITERAL,
   RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL = 
RAPTOR_ESCAPED_WRITE_SPARQL_LONG_LITERAL,
 
-  /* JSON literals:             
 and \u \U */
-  RAPTOR_ESCAPED_WRITE_JSON_LITERAL = 
RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU | 
RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF
+  /* JSON literals: UTF-8 plus          
 \uXXXX */
+  RAPTOR_ESCAPED_WRITE_JSON_LITERAL = 
RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU | 
RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF | RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8
 } raptor_escaped_write_bitflags;
 
 
@@ -2153,6 +2167,8 @@ void* raptor_avltree_remove(raptor_avltree* tree, void* 
p_data);
 RAPTOR_API
 int raptor_avltree_delete(raptor_avltree* tree, void* p_data);
 RAPTOR_API
+void raptor_avltree_trim(raptor_avltree* tree);
+RAPTOR_API
 void* raptor_avltree_search(raptor_avltree* tree, const void* p_data);
 RAPTOR_API
 int raptor_avltree_visit(raptor_avltree* tree, raptor_avltree_visit_handler 
visit_handler, void* user_data);
diff --git a/external/redland/raptor/raptor_config.h 
b/external/redland/raptor/raptor_config.h
index 74f58de95e94..b1e663519eee 100644
--- a/external/redland/raptor/raptor_config.h
+++ b/external/redland/raptor/raptor_config.h
@@ -66,12 +66,6 @@
 /* Define to 1 if you have the <limits.h> header file. */
 #define HAVE_LIMITS_H 1
 
-/* Define to 1 if you have the <math.h> header file. */
-#define HAVE_MATH_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
 /* Define to 1 if you have the `qsort_r' function. */
 #undef HAVE_QSORT_R
 
@@ -99,6 +93,9 @@
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
 /* Define to 1 if you have the <stdlib.h> header file. */
 #define HAVE_STDLIB_H 1
 
@@ -114,7 +111,7 @@
 /* Define to 1 if you have the <string.h> header file. */
 #define HAVE_STRING_H 1
 
-/* Define to 1 if you have the `strtok_r' function. */
+/* have the strtok_r function */
 #undef HAVE_STRTOK_R
 
 /* Define to 1 if you have the <sys/param.h> header file. */
@@ -129,6 +126,9 @@
 /* Define to 1 if you have the <sys/types.h> header file. */
 #undef HAVE_SYS_TYPES_H
 
+/* Define to 1 if you have the <time.h> header file. */
+#define HAVE_TIME_H 1
+
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
@@ -156,8 +156,10 @@
 /* Is __FUNCTION__ available */
 #define HAVE___FUNCTION__ 1
 
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
-   */
+/* ICU UC major version */
+#define ICU_UC_MAJOR_VERSION ICU_MAJOR
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
 #undef LT_OBJDIR
 
 /* Define to 1 if maintainer mode is enabled. */
@@ -166,9 +168,6 @@
 /* need 'extern int optind' declaration? */
 #undef NEED_OPTIND_DECLARATION
 
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
 /* Name of package */
 #undef PACKAGE
 
@@ -194,7 +193,7 @@
 #undef RAPTOR_DEBUG
 
 /* Use ICU for Unicode NFC check */
-#undef RAPTOR_ICU_NFC
+#define RAPTOR_ICU_NFC 1
 
 /* does libxml struct xmlEntity have a field etype */
 #define RAPTOR_LIBXML_ENTITY_ETYPE 1
@@ -259,6 +258,9 @@
 /* Building JSON serializer */
 #undef RAPTOR_SERIALIZER_JSON
 
+/* Building mKR serializer */
+#undef RAPTOR_SERIALIZER_MKR
+
 /* Building N-Quads serializer */
 #undef RAPTOR_SERIALIZER_NQUADS
 
@@ -278,7 +280,7 @@
 #undef RAPTOR_SERIALIZER_TURTLE
 
 /* Release version as a decimal */
-#define RAPTOR_VERSION_DECIMAL 20015
+#define RAPTOR_VERSION_DECIMAL 20016
 
 /* Major version number */
 #define RAPTOR_VERSION_MAJOR 2
@@ -287,7 +289,7 @@
 #define RAPTOR_VERSION_MINOR 0
 
 /* Release version number */
-#define RAPTOR_VERSION_RELEASE 15
+#define RAPTOR_VERSION_RELEASE 16
 
 /* Have libcurl WWW library */
 #undef RAPTOR_WWW_LIBCURL
@@ -307,14 +309,13 @@
 /* Use libxml XML parser */
 #define RAPTOR_XML_LIBXML 1
 
-/* Define to 1 if you have the ANSI C header files. */
+/* Define to 1 if all of the C90 standard headers exist (not just the ones
+   required in a freestanding environment). This macro is provided for
+   backward compatibility; new code need not use it. */
 #undef STDC_HEADERS
 
-/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
 /* Version number of package */
-#define VERSION "2.0.15"
+#define VERSION "2.0.16"
 
 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
    significant byte first (like Motorola and SPARC, unlike Intel). */
@@ -332,11 +333,6 @@
    `char[]'. */
 #undef YYTEXT_POINTER
 
-/* Enable large inode numbers on macOS 10.5.  */
-#ifndef _DARWIN_USE_64_BIT_INODE
-# define _DARWIN_USE_64_BIT_INODE 1
-#endif
-
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 
diff --git a/external/redland/raptor/ubsan.patch 
b/external/redland/raptor/ubsan.patch
index 641d60bb7b49..54b041e80f1f 100644
--- a/external/redland/raptor/ubsan.patch
+++ b/external/redland/raptor/ubsan.patch
@@ -9,17 +9,3 @@
      /* Remove <component>/.. at the end of the path */
      *prev = '
      path_len -= (s-prev);
---- src/raptor_uri.c
-+++ src/raptor_uri.c
-@@ -1336,9 +1336,9 @@
-      !strncmp((const char*)base_detail->scheme, 
-               (const char*)reference_detail->scheme,
-               base_detail->scheme_len) &&
--     !strncmp((const char*)base_detail->authority, 
-+     (base_detail->authority_len == 0 || !strncmp((const 
char*)base_detail->authority, 
-               (const char*)reference_detail->authority,
--              base_detail->authority_len)) {
-+              base_detail->authority_len))) {
-     
-     if(!base_detail->path) {
-       if(reference_detail->path) {
diff --git a/external/redland/raptor/xml2-config.patch 
b/external/redland/raptor/xml2-config.patch
index 2550acee044a..41f338eccb66 100644
--- a/external/redland/raptor/xml2-config.patch
+++ b/external/redland/raptor/xml2-config.patch
@@ -1,6 +1,6 @@
 --- configure
 +++ configure
-@@ -14197,6 +14197,11 @@
+@@ -16004,6 +16004,11 @@
    test -n "$XML_CONFIG" && break
  done
  
@@ -12,11 +12,11 @@
    fi
  fi
  
-@@ -14481,6 +14481,7 @@
+@@ -16104,6 +16109,7 @@
  
      LIBXML_VERSION=`$PKG_CONFIG libxml-2.0 --modversion`
      libxml_source="pkg-config"
 +    XML_CONFIG="$PKG_CONFIG libxml-2.0"
  
  fi
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml via 
pkg-config" >&5
+   { printf "%s
" "$as_me:${as_lineno-$LINENO}: checking for libxml via pkg-config" >&5
diff --git a/external/redland/rasqal/rasqal-pkgconfig.patch.1 
b/external/redland/rasqal/rasqal-pkgconfig.patch.1
index ac3eab07c4e4..0db4c993d256 100644
--- a/external/redland/rasqal/rasqal-pkgconfig.patch.1
+++ b/external/redland/rasqal/rasqal-pkgconfig.patch.1
@@ -7,8 +7,7 @@ Let the pkg-config stuff be overridden by variables
  $as_echo "yes" >&6; }
  
 -  RAPTOR_VERSION=`$PKG_CONFIG raptor2 --modversion 2>/dev/null`
-+  RAPTOR_VERSION=2.0.15
++  RAPTOR_VERSION=2.0.16
    raptor_too_old=0
    as_arg_v1=$RAPTOR_VERSION
  as_arg_v2=$RAPTOR_MIN_VERSION
-
commit 09ba0b6c51e1032ced8cae734cd0ea94c473b212
Author:     Michael Stahl <[email protected]>
AuthorDate: Tue Jan 7 18:45:34 2025 +0100
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:35:42 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 ca0d72fc8a66..32f80ea3a774 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 298a60a9f3fe9a54c9a7e1f420112895df86aee1
Author:     Taichi Haradaguchi <[email protected]>
AuthorDate: Fri Aug 9 05:50:39 2024 +0200
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:35:42 2025 +0100

    poppler: upgrade to release 24.08.0
    
    Fixes CVE-2024-6239
    
    Downloaded from https://poppler.freedesktop.org/poppler-24.08.0.tar.xz
    
    Change-Id: I70373c367cc3da87d9847c00b02a17f514b52ae8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171667
    Tested-by: Jenkins
    Reviewed-by: Taichi Haradaguchi <[email protected]>
    (cherry picked from commit e266da95e0522fd9896f92f1c2ca3235e0e6fd66)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172951
    Reviewed-by: Xisco Fauli <[email protected]>
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173040
    (cherry picked from commit e79a53b37d7157b7991eb27b3f440028ca06feea)

diff --git a/download.lst b/download.lst
index b002c5e4dd86..ca0d72fc8a66 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 := 
0cdabd495cada11f6ee9e75c793f80daf46367b66c25a63ee8c26d0f9ec40c76
-POPPLER_TARBALL := poppler-24.06.0.tar.xz
+POPPLER_SHA256SUM := 
97453fbddf0c9a9eafa0ea45ac710d3d49bcf23a62e864585385d3c0b4403174
+POPPLER_TARBALL := poppler-24.08.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/inc/pch/precompiled_poppler.hxx 
b/external/poppler/inc/pch/precompiled_poppler.hxx
index 0760f9d4da4a..0a3c0a98353c 100644
--- a/external/poppler/inc/pch/precompiled_poppler.hxx
+++ b/external/poppler/inc/pch/precompiled_poppler.hxx
@@ -22,7 +22,7 @@
 
 #include <sal/config.h>
 #if PCH_LEVEL >= 1
-#include <Object.h>
+#include <Object.h> // Please include this header file to avoid error LNK2019.
 #include <algorithm>
 #include <annot_stamp_approved.h>
 #include <annot_stamp_as_is.h>
commit 211d5922d5a0134f6a219ac018cc6c1565fd2c5f
Author:     Xisco Fauli <[email protected]>
AuthorDate: Mon Jun 10 16:49:29 2024 +0200
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:35:42 2025 +0100

    poppler: Upgrade to 24.06.0
    
    Downloaded from https://poppler.freedesktop.org/poppler-24.06.0.tar.xz
    
    Change-Id: I6b679ae014edd7a9897eed39a6e91c63251cc016
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168642
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173039
    Reviewed-by: Taichi Haradaguchi <[email protected]>
    (cherry picked from commit cec9dd0f6f961f39072795c27ec90994587c5369)

diff --git a/download.lst b/download.lst
index c01d61f509c0..b002c5e4dd86 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 := 
d8c5eb30b50285ad9f0af8c6335cc2d3b9597fca475cbc2598a5479fa379f779
-POPPLER_TARBALL := poppler-24.05.0.tar.xz
+POPPLER_SHA256SUM := 
0cdabd495cada11f6ee9e75c793f80daf46367b66c25a63ee8c26d0f9ec40c76
+POPPLER_TARBALL := poppler-24.06.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/inc/pch/precompiled_poppler.hxx 
b/external/poppler/inc/pch/precompiled_poppler.hxx
index 50944b80daef..0760f9d4da4a 100644
--- a/external/poppler/inc/pch/precompiled_poppler.hxx
+++ b/external/poppler/inc/pch/precompiled_poppler.hxx
@@ -13,7 +13,7 @@
  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 2023-06-18 21:15:26 using:
+ Generated on 2024-06-10 17:25:06 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:
@@ -43,6 +43,7 @@
 #include <cctype>
 #include <cerrno>
 #include <cfloat>
+#include <charconv>
 #include <climits>
 #include <clocale>
 #include <cmath>
@@ -55,6 +56,7 @@
 #include <cstdlib>
 #include <cstring>
 #include <ctime>
+#include <functional>
 #include <gbase64.h>
 #include <gbasename.h>
 #include <gdir.h>
@@ -67,11 +69,13 @@
 #include <iostream>
 #include <limits>
 #include <memory>
+#include <optional>
 #include <poppler-config.h>
 #include <random>
 #include <regex>
 #include <set>
 #include <sstream>
+#include <unordered_set>
 #include <vector>
 #endif // PCH_LEVEL >= 1
 #if PCH_LEVEL >= 2
@@ -100,6 +104,17 @@
 #include <poppler/GfxState_helpers.h>
 #include <splash/Splash.h>
 #include <splash/SplashBitmap.h>
+#include <splash/SplashErrorCodes.h>
+#include <splash/SplashFont.h>
+#include <splash/SplashFontEngine.h>
+#include <splash/SplashFontFile.h>
+#include <splash/SplashFontFileID.h>
+#include <splash/SplashGlyphBitmap.h>
+#include <splash/SplashMath.h>
+#include <splash/SplashPath.h>
+#include <splash/SplashPattern.h>
+#include <splash/SplashScreen.h>
+#include <splash/SplashState.h>
 #include <splash/SplashTypes.h>
 #include <sys/stat.h>
 #endif // PCH_LEVEL >= 3
diff --git a/external/poppler/poppler-config.patch.1 
b/external/poppler/poppler-config.patch.1
index 8f71e987b2b9..e2163319fd43 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 23.09.0"
++#define PACKAGE_STRING "poppler 24.06.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 "23.09.0"
++#define PACKAGE_VERSION "24.06.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 "23.09.0"
++#define VERSION "24.06.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 "23.09.0"
++#define POPPLER_VERSION "24.06.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 "23.09.0"
-+#define POPPLER_VERSION_MAJOR 23
-+#define POPPLER_VERSION_MINOR 9
++#define POPPLER_VERSION "24.06.0"
++#define POPPLER_VERSION_MAJOR 24
++#define POPPLER_VERSION_MINOR 6
 +#define POPPLER_VERSION_MICRO 0
 +
 +namespace poppler
commit 38e540ca32bcd7d1f6176f2271ad58470d285389
Author:     Xisco Fauli <[email protected]>
AuthorDate: Mon May 13 11:14:06 2024 +0200
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:35:42 2025 +0100

    poppler: Upgrade 24.05.0
    
    * external/poppler/char_traits.patch is no longer neeeded
    after 
https://cgit.freedesktop.org/poppler/poppler/commit/cpp/poppler-global.h?id=b4ac7d9af7cb5edfcfcbda035ed8b8c218ba8564
    
    * Adapt external/poppler/disable-nss-and-gpgmepp.patch.1
    after 
https://cgit.freedesktop.org/poppler/poppler/commit/?id=d40bb7e308c9e3299e50d3e2880229cd6272587e
    
    Downloaded from https://poppler.freedesktop.org/poppler-24.05.0.tar.xz
    
    Change-Id: I87ed833f92e504f0a39b5f64c1db42d579050a37
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167582
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173038
    Reviewed-by: Taichi Haradaguchi <[email protected]>
    (cherry picked from commit e70a307eab620e8a6572676398781c35f4925727)

diff --git a/download.lst b/download.lst
index 1aa887aade69..c01d61f509c0 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 := 
bafbf0db5713dec25b5d16eb2cd87e4a62351cdc40f050c3937cd8dd6882d446
-POPPLER_TARBALL := poppler-24.03.0.tar.xz
+POPPLER_SHA256SUM := 
d8c5eb30b50285ad9f0af8c6335cc2d3b9597fca475cbc2598a5479fa379f779
+POPPLER_TARBALL := poppler-24.05.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 c6ddbf9785d3..784fc768e2a7 100644
--- a/external/poppler/UnpackedTarball_poppler.mk
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -14,7 +14,6 @@ $(eval $(call 
gb_UnpackedTarball_set_tarball,poppler,$(POPPLER_TARBALL),,poppler
 $(eval $(call gb_UnpackedTarball_set_patchlevel,poppler,0))
 
 $(eval $(call gb_UnpackedTarball_add_patches,poppler,\
-       external/poppler/char_traits.patch \
        external/poppler/disable-freetype.patch.1 \
        external/poppler/disable-nss-and-gpgmepp.patch.1 \
        external/poppler/poppler-config.patch.1 \
diff --git a/external/poppler/char_traits.patch 
b/external/poppler/char_traits.patch
deleted file mode 100644
index 3483f2fe22d8..000000000000
--- a/external/poppler/char_traits.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- cpp/poppler-global.h
-+++ cpp/poppler-global.h
-@@ -98,7 +98,7 @@
- #    pragma warning(push)
- #    pragma warning(disable : 4251) /* class 'A' needs to have dll interface 
for to be used by clients of class 'B'. */
- #endif
--class POPPLER_CPP_EXPORT ustring : public std::basic_string<unsigned short>
-+class POPPLER_CPP_EXPORT ustring : public std::u16string
- {
- public:
-     ustring();
diff --git a/external/poppler/disable-freetype.patch.1 
b/external/poppler/disable-freetype.patch.1
index 3c4d1d0f7a8a..5d7426242c35 100644
--- a/external/poppler/disable-freetype.patch.1
+++ b/external/poppler/disable-freetype.patch.1
@@ -22,13 +22,13 @@ disable freetype dependent code
  #include <unordered_set>
  
  // helper for using std::visit to get a dependent false for static_asserts
-@@ -2760,6 +2760,8 @@
+@@ -2840,6 +2840,8 @@
  
  Form::AddFontResult Form::addFontToDefaultResources(const std::string 
&filepath, int faceIndex, const std::string &fontFamily, const std::string 
&fontStyle, bool forceName)
  {
 +    return {};
 +#if 0
-     if (!GooString::endsWith(filepath, ".ttf") && 
!GooString::endsWith(filepath, ".ttc") && !GooString::endsWith(filepath, 
".otf")) {
+     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 @@
diff --git a/external/poppler/disable-nss-and-gpgmepp.patch.1 
b/external/poppler/disable-nss-and-gpgmepp.patch.1
index 1d7f7f933433..1fc9ede6035c 100644
--- a/external/poppler/disable-nss-and-gpgmepp.patch.1
+++ b/external/poppler/disable-nss-and-gpgmepp.patch.1
@@ -11,9 +11,9 @@ disable NSS/GPGMEPP dependent code.
  #include "SignatureInfo.h"
  #include "CertificateInfo.h"
  #include "XRef.h"
-@@ -578,7 +578,7 @@
+@@ -584,7 +584,7 @@
  {
-     return static_cast<FormFieldSignature 
*>(field)->validateSignature(doVerifyCert, forceRevalidation, validationTime, 
ocspRevocationCheck, enableAIA);
+     return static_cast<FormFieldSignature 
*>(field)->validateSignatureResult();
  }
 -
 +#if 0
@@ -60,19 +60,44 @@ disable NSS/GPGMEPP dependent code.
  }
 
  FormSignatureType FormWidgetSignature::signatureType() const
-@@ -2388,6 +2392,7 @@
-
- SignatureInfo *FormFieldSignature::validateSignature(bool doVerifyCert, bool 
forceRevalidation, time_t validationTime, bool ocspRevocationCheck, bool 
enableAIA)
+@@ -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) {
-         return signature_info;
-@@ -2464,6 +2469,7 @@
-     const CertificateValidationStatus cert_val_state = 
signature_handler->validateCertificate(std::chrono::system_clock::from_time_t(validationTime),
 ocspRevocationCheck, enableAIA);
-     signature_info->setCertificateValStatus(cert_val_state);
-
+         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;
+ };
commit d431d62978daa394117d546d76d79bbca3df2624
Author:     Xisco Fauli <[email protected]>
AuthorDate: Mon Mar 25 20:59:08 2024 +0100
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:35:42 2025 +0100

    poppler: upgrade to release 24.03.0
    
    Change-Id: Icd063dcc9a034e88283ddf16be64091a32f3453f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165292
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>
    Signed-off-by: Xisco Fauli <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173037
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit 00b2beb5427f53d90efcadefe50c1320c0501535)

diff --git a/download.lst b/download.lst
index 0c838d848568..1aa887aade69 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 := 
80d1d44dd8bdf4ac1a47d56c5065075eb9991790974b1ed7d14b972acde88e55
-POPPLER_TARBALL := poppler-23.09.0.tar.xz
+POPPLER_SHA256SUM := 
bafbf0db5713dec25b5d16eb2cd87e4a62351cdc40f050c3937cd8dd6882d446
+POPPLER_TARBALL := poppler-24.03.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/disable-nss-and-gpgmepp.patch.1 
b/external/poppler/disable-nss-and-gpgmepp.patch.1
index 01b442f53a1c..1d7f7f933433 100644
--- a/external/poppler/disable-nss-and-gpgmepp.patch.1
+++ b/external/poppler/disable-nss-and-gpgmepp.patch.1
@@ -11,7 +11,7 @@ disable NSS/GPGMEPP dependent code.
  #include "SignatureInfo.h"
  #include "CertificateInfo.h"
  #include "XRef.h"
-@@ -577,7 +577,7 @@
+@@ -578,7 +578,7 @@
  {
      return static_cast<FormFieldSignature 
*>(field)->validateSignature(doVerifyCert, forceRevalidation, validationTime, 
ocspRevocationCheck, enableAIA);
  }
@@ -20,12 +20,12 @@ disable NSS/GPGMEPP dependent code.
  // update hash with the specified range of data from the file
  static bool hashFileRange(FILE *f, CryptoSign::SigningInterface *handler, 
Goffset start, Goffset end)
  {
-@@ -607,10 +607,12 @@
+@@ -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)
  {
@@ -33,44 +33,46 @@ disable NSS/GPGMEPP dependent code.
      auto backend = CryptoSign::Factory::createActive();
      if (!backend) {
          return false;
-@@ -698,6 +700,8 @@
+@@ -697,8 +699,8 @@
+     signatureField->setSignature(*signature);
+
      fclose(file);
- 
-     return true;
+-
+-    return true;
 +#endif
 +    return false;
  }
- 
- bool FormWidgetSignature::signDocumentWithAppearance(const std::string 
&saveFilename, const std::string &certNickname, const std::string &password, 
const GooString *reason, const GooString *location,
-@@ -2316,6 +2320,7 @@
- 
+
+ 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;
      }
-@@ -2335,6 +2340,7 @@
+@@ -2374,6 +2377,7 @@
              i += BLOCK_SIZE;
          }
      }
 +#endif
  }
- 
+
  FormSignatureType FormWidgetSignature::signatureType() const
-@@ -2349,6 +2355,7 @@
- 
+@@ -2388,6 +2392,7 @@
+
  SignatureInfo *FormFieldSignature::validateSignature(bool doVerifyCert, bool 
forceRevalidation, time_t validationTime, bool ocspRevocationCheck, bool 
enableAIA)
  {
 +#if 0
      auto backend = CryptoSign::Factory::createActive();
      if (!backend) {
          return signature_info;
-@@ -2425,6 +2432,7 @@
+@@ -2464,6 +2469,7 @@
      const CertificateValidationStatus cert_val_state = 
signature_handler->validateCertificate(std::chrono::system_clock::from_time_t(validationTime),
 ocspRevocationCheck, enableAIA);
      signature_info->setCertificateValStatus(cert_val_state);
- 
+
 +#endif
      return signature_info;
  }
- 
+
commit 3917f38adb7e4a6299dfa6e42f1230595af8dc68
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Sat Dec 7 17:36:22 2024 +0100
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:31:18 2025 +0100

    Fix check for further exotic protocols
    
    ...that were added in 59891cd3985469bc44dbd05c9fc704eeb07f0c78 "look at
    'embedded' protocols for protocols that support them"
    
    Change-Id: I42836d6fd27cd99e39ab07e626053f002a2651f5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178047
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>
    (cherry picked from commit 8075798b22f2188530f57b8747589923bfd419ef)

diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx
index fff77e41f5e7..12635eba8dd3 100644
--- a/tools/qa/cppunit/test_urlobj.cxx
+++ b/tools/qa/cppunit/test_urlobj.cxx
@@ -354,6 +354,49 @@ namespace tools_urlobj
             }
         }
 
+        void testIsExoticProtocol() {
+            {
+                INetURLObject url(u"vnd.sun.star.pkg://slot%3A0");
+                CPPUNIT_ASSERT_EQUAL(INetProtocol::VndSunStarPkg, 
url.GetProtocol());
+                CPPUNIT_ASSERT(url.IsExoticProtocol());
+            }
+            {
+                INetURLObject 
url(u"vnd.sun.star.pkg://vnd.sun.star.pkg%3A%2F%2Fslot%253A0");
+                CPPUNIT_ASSERT_EQUAL(INetProtocol::VndSunStarPkg, 
url.GetProtocol());
+                CPPUNIT_ASSERT(url.IsExoticProtocol());
+            }
+            {
+                INetURLObject 
url(u"vnd.sun.star.pkg://http%3A%2F%2Fexample.net");
+                CPPUNIT_ASSERT_EQUAL(INetProtocol::VndSunStarPkg, 
url.GetProtocol());
+                CPPUNIT_ASSERT(!url.IsExoticProtocol());
+            }
+            {
+                INetURLObject url(u"vnd.sun.star.zip://slot%3A0");
+                CPPUNIT_ASSERT_EQUAL(INetProtocol::Generic, url.GetProtocol());
+                CPPUNIT_ASSERT(url.IsExoticProtocol());
+            }
+            {
+                INetURLObject url(u"vnd.sun.star.zip://slot%3A0/foo");
+                CPPUNIT_ASSERT_EQUAL(INetProtocol::Generic, url.GetProtocol());
+                CPPUNIT_ASSERT(url.IsExoticProtocol());
+            }
+            {
+                INetURLObject url(u"vnd.sun.star.zip://slot%3A0?foo");
+                CPPUNIT_ASSERT_EQUAL(INetProtocol::Generic, url.GetProtocol());
+                CPPUNIT_ASSERT(url.IsExoticProtocol());
+            }
+            {
+                INetURLObject url(u"vnd.sun.star.zip://slot%3A0#foo");
+                CPPUNIT_ASSERT_EQUAL(INetProtocol::Generic, url.GetProtocol());
+                CPPUNIT_ASSERT(url.IsExoticProtocol());
+            }
+            {
+                INetURLObject 
url(u"vnd.sun.star.zip://http%3A%2F%2Fexample.net");
+                CPPUNIT_ASSERT_EQUAL(INetProtocol::Generic, url.GetProtocol());
+                CPPUNIT_ASSERT(!url.IsExoticProtocol());
+            }
+        }
+
         // Change the following lines only, if you add, remove or rename
         // member functions of the current class,
         // because these macros are need by auto register mechanism.
@@ -371,6 +414,7 @@ namespace tools_urlobj
         CPPUNIT_TEST( testChangeScheme );
         CPPUNIT_TEST( testTd146382 );
         CPPUNIT_TEST( testParseSmart );
+        CPPUNIT_TEST( testIsExoticProtocol );
         CPPUNIT_TEST_SUITE_END(  );
     };                          // class createPool
 
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 785fbd09404f..a9ce65ecb538 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -4891,10 +4891,21 @@ bool INetURLObject::IsExoticProtocol() const
     {
         return true;
     }
-    if (isSchemeEqualTo(u"vnd.sun.star.pkg") || 
isSchemeEqualTo(u"vnd.sun.star.zip"))
+    if (m_eScheme == INetProtocol::VndSunStarPkg) {
+        return 
INetURLObject(GetHost(INetURLObject::DecodeMechanism::WithCharset))
+            .IsExoticProtocol();
+    }
+    if (isSchemeEqualTo(u"vnd.sun.star.zip"))
     {
-        OUString sPayloadURL = 
GetURLPath(INetURLObject::DecodeMechanism::WithCharset);
-        return sPayloadURL.startsWith(u"//") && 
INetURLObject(sPayloadURL.subView(2)).IsExoticProtocol();
+        OUString sPayloadURL = 
GetURLPath(INetURLObject::DecodeMechanism::NONE);
+        if (!sPayloadURL.startsWith(u"//")) {
+            return false;
+        }
+        auto const find = [&sPayloadURL](auto c) {
+            auto const n = sPayloadURL.indexOf(c, 2);
+            return n == -1 ? sPayloadURL.getLength() : n;
+        };
+        return INetURLObject(decode(sPayloadURL.subView(2, std::min(find('/'), 
find('?')) - 2), 
INetURLObject::DecodeMechanism::WithCharset)).IsExoticProtocol();
     }
     return false;
 }
commit 5dc31077f44c9366a46710f2cb392b62bd6e2db2
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Dec 6 14:41:19 2024 +0000
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:31:18 2025 +0100

    look at 'embedded' protocols too
    
    Change-Id: Ie99f5f5a390639bdc69397c831e0a32594a5030c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177981
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit 59891cd3985469bc44dbd05c9fc704eeb07f0c78)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177987
    Reviewed-by: Stephan Bergmann <[email protected]>
    (cherry picked from commit b63aa51c55244ee67410201fa5e7c003427b1009)

diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 23204f43375b..785fbd09404f 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -4882,12 +4882,21 @@ OUString INetURLObject::CutExtension()
 
 bool INetURLObject::IsExoticProtocol() const
 {
-    return m_eScheme == INetProtocol::Slot ||
-           m_eScheme == INetProtocol::Macro ||
-           m_eScheme == INetProtocol::Uno ||
-           m_eScheme == INetProtocol::VndSunStarExpand ||
-           isSchemeEqualTo(u"vnd.sun.star.script") ||
-           isSchemeEqualTo(u"service");
+    if (m_eScheme == INetProtocol::Slot ||
+        m_eScheme == INetProtocol::Macro ||
+        m_eScheme == INetProtocol::Uno ||
+        m_eScheme == INetProtocol::VndSunStarExpand ||
+        isSchemeEqualTo(u"vnd.sun.star.script") ||
+        isSchemeEqualTo(u"service"))
+    {
+        return true;
+    }
+    if (isSchemeEqualTo(u"vnd.sun.star.pkg") || 
isSchemeEqualTo(u"vnd.sun.star.zip"))
+    {
+        OUString sPayloadURL = 
GetURLPath(INetURLObject::DecodeMechanism::WithCharset);
+        return sPayloadURL.startsWith(u"//") && 
INetURLObject(sPayloadURL.subView(2)).IsExoticProtocol();
+    }
+    return false;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 7a9e3ce2947348a399f3ba51566a0975b89694bd
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Nov 15 12:30:39 2024 +0000
Commit:     Thorsten Behrens <[email protected]>
CommitDate: Thu Feb 27 18:31:18 2025 +0100

    consider VndSunStarExpand an exotic protocol
    
    and generally don't bother with it when fetching data
    from urls
    
    Change-Id: I51a2601c6fb7d6c32f9e2d1286ee0d3b05b370b9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176797
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <[email protected]>
    (cherry picked from commit d6c89af2598e866aa9cb4fa3600691fb558befdb)

diff --git a/avmedia/source/viewer/mediawindow_impl.cxx 
b/avmedia/source/viewer/mediawindow_impl.cxx
index 82ca1b92821c..7a6755e40052 100644
--- a/avmedia/source/viewer/mediawindow_impl.cxx
+++ b/avmedia/source/viewer/mediawindow_impl.cxx
@@ -170,15 +170,16 @@ void MediaWindowImpl::dispose()
 
 uno::Reference<media::XPlayer> MediaWindowImpl::createPlayer(const OUString& 
rURL, const OUString& rReferer, const OUString*)
 {
-    uno::Reference<media::XPlayer> xPlayer;
-
     if( rURL.isEmpty() )
-        return xPlayer;
+        return nullptr;
 
     if (SvtSecurityOptions::isUntrustedReferer(rReferer))
-    {
-        return xPlayer;
-    }
+        return nullptr;
+
+    if (INetURLObject(rURL).IsExoticProtocol())
+        return nullptr;
+
+    uno::Reference<media::XPlayer> xPlayer;
 
     // currently there isn't anything else, throw any mime type to the media 
players
     //if (!pMimeType || *pMimeType == AVMEDIA_MIMETYPE_COMMON)
diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index 2f84816bf4fb..e89942460305 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -4397,6 +4397,13 @@ const GraphicObject* 
SvxBrushItem::GetGraphicObject(OUString const & referer) co
             return nullptr;
         }
 
+        INetURLObject aGraphicURL( maStrLink );
+        if (aGraphicURL.IsExoticProtocol())
+        {
+            SAL_WARN("editeng", "Ignore exotic protocol: " << maStrLink);
+            return nullptr;
+        }
+
         // tdf#94088 prepare graphic and state
         Graphic aGraphic;
         bool bGraphicLoaded = false;
@@ -4417,8 +4424,6 @@ const GraphicObject* 
SvxBrushItem::GetGraphicObject(OUString const & referer) co
         // a 'data:' scheme url and try to load that (embedded graphics)
         if(!bGraphicLoaded)
         {
-            INetURLObject aGraphicURL( maStrLink );
-
             if( INetProtocol::Data == aGraphicURL.GetProtocol() )
             {
                 std::unique_ptr<SvMemoryStream> const 
xMemStream(aGraphicURL.getData());
diff --git a/embeddedobj/source/commonembedding/persistence.cxx 
b/embeddedobj/source/commonembedding/persistence.cxx
index 6859de216c24..f85830a8bd47 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -55,6 +55,7 @@
 #include <comphelper/namedvaluecollection.hxx>
 #include <comphelper/propertyvalue.hxx>
 #include <unotools/configmgr.hxx>
+#include <tools/urlobj.hxx>
 #include <unotools/mediadescriptor.hxx>
 #include <unotools/securityoptions.hxx>
 
@@ -368,11 +369,19 @@ uno::Reference< util::XCloseable > 
OCommonEmbeddedObject::LoadLink_Impl()
     uno::Sequence< beans::PropertyValue > aArgs( 
m_aDocMediaDescriptor.getLength() + nLen );
     auto pArgs = aArgs.getArray();
 
-    pArgs[0].Name = "URL";
-    if(m_aLinkTempFile.is())
-        pArgs[0].Value <<= m_aLinkTempFile->getUri();
+    OUString sURL;
+    if (m_aLinkTempFile.is())
+        sURL = m_aLinkTempFile->getUri();
     else
-        pArgs[0].Value <<= m_aLinkURL;
+        sURL = m_aLinkURL;
+    if (INetURLObject(sURL).IsExoticProtocol())
+    {
+        SAL_WARN("embeddedobj.common", "Ignore exotic protocol: " << 
pArgs[0].Value);
+        return nullptr;
+    }
+
+    pArgs[0].Name = "URL";
+    pArgs[0].Value <<= sURL;
 
     pArgs[1].Name = "FilterName";
     pArgs[1].Value <<= m_aLinkFilterName;
diff --git a/forms/source/component/ImageControl.cxx 
b/forms/source/component/ImageControl.cxx
index e9fda79d224b..9dd71a2d42e4 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -401,7 +401,7 @@ bool OImageControlModel::impl_updateStreamForURL_lck( const 
OUString& _rURL, Val
 {
     OUString referer;
     getPropertyValue("Referer") >>= referer;
-    if (SvtSecurityOptions::isUntrustedReferer(referer)) {
+    if (SvtSecurityOptions::isUntrustedReferer(referer) || 
INetURLObject(_rURL).IsExoticProtocol()) {
         return false;
     }
 
diff --git a/forms/source/component/clickableimage.cxx 
b/forms/source/component/clickableimage.cxx
index 5d6a8f7a7f3d..9925c1c4b3a6 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -737,7 +737,7 @@ namespace frm
 
         // the SfxMedium is not allowed to be created with an invalid URL, so 
we have to check this first
         INetURLObject aUrl(rURL);
-        if (INetProtocol::NotValid == aUrl.GetProtocol())
+        if (INetProtocol::NotValid == aUrl.GetProtocol() || 
aUrl.IsExoticProtocol())
             // we treat an invalid URL like we would treat no URL
             return;
 
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index a20501a1bad6..3412d727c656 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -534,8 +534,11 @@ bool LinkManager::GetGraphicFromAny(std::u16string_view 
rMimeType,
             sReferer = sh->GetMedium()->GetName();
 
         OUString sURL = rValue.get<OUString>();
-        if (!SvtSecurityOptions::isUntrustedReferer(sReferer))
+        if (!SvtSecurityOptions::isUntrustedReferer(sReferer) &&
+            !INetURLObject(sURL).IsExoticProtocol())
+        {
             rGraphic = vcl::graphic::loadFromURL(sURL, pParentWin);
+        }
         if (rGraphic.IsNone())
             rGraphic.SetDefaultType();
         rGraphic.setOriginURL(sURL);
diff --git a/sw/source/filter/html/htmlgrin.cxx 
b/sw/source/filter/html/htmlgrin.cxx
index 072b8945d234..eb7d3404770b 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -673,7 +673,8 @@ IMAGE_SETEVENT:
     bool bNeedWidth = (!bPercentWidth && !nWidth) || bRelWidthScale;
     bool bRelHeightScale = bPercentHeight && nHeight == 
SwFormatFrameSize::SYNCED;
     bool bNeedHeight = (!bPercentHeight && !nHeight) || bRelHeightScale;
-    if ((bNeedWidth || bNeedHeight) && !bFuzzing && allowAccessLink(*m_xDoc))
+    if ((bNeedWidth || bNeedHeight) && !bFuzzing && allowAccessLink(*m_xDoc) &&
+        !aGraphicURL.IsExoticProtocol())
     {
         GraphicDescriptor aDescriptor(aGraphicURL);
         if (aDescriptor.Detect(/*bExtendedInfo=*/true))
diff --git a/toolkit/source/controls/unocontrols.cxx 
b/toolkit/source/controls/unocontrols.cxx
index 9a4f19e7481b..f842f74347af 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -31,6 +31,7 @@
 #include <o3tl/safeint.hxx>
 #include <controls/formattedcontrol.hxx>
 #include <toolkit/controls/unocontrols.hxx>
+#include <tools/urlobj.hxx>
 #include <helper/property.hxx>
 #include <toolkit/helper/macros.hxx>
 #include <unotools/securityoptions.hxx>
@@ -69,7 +70,7 @@ css::uno::Reference< css::graphic::XGraphic >
 ImageHelper::getGraphicFromURL_nothrow( const OUString& _rURL, OUString const 
& referer )
 {
     uno::Reference< graphic::XGraphic > xGraphic;
-    if ( _rURL.isEmpty() || SvtSecurityOptions::isUntrustedReferer(referer) )
+    if (_rURL.isEmpty() || SvtSecurityOptions::isUntrustedReferer(referer) || 
INetURLObject(_rURL).IsExoticProtocol())
         return xGraphic;
 
     try
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 18ee57b18ee4..23204f43375b 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -4885,6 +4885,7 @@ bool INetURLObject::IsExoticProtocol() const
     return m_eScheme == INetProtocol::Slot ||
            m_eScheme == INetProtocol::Macro ||
-e 
... etc. - the rest is truncated

Reply via email to