download.lst                                                                   
    |    6 -
 
external/libxml2/0001-parser-Fix-custom-SAX-parsers-without-cdataBlock-han.patch.1
 |   37 ++++++
 external/libxml2/ExternalPackage_libxml2.mk                                    
    |    2 
 external/libxml2/ExternalProject_libxml2.mk                                    
    |    2 
 external/libxml2/UnpackedTarball_libxml2.mk                                    
    |    3 
 external/libxml2/deprecated.patch.0                                            
    |   56 ++++++++++
 external/libxml2/libxml2-android.patch                                         
    |    4 
 external/libxml2/libxml2-icu-sym.patch.0                                       
    |    6 -
 external/libxml2/libxml2-icu.patch.0                                           
    |    6 -
 external/libxml2/libxml2-vc10.patch                                            
    |    4 
 external/libxml2/makefile.msvc-entry-point.patch.0                             
    |   32 +++++
 sw/qa/extras/htmlexport/htmlexport2.cxx                                        
    |    2 
 12 files changed, 144 insertions(+), 16 deletions(-)

New commits:
commit e3b5e3aebcf178ccfbba3f7510062d5f2c5abb4a
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Apr 23 13:38:50 2025 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Jun 6 20:58:18 2025 +0200

    libxml2: upgrade to 2.14.3
    
    * In 
https://gitlab.gnome.org/GNOME/libxml2/-/commit/712a31abe458eed75f0e2a442b35af58cf7091ca
    some members used by Libreoffice were marked as deprecated.
    Add deprecated.patch.0 to undeprecate them for now.
    Meanwhile
    https://gitlab.gnome.org/GNOME/libxml2/-/issues/936#note_2461334 has been
    opened to discuss it. The necessary code changes
    will be addressed in a follow-up commit
    
    * In 
https://gitlab.gnome.org/GNOME/libxml2/-/commit/bfe6af2eed38564693b35ac5aa60178068f34fbb
    main() was moved from xmllint.c to lintmain.c.
    Add makefile.msvc-entry-point.patch.0 to address that
    
    * 0001-parser-Fix-custom-SAX-parsers-without-cdataBlock-han.patch.1
    fixes https://gitlab.gnome.org/GNOME/libxml2/-/issues/934
    
    * Since 
https://gitlab.gnome.org/GNOME/libxml2/-/commit/f070acc56400410a3ad27f4df313526749364962
    android builds in Jenkins fail with "configure: error: libiconv not
    found"
    Run configure with --without-iconv. Same as in Windows
    
    * Adapt testLeadingTabHTML since The HTML parser normalizes newlines
    according to HTML5 now
    See https://gitlab.gnome.org/GNOME/libxml2/-/issues/938#note_2463720
    
    Downloaded from 
https://download.gnome.org/sources/libxml2/2.14/libxml2-2.14.3.tar.xz
    
    Change-Id: Ie010c236f5dad5156f7f4204033d0c02928742ec
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184501
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/download.lst b/download.lst
index 228a15c200cd..ac4d654311d5 100644
--- a/download.lst
+++ b/download.lst
@@ -459,9 +459,9 @@ XMLSEC_TARBALL := xmlsec1-1.3.7.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBXML_SHA256SUM := 
277294cb33119ab71b2bc81f2f445e9bc9435b893ad15bb2cd2b0e859a0ee84a
-LIBXML_VERSION_MICRO := 8
-LIBXML_TARBALL := libxml2-2.13.$(LIBXML_VERSION_MICRO).tar.xz
+LIBXML_SHA256SUM := 
6de55cacc8c2bc758f2ef6f93c313cb30e4dd5d84ac5d3c7ccbd9344d8cc6833
+LIBXML_VERSION_MICRO := 3
+LIBXML_TARBALL := libxml2-2.14.$(LIBXML_VERSION_MICRO).tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git 
a/external/libxml2/0001-parser-Fix-custom-SAX-parsers-without-cdataBlock-han.patch.1
 
b/external/libxml2/0001-parser-Fix-custom-SAX-parsers-without-cdataBlock-han.patch.1
new file mode 100644
index 000000000000..5df7ad6726b7
--- /dev/null
+++ 
b/external/libxml2/0001-parser-Fix-custom-SAX-parsers-without-cdataBlock-han.patch.1
@@ -0,0 +1,37 @@
+From 30375877d981be8ede8620b13c6928342d929b58 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <wellnho...@aevum.de>
+Date: Tue, 3 Jun 2025 15:50:54 +0200
+Subject: [PATCH] parser: Fix custom SAX parsers without cdataBlock handler
+
+Use characters handler if cdataBlock handler is NULL.
+
+Regressed with 57e4bbd8. Should fix #934.
+---
+ parser.c | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/parser.c b/parser.c
+index e6598413..c96c3bec 100644
+--- a/parser.c
++++ b/parser.c
+@@ -9502,12 +9502,11 @@ xmlParseCDSect(xmlParserCtxt *ctxt) {
+      * OK the buffer is to be consumed as cdata.
+      */
+     if ((ctxt->sax != NULL) && (!ctxt->disableSAX)) {
+-        if (ctxt->options & XML_PARSE_NOCDATA) {
+-            if (ctxt->sax->characters != NULL)
+-                ctxt->sax->characters(ctxt->userData, buf, len);
+-        } else {
+-            if (ctxt->sax->cdataBlock != NULL)
+-                ctxt->sax->cdataBlock(ctxt->userData, buf, len);
++        if ((ctxt->sax->cdataBlock != NULL) &&
++            ((ctxt->options & XML_PARSE_NOCDATA) == 0)) {
++            ctxt->sax->cdataBlock(ctxt->userData, buf, len);
++        } else if (ctxt->sax->characters != NULL) {
++            ctxt->sax->characters(ctxt->userData, buf, len);
+         }
+     }
+ 
+-- 
+2.39.5
+
diff --git a/external/libxml2/ExternalPackage_libxml2.mk 
b/external/libxml2/ExternalPackage_libxml2.mk
index 17190c77fd18..072cfece9a74 100644
--- a/external/libxml2/ExternalPackage_libxml2.mk
+++ b/external/libxml2/ExternalPackage_libxml2.mk
@@ -21,7 +21,7 @@ else # COM=MSC
 $(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.dll,win32/bin.msvc/libxml2.dll))
 endif
 else # OS!=WNT
-$(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.2,.libs/libxml2.so.2.13.$(LIBXML_VERSION_MICRO)))
+$(eval $(call 
gb_ExternalPackage_add_file,libxml2,$(LIBO_URE_LIB_FOLDER)/libxml2.so.16,.libs/libxml2.so.16.0.$(LIBXML_VERSION_MICRO)))
 endif
 endif # DISABLE_DYNLOADING
 
diff --git a/external/libxml2/ExternalProject_libxml2.mk 
b/external/libxml2/ExternalProject_libxml2.mk
index a97f69c7eabd..26005343d24a 100644
--- a/external/libxml2/ExternalProject_libxml2.mk
+++ b/external/libxml2/ExternalProject_libxml2.mk
@@ -35,7 +35,7 @@ else # OS!=WNT
 $(call gb_ExternalProject_get_state_target,libxml2,build):
        $(call gb_Trace_StartRange,libxml2,EXTERNAL)
        $(call gb_ExternalProject_run,build,\
-               $(gb_RUN_CONFIGURE) ./configure --disable-ipv6 --without-python 
--without-zlib --with-sax1 \
+               $(gb_RUN_CONFIGURE) ./configure --disable-ipv6 --without-iconv 
--without-python --without-zlib --with-sax1 \
                        --without-lzma \
                        $(if $(debug),--with-run-debug) \
                        $(if 
$(verbose),--disable-silent-rules,--enable-silent-rules) \
diff --git a/external/libxml2/UnpackedTarball_libxml2.mk 
b/external/libxml2/UnpackedTarball_libxml2.mk
index df11b69ac6f2..8e9e38704b13 100644
--- a/external/libxml2/UnpackedTarball_libxml2.mk
+++ b/external/libxml2/UnpackedTarball_libxml2.mk
@@ -19,6 +19,9 @@ $(eval $(call gb_UnpackedTarball_add_patches,libxml2,\
        $(if $(filter 
SOLARIS,$(OS)),external/libxml2/libxml2-global-symbols.patch) \
        external/libxml2/libxml2-vc10.patch \
        external/libxml2/libxml2-XMLCALL-redefine.patch.0 \
+       external/libxml2/makefile.msvc-entry-point.patch.0 \
+       external/libxml2/deprecated.patch.0 \
+       
external/libxml2/0001-parser-Fix-custom-SAX-parsers-without-cdataBlock-han.patch.1
 \
        $(if $(filter ANDROID,$(OS)),external/libxml2/libxml2-android.patch) \
        $(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \
                external/libxml2/libxml2-icu-sym.patch.0, \
diff --git a/external/libxml2/deprecated.patch.0 
b/external/libxml2/deprecated.patch.0
new file mode 100644
index 000000000000..40f5e2392ca0
--- /dev/null
+++ b/external/libxml2/deprecated.patch.0
@@ -0,0 +1,56 @@
+--- include/libxml/xpath.h     2025-05-13 16:42:31.000000000 +0200
++++ include/libxml/xpath.h     2025-06-03 14:10:14.539373167 +0200
+@@ -401,7 +401,6 @@
+  * Objects and Nodesets handling
+  */
+
+-XML_DEPRECATED
+ XMLPUBVAR double xmlXPathNAN;
+ XML_DEPRECATED
+ XMLPUBVAR double xmlXPathPINF;
+--- include/libxml/parser.h    2025-05-13 16:42:31.000000000 +0200
++++ include/libxml/parser.h    2025-06-03 14:00:37.833979131 +0200
+@@ -268,20 +268,20 @@
+     /* Number of current input streams */
+     int inputNr;
+     /* Max number of input streams */
+-    int inputMax XML_DEPRECATED_MEMBER;
++    int inputMax;
+     /* stack of inputs */
+     xmlParserInputPtr *inputTab;
+
+     /* Node analysis stack only used for DOM building */
+
+     /* Current parsed Node */
+-    xmlNodePtr node XML_DEPRECATED_MEMBER;
++    xmlNodePtr node;
+     /* Depth of the parsing stack */
+-    int nodeNr XML_DEPRECATED_MEMBER;
++    int nodeNr;
+     /* Max depth of the parsing stack */
+     int nodeMax XML_DEPRECATED_MEMBER;
+     /* array of nodes */
+-    xmlNodePtr *nodeTab XML_DEPRECATED_MEMBER;
++    xmlNodePtr *nodeTab;
+
+     /* Whether node info should be kept */
+     int record_info;
+@@ -374,7 +374,7 @@
+     /* document's own catalog */
+     void *catalogs XML_DEPRECATED_MEMBER;
+     /* run in recovery mode */
+-    int recovery XML_DEPRECATED_MEMBER;
++    int recovery;
+     /* unused */
+     int progressive XML_DEPRECATED_MEMBER;
+     /* dictionary for the parser */
+@@ -436,7 +436,7 @@
+     /*
+      * the complete error information for the last error.
+      */
+-    xmlError lastError XML_DEPRECATED_MEMBER;
++    xmlError lastError;
+     /* the parser mode */
+     xmlParserMode parseMode XML_DEPRECATED_MEMBER;
+     /* unused */
+
diff --git a/external/libxml2/libxml2-android.patch 
b/external/libxml2/libxml2-android.patch
index acf9b17e02db..f5281778ff29 100644
--- a/external/libxml2/libxml2-android.patch
+++ b/external/libxml2/libxml2-android.patch
@@ -1,7 +1,7 @@
 --- misc/libxml2-2.7.6/Makefile.in
 +++ misc/build/libxml2-2.7.6/Makefile.in
-@@ -1635,7 +1635,7 @@
-       $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+@@ -1775,7 +1775,7 @@
+       $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_LTLIBRARIES)
        $(MAKE) $(AM_MAKEFLAGS) check-local
  check: check-recursive
 -all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(DATA) \
diff --git a/external/libxml2/libxml2-icu-sym.patch.0 
b/external/libxml2/libxml2-icu-sym.patch.0
index d89a1c4c544b..32404d7e2b4a 100644
--- a/external/libxml2/libxml2-icu-sym.patch.0
+++ b/external/libxml2/libxml2-icu-sym.patch.0
@@ -10,8 +10,8 @@ diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
 +CFLAGS = $(CFLAGS) /I$(WORKDIR)/UnpackedTarball/icu/source/i18n 
/I$(WORKDIR)/UnpackedTarball/icu/source/common
  !if "$(WITH_THREADS)" == "ctls"
  CFLAGS = $(CFLAGS) /D "XML_THREAD_LOCAL=__declspec(thread)"
- !else if "$(WITH_THREADS)" == "posix"
-@@ -62,7 +63,9 @@
+ !endif
+@@ -51,7 +52,9 @@
  # The linker and its options.
  LD = link.exe
  LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
@@ -19,7 +19,7 @@ diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
  LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
 +LDFLAGS = $(LDFLAGS) /DEBUG /OPT:REF
  LIBS =
- !if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
+ !if "$(WITH_HTTP)" == "1"
  LIBS = $(LIBS) wsock32.lib ws2_32.lib
 @@ -74,9 +77,13 @@
  !if "$(STATIC)" == "1"
diff --git a/external/libxml2/libxml2-icu.patch.0 
b/external/libxml2/libxml2-icu.patch.0
index 85ce8b3aba2b..eaabcbd26f5c 100644
--- a/external/libxml2/libxml2-icu.patch.0
+++ b/external/libxml2/libxml2-icu.patch.0
@@ -10,15 +10,15 @@ diff -up win32/Makefile.msvc.dt win32/Makefile.msvc
 +CFLAGS = $(CFLAGS) /I$(WORKDIR)/UnpackedTarball/icu/source/i18n 
/I$(WORKDIR)/UnpackedTarball/icu/source/common
  !if "$(WITH_THREADS)" == "ctls"
  CFLAGS = $(CFLAGS) /D "XML_THREAD_LOCAL=__declspec(thread)"
- !else if "$(WITH_THREADS)" == "posix"
-@@ -67,6 +68,7 @@ CFLAGS = $(CFLAGS) $(SOLARINC)
+ !endif
+@@ -51,6 +52,7 @@
  # The linker and its options.
  LD = link.exe
  LDFLAGS = /nologo /VERSION:$(LIBXML_MAJOR_VERSION).$(LIBXML_MINOR_VERSION)
 +LDFLAGS = $(LDFLAGS) /LIBPATH:$(WORKDIR)/UnpackedTarball/icu/source/lib
  LDFLAGS = $(LDFLAGS) /LIBPATH:$(BINDIR) /LIBPATH:$(LIBPREFIX)
  LIBS =
- !if "$(WITH_FTP)" == "1" || "$(WITH_HTTP)" == "1"
+ !if "$(WITH_HTTP)" == "1"
 @@ -78,7 +78,11 @@ LIBS = $(LIBS) wsock32.lib ws2_32.lib
  !if "$(STATIC)" == "1"
  LIBS = $(LIBS) advapi32.lib sicuuc.lib sicuin.lib sicudt.lib
diff --git a/external/libxml2/libxml2-vc10.patch 
b/external/libxml2/libxml2-vc10.patch
index 15bc4d973ea7..bf46fdbde3bd 100644
--- a/external/libxml2/libxml2-vc10.patch
+++ b/external/libxml2/libxml2-vc10.patch
@@ -2,8 +2,8 @@ Add SOLARINC, and disable SSE2 default for MSVC2012
 
 --- build/libxml2-2.7.6/win32/Makefile.msvc.old        2010-09-20 
20:22:41.500000000 +0200
 +++ build/libxml2-2.7.6/win32/Makefile.msvc    2010-09-20 20:23:00.250000000 
+0200
-@@ -59,6 +59,7 @@
- CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H"
+@@ -46,6 +46,7 @@
+ CFLAGS = $(CFLAGS) /D "XML_THREAD_LOCAL=__declspec(thread)"
  !endif
  CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
 +CFLAGS = $(CFLAGS) $(SOLARINC)
diff --git a/external/libxml2/makefile.msvc-entry-point.patch.0 
b/external/libxml2/makefile.msvc-entry-point.patch.0
new file mode 100644
index 000000000000..afcc1aa07a0e
--- /dev/null
+++ b/external/libxml2/makefile.msvc-entry-point.patch.0
@@ -0,0 +1,32 @@
+--- win32/Makefile.msvc        2025-06-06 10:57:06.219160687 +0200
++++ win32/Makefile.msvc        2025-06-06 11:01:45.213981862 +0200
+@@ -235,17 +235,7 @@
+ !endif
+ 
+ # Xmllint and friends executables.
+-UTILS = $(BINDIR)\xmllint.exe\
+-      $(BINDIR)\xmlcatalog.exe\
+-      $(BINDIR)       estModule.exe\
+-      $(BINDIR) untest.exe\
+-      $(BINDIR) unsuite.exe\
+-      $(BINDIR) unxmlconf.exe\
+-      $(BINDIR)       estapi.exe\
+-      $(BINDIR)       estchar.exe\
+-      $(BINDIR)       estdict.exe\
+-      $(BINDIR)       estlimits.exe\
+-      $(BINDIR)       estrecurse.exe
++UTILS = $(BINDIR)\xmllint.exe
+       
+ !if "$(VCMANIFEST)" == "1"
+ _VC_MANIFEST_EMBED_EXE= if exist $@.manifest mt.exe -nologo -manifest 
$@.manifest -outputresource:$@;1
+@@ -396,8 +386,8 @@
+       @$(_VC_MANIFEST_EMBED_EXE)
+ !else
+ {$(UTILS_SRCDIR)}.c{$(BINDIR)}.exe:
+-      $(CC) $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $< 
+-      $(LD) $(LDFLAGS) /OUT:$@ $(XML_IMP) $(LIBS) $(UTILS_INTDIR)\$(<B).obj
++      $(CC) $(CFLAGS) /Fo$(UTILS_INTDIR)\ /c $< ..\lintmain.c ..\shell.c
++      $(LD) $(LDFLAGS) /OUT:$@ $(XML_IMP) $(LIBS) $(UTILS_INTDIR)\$(<B).obj  
$(UTILS_INTDIR)\lintmain.obj $(UTILS_INTDIR)\shell.obj
+       @$(_VC_MANIFEST_EMBED_EXE)
+ !endif
+ 
diff --git a/sw/qa/extras/htmlexport/htmlexport2.cxx 
b/sw/qa/extras/htmlexport/htmlexport2.cxx
index 3233a203ecb4..09edcbd8c816 100644
--- a/sw/qa/extras/htmlexport/htmlexport2.cxx
+++ b/sw/qa/extras/htmlexport/htmlexport2.cxx
@@ -450,7 +450,7 @@ CPPUNIT_TEST_FIXTURE(SwHtmlDomExportTest, 
testLeadingTabHTML)
     // - Expected: <newline><nbsp><nbsp><space>test
     // - Actual  : <newline><tab><space>test
     // i.e. the leading tab was not replaced by 2 nbsps.
-    assertXPathContent(pHtmlDoc, "/html/body/p", SAL_NEWLINE_STRING u"\xa0\xa0 
test");
+    assertXPathContent(pHtmlDoc, "/html/body/p", u"
\xa0\xa0 test");
 }
 
 CPPUNIT_TEST_FIXTURE(HtmlExportTest, testClearingBreak)

Reply via email to