[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 10 commits - download.lst external/expat external/icu external/libxml2 external/libxslt external/nss external/poppler forms/source sc/source sdext/source shell/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Fri May 15 17:46:06 UTC 2020


 download.lst                                                                       |   20 -
 external/expat/ExternalProject_expat.mk                                            |    2 
 external/expat/StaticLibrary_expat.mk                                              |    1 
 external/expat/StaticLibrary_expat_x64.mk                                          |    1 
 external/expat/UnpackedTarball_expat.mk                                            |    1 
 external/expat/expat-winapi.patch                                                  |   18 -
 external/icu/ExternalProject_icu.mk                                                |    5 
 external/icu/UnpackedTarball_icu.mk                                                |    1 
 external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2                      |   37 ++
 external/libxml2/libxml2-android.patch                                             |    2 
 external/libxml2/libxml2-config.patch.1                                            |   46 --
 external/libxslt/UnpackedTarball_libxslt.mk                                        |    2 
 external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1                  |  120 -------
 external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1                  |   69 ++++
 external/libxslt/libxslt-config.patch.1                                            |   18 -
 external/libxslt/libxslt-internal-symbols.patch.1                                  |    8 
 external/nss/UnpackedTarball_nss.mk                                                |    1 
 external/nss/clang-cl.patch.0                                                      |    2 
 external/nss/nss.aix.patch                                                         |    2 
 external/nss/nss.fix-freebl-add-lcc-support.patch.1                                |   11 
 external/nss/nss.patch                                                             |   14 
 external/nss/nss.vs2015.pdb.patch                                                  |    4 
 external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1        |   27 -
 external/poppler/0001-Revert-Make-the-mul-tables-be-calculated-at-compile-.patch.1 |  169 ++++++++++
 external/poppler/StaticLibrary_poppler.mk                                          |    1 
 external/poppler/UnpackedTarball_poppler.mk                                        |    4 
 external/poppler/poppler-config.patch.1                                            |   19 -
 forms/source/xforms/submission.cxx                                                 |    3 
 forms/source/xforms/submission/submission.hxx                                      |    6 
 sc/source/ui/docshell/docsh.cxx                                                    |   13 
 sc/source/ui/docshell/docsh4.cxx                                                   |   61 ++-
 sc/source/ui/docshell/externalrefmgr.cxx                                           |    9 
 sc/source/ui/inc/docsh.hxx                                                         |    2 
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx                              |   25 +
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx                              |   14 
 shell/source/win32/SysShExec.cxx                                                   |    6 
 36 files changed, 459 insertions(+), 285 deletions(-)

New commits:
commit 21cc8a803d2bfbd0af418c7fa7569949d502f0b9
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Tue Mar 24 10:48:04 2020 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 15 19:09:02 2020 +0200

    icu: add patch to fix CVE-2020-10531
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90971
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 002d1152dc418f7d624409e76cd9d4ac0b42c7f8)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90975
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 63b573faf984875cda7a879e696ea75fae81df57)
    
    Change-Id: I0aca4af1bd79f28bf1c920a4d05e80948106aaac

diff --git a/external/icu/ExternalProject_icu.mk b/external/icu/ExternalProject_icu.mk
index e1ec30938bf7..66030e8a9914 100644
--- a/external/icu/ExternalProject_icu.mk
+++ b/external/icu/ExternalProject_icu.mk
@@ -13,7 +13,10 @@ $(eval $(call gb_ExternalProject_register_targets,icu,\
 	build \
 ))
 
-icu_CPPFLAGS:="-DHAVE_GCC_ATOMICS=$(if $(filter TRUE,$(GCC_HAVE_BUILTIN_ATOMIC)),1,0)"
+# -I to find o3tl headers
+icu_CPPFLAGS:=" \
+	-DHAVE_GCC_ATOMICS=$(if $(filter TRUE,$(GCC_HAVE_BUILTIN_ATOMIC)),1,0) \
+	-I$(SRCDIR)/include"
 
 ifeq ($(OS),WNT)
 
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index 499650976a55..ef195a13686c 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -35,6 +35,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
 	$(if $(filter-out ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \
 	external/icu/icu4c-khmerbreakengine.patch.1 \
 	external/icu/icu4c-59-werror-shadow.patch.1 \
+	external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2 \
 ))
 
 $(eval $(call gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2 b/external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2
new file mode 100644
index 000000000000..d3b34db670c5
--- /dev/null
+++ b/external/icu/b7d08bc04a4296982fcef8b6b8a354a9e4e7afca.patch.2
@@ -0,0 +1,37 @@
+From b7d08bc04a4296982fcef8b6b8a354a9e4e7afca Mon Sep 17 00:00:00 2001
+From: Frank Tang <ftang at chromium.org>
+Date: Sat, 1 Feb 2020 02:39:04 +0000
+Subject: [PATCH] ICU-20958 Prevent SEGV_MAPERR in append
+
+See #971
+---
+ icu4c/source/common/unistr.cpp          |  6 ++-
+ icu4c/source/test/intltest/ustrtest.cpp | 62 +++++++++++++++++++++++++
+ icu4c/source/test/intltest/ustrtest.h   |  1 +
+ 3 files changed, 68 insertions(+), 1 deletion(-)
+
+diff --git a/icu4c/source/common/unistr.cpp b/icu4c/source/common/unistr.cpp
+index 901bb3358ba..077b4d6ef20 100644
+--- a/icu4c/source/common/unistr.cpp
++++ b/icu4c/source/common/unistr.cpp
+@@ -31,6 +31,7 @@
+ #include "ustr_imp.h"
+ #include "umutex.h"
+ #include "uassert.h"
++#include <o3tl/safeint.hxx>
+ 
+ #if 0
+ 
+@@ -1563,7 +1563,11 @@ UnicodeString::doAppend(const UChar *srcChars, int32_t srcStart, int32_t srcLeng
+   }
+ 
+   int32_t oldLength = length();
+-  int32_t newLength = oldLength + srcLength;
++  int32_t newLength;
++  if (o3tl::checked_add(oldLength, srcLength, newLength)) {
++    setToBogus();
++    return *this;
++  }
+   // optimize append() onto a large-enough, owned string
+   if((newLength <= getCapacity() && isBufferWritable()) ||
+       cloneArrayIfNeeded(newLength, getGrowCapacity(newLength))) {
commit 190eb0a110b708d162fec59b181810827975c0f2
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Jan 15 17:16:02 2020 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 15 19:09:02 2020 +0200

    Remove a fragment from a file URL early on
    
    ...as ShellExecuteExW would ignore it anyway
    
    Change-Id: I969db094bb7d2ea230ac8c36eb23d71a90fbe466
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86868
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit 14b36a16b225bf7c988f118d499a7287c47cd83e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86877
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 51da0d22ff42b20ab38130b7874651ef136ecceb)

diff --git a/shell/source/win32/SysShExec.cxx b/shell/source/win32/SysShExec.cxx
index c30816816b59..cf7d5d633314 100644
--- a/shell/source/win32/SysShExec.cxx
+++ b/shell/source/win32/SysShExec.cxx
@@ -306,6 +306,7 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
             static_cast< XSystemShellExecute* >( this ),
             3 );
 
+    OUString preprocessed_command(aCommand);
     if ((nFlags & URIS_ONLY) != 0)
     {
         css::uno::Reference< css::uri::XUriReference > uri(
@@ -319,8 +320,10 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
                 static_cast< cppu::OWeakObject * >(this), 0);
         }
         if (uri->getScheme().equalsIgnoreAsciiCase("file")) {
+            // ShellExecuteExW appears to ignore the fragment of a file URL anyway, so remove it:
+            uri->clearFragment();
+            preprocessed_command = uri->getUriReference();
             OUString pathname;
-            uri->clearFragment(); // getSystemPathFromFileURL fails for URLs with fragment
             auto const e1
                 = osl::FileBase::getSystemPathFromFileURL(uri->getUriReference(), pathname);
             if (e1 != osl::FileBase::E_None) {
@@ -424,7 +427,6 @@ void SAL_CALL CSysShExec::execute( const OUString& aCommand, const OUString& aPa
         and names no existing file (remember the jump mark
         sign '#' is a valid file name character we remove
         the jump mark, else ShellExecuteEx fails */
-    OUString preprocessed_command(aCommand);
     if (is_system_path(preprocessed_command))
     {
         if (has_jump_mark(preprocessed_command) && !is_existing_file(preprocessed_command))
commit 3967af89f313b4e003d4e7dcc42dfe1717e30fc8
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Nov 25 12:34:28 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 15 19:09:02 2020 +0200

    nss: upgrade to release 3.47.1
    
    Fixes CVE-2019-11745.
    
    Remove nss.fix-freebl-add-lcc-support.patch.1, fixed upstream.
    
    Reviewed-on: https://gerrit.libreoffice.org/83673
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit a6238c3fba80889f9090d997e2a4979b78b34ac7)
    
    Change-Id: I72e35c90fabb0a83f547a787dbaee774e35f9c08

diff --git a/download.lst b/download.lst
index fb2ddf7fc966..803b6de0e59b 100644
--- a/download.lst
+++ b/download.lst
@@ -195,8 +195,8 @@ export MYTHES_SHA256SUM := 1e81f395d8c851c3e4e75b568e20fa2fa549354e75ab397f9de4b
 export MYTHES_TARBALL := a8c2c5b8f09e7ede322d5c602ff6a4b6-mythes-1.2.4.tar.gz
 export NEON_SHA256SUM := db0bd8cdec329b48f53a6f00199c92d5ba40b0f015b153718d1b15d3d967fbca
 export NEON_TARBALL := neon-0.30.2.tar.gz
-export NSS_SHA256SUM := fae11751100510d26f16a245f0db9a5b3d638ab28ce0bccd50d4314f7e526ba1
-export NSS_TARBALL := nss-3.45-with-nspr-4.21.tar.gz
+export NSS_SHA256SUM := 07d4276168f59bb3038c7826dabb5fbfbab8336ddf65e4e6e43bce89ada78c64
+export NSS_TARBALL := nss-3.47.1-with-nspr-4.23.tar.gz
 export ODFGEN_SHA256SUM := 2c7b21892f84a4c67546f84611eccdad6259875c971e98ddb027da66ea0ac9c2
 export ODFGEN_VERSION_MICRO := 6
 export ODFGEN_TARBALL := libodfgen-0.1.$(ODFGEN_VERSION_MICRO).tar.bz2
diff --git a/external/nss/UnpackedTarball_nss.mk b/external/nss/UnpackedTarball_nss.mk
index 195e57197425..f1c025093216 100644
--- a/external/nss/UnpackedTarball_nss.mk
+++ b/external/nss/UnpackedTarball_nss.mk
@@ -22,7 +22,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,nss,\
 		external/nss/nss.vs2015.patch) \
     external/nss/ubsan.patch.0 \
     external/nss/clang-cl.patch.0 \
-    external/nss/nss.fix-freebl-add-lcc-support.patch.1 \
     $(if $(filter IOS,$(OS)), \
         external/nss/nss-ios.patch) \
 	$(if $(filter MSC-INTEL,$(COM)-$(CPUNAME)), \
diff --git a/external/nss/clang-cl.patch.0 b/external/nss/clang-cl.patch.0
index 111ec934d147..1d615c2397d8 100644
--- a/external/nss/clang-cl.patch.0
+++ b/external/nss/clang-cl.patch.0
@@ -22,7 +22,7 @@
 +     defined(_M_ARM64)) && !defined __clang__
  # include <intrin.h>
  # pragma  intrinsic(_BitScanForward,_BitScanReverse)
-   __forceinline static int __prBitScanForward32(unsigned int val)
+ __forceinline static int __prBitScanForward32(unsigned int val)
 @@ -32,7 +32,7 @@
  # define pr_bitscan_ctz32(val)  __prBitScanForward32(val)
  # define pr_bitscan_clz32(val)  __prBitScanReverse32(val)
diff --git a/external/nss/nss.aix.patch b/external/nss/nss.aix.patch
index da9aacb10e84..4b0c6bfb3261 100644
--- a/external/nss/nss.aix.patch
+++ b/external/nss/nss.aix.patch
@@ -38,7 +38,7 @@ diff -ru a/nspr/pr/src/Makefile.in b/nspr/pr/src/Makefile.in
 --- a/a/nspr/pr/src/Makefile.in	2014-09-29 16:46:35.281395079 +0100
 +++ b/b/nspr/pr/src/Makefile.in	2014-09-29 16:50:33.909375948 +0100
 @@ -74,7 +74,6 @@
- endif
+ endif	# SunOS
  
  ifeq ($(OS_ARCH),AIX)
 -DSO_LDOPTS	+= -binitfini::_PR_Fini
diff --git a/external/nss/nss.fix-freebl-add-lcc-support.patch.1 b/external/nss/nss.fix-freebl-add-lcc-support.patch.1
deleted file mode 100644
index 3e3c06327dde..000000000000
--- a/external/nss/nss.fix-freebl-add-lcc-support.patch.1
+++ /dev/null
@@ -1,11 +0,0 @@
---- b/nss/lib/freebl/Makefile
-+++ a/nss/lib/freebl/Makefile
-@@ -495,7 +495,7 @@
- ifdef USE_64
- # no __int128 at least up to lcc 1.23 (pretending to be gcc5)
- # NB: CC_NAME is not defined here
--ifneq ($(shell $(CC) -? 2>&1 >/dev/null | sed -e 's/:.*//;1q'),lcc)
-+ifneq ($(shell $(CC) -? 2>&1 >/dev/null </dev/null | sed -e 's/:.*//;1q'),lcc)
-     ifdef CC_IS_CLANG
-             HAVE_INT128_SUPPORT = 1
-             DEFINES += -DHAVE_INT128_SUPPORT
diff --git a/external/nss/nss.patch b/external/nss/nss.patch
index c367bce9097b..d9aaee5199bb 100644
--- a/external/nss/nss.patch
+++ b/external/nss/nss.patch
@@ -12,14 +12,14 @@
 --- a/nss.orig/nspr/pr/src/misc/prnetdb.c	2017-08-29 23:44:13.690045031 +0530
 +++ b/nss/nspr/pr/src/misc/prnetdb.c	2017-08-29 23:47:03.810814019 +0530
 @@ -438,7 +438,7 @@
- 	char *buf = *bufp;
- 	PRIntn buflen = *buflenp;
+     char *buf = *bufp;
+     PRIntn buflen = *buflenp;
  
--	if (align && ((long)buf & (align - 1))) {
-+	if (align && ((ptrdiff_t)buf & (align - 1))) {
- 		PRIntn skip = align - ((ptrdiff_t)buf & (align - 1));
- 		if (buflen < skip) {
- 			return 0;
+-    if (align && ((long)buf & (align - 1))) {
++    if (align && ((ptrdiff_t)buf & (align - 1))) {
+         PRIntn skip = align - ((ptrdiff_t)buf & (align - 1));
+         if (buflen < skip) {
+             return 0;
 --- a/a/nss/cmd/platlibs.mk	2017-08-29 23:44:13.554044416 +0530
 +++ b/b/nss/cmd/platlibs.mk	2017-08-29 23:46:09.638569150 +0530
 @@ -10,17 +10,22 @@
diff --git a/external/nss/nss.vs2015.pdb.patch b/external/nss/nss.vs2015.pdb.patch
index dc4f4638b476..c66940132cdd 100644
--- a/external/nss/nss.vs2015.pdb.patch
+++ b/external/nss/nss.vs2015.pdb.patch
@@ -18,5 +18,5 @@ diff -ru nss.orig/nss/coreconf/WIN32.mk nss/nss/coreconf/WIN32.mk
 -	OPTIMIZER += -Zi -Fd$(OBJDIR)/ -Od
 +	OPTIMIZER += -Zi -Fd./ -Od
  	NULLSTRING :=
- 	SPACE      := $(NULLSTRING) # end of the line
- 	USERNAME   := $(subst $(SPACE),_,$(USERNAME))
+ 	DEFINES    += -DDEBUG -UNDEBUG
+ 	DLLFLAGS   += -DEBUG -OUT:$@
commit 0ac547391a1396553e71c1bc10d7134fac289866
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Nov 20 13:11:59 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 15 19:09:02 2020 +0200

    poppler: upgrade to release 0.82.0
    
    fixes CVE-2019-9903 CVE-2019-9631 CVE-2019-9545 CVE-2019-9543
    CVE-2019-14494 CVE-2019-12293 CVE-2019-11026 CVE-2019-10873
    CVE-2019-10872 CVE-2019-10871 CVE-2019-10018
    
    remove obsolete 0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1
    
    Reviewed-on: https://gerrit.libreoffice.org/83308
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 28e52c49452320ac76489d0f93ca5692456e5331)
    Reviewed-on: https://gerrit.libreoffice.org/83336
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    (cherry picked from commit f3b2d61376c6d7ae262f58406d89ef0caa8b0aaf)
    
    Change-Id: I72b3bf89b294ed3e24157c7e75fd58d4f68d9f35

diff --git a/download.lst b/download.lst
index 7015fb31b8ca..fb2ddf7fc966 100644
--- a/download.lst
+++ b/download.lst
@@ -220,8 +220,8 @@ export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3
 export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
 export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
 export LIBPNG_TARBALL := libpng-1.6.37.tar.xz
-export POPPLER_SHA256SUM := 92e09fd3302567fd36146b36bb707db43ce436e8841219025a82ea9fb0076b2f
-export POPPLER_TARBALL := poppler-0.74.0.tar.xz
+export POPPLER_SHA256SUM := 234f8e573ea57fb6a008e7c1e56bfae1af5d1adf0e65f47555e1ae103874e4df
+export POPPLER_TARBALL := poppler-0.82.0.tar.xz
 export POSTGRESQL_SHA256SUM := db61d498105a7d5fe46185e67ac830c878cdd7dc1f82a87f06b842217924c461
 export POSTGRESQL_TARBALL := c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2
 export PYTHON_SHA256SUM := 063d2c3b0402d6191b90731e0f735c64830e7522348aeb7ed382a83165d45009
diff --git a/external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1 b/external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1
deleted file mode 100644
index b459a0a0bef7..000000000000
--- a/external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1
+++ /dev/null
@@ -1,27 +0,0 @@
-From f4136a6353162db249f63ddb0f20611622ab61b4 Mon Sep 17 00:00:00 2001
-From: Albert Astals Cid <aacid at kde.org>
-Date: Wed, 27 Feb 2019 19:43:22 +0100
-Subject: [PATCH] ImageStream::getLine: fix crash on broken files
-
-Fixes #728
----
- poppler/Stream.cc | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/poppler/Stream.cc b/poppler/Stream.cc
-index 33537b0e..a41435ab 100644
---- a/poppler/Stream.cc
-+++ b/poppler/Stream.cc
-@@ -496,6 +496,9 @@ unsigned char *ImageStream::getLine() {
-   }
-  
-   int readChars = str->doGetChars(inputLineSize, inputLine);
-+  if (unlikely(readChars == -1)) {
-+      readChars = 0;
-+  }
-   for ( ; readChars < inputLineSize; readChars++) inputLine[readChars] = EOF;
-   if (nBits == 1) {
-     unsigned char *p = inputLine;
--- 
-2.20.1
-
diff --git a/external/poppler/0001-Revert-Make-the-mul-tables-be-calculated-at-compile-.patch.1 b/external/poppler/0001-Revert-Make-the-mul-tables-be-calculated-at-compile-.patch.1
new file mode 100644
index 000000000000..26fdc10dec50
--- /dev/null
+++ b/external/poppler/0001-Revert-Make-the-mul-tables-be-calculated-at-compile-.patch.1
@@ -0,0 +1,169 @@
+Revert "Make the mul tables be calculated at compile time with constexpr"
+
+This reverts commit e0ef346c0f669140076c4cf443f07ea0770996da.
+---
+ poppler/Decrypt.cc | 134 ++++++++++++---------------------------------
+ 1 file changed, 35 insertions(+), 99 deletions(-)
+
+diff --git a/poppler/Decrypt.cc b/poppler/Decrypt.cc
+index 57945778..f5062929 100644
+--- a/poppler/Decrypt.cc
++++ b/poppler/Decrypt.cc
+@@ -763,119 +763,55 @@ static inline void invShiftRows(unsigned char *state) {
+ }
+ 
+ // {02} \cdot s
+-struct Mul02Table
+-{
+-  constexpr Mul02Table() : values()
+-  {
+-    for(int s = 0; s < 256; s++) {
+-      values[s] = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+-    }
+-  }
+-
+-  constexpr unsigned char operator()(uint8_t i) const { return values[i]; }
+-
+-  unsigned char values[256];
+-};
+-
+-static constexpr Mul02Table mul02;
++static inline unsigned char mul02(unsigned char s) {
++  return (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
++}
+ 
+ // {03} \cdot s
+-struct Mul03Table
+-{
+-  constexpr Mul03Table() : values()
+-  {
+-    for(int s=0; s<256; s++) {
+-      const unsigned char s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+-      values[s] = s ^ s2;
+-    }
+-  }
+-
+-  constexpr unsigned char operator()(uint8_t i) const { return values[i]; }
+-
+-  unsigned char values[256];
+-};
+-
+-static constexpr Mul03Table mul03;
++static inline unsigned char mul03(unsigned char s) {
++  unsigned char s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
++  return s ^ s2;
++}
+ 
+ // {09} \cdot s
+-struct Mul09Table
+-{
+-  constexpr Mul09Table() : values()
+-  {
+-    for(int s=0; s<256; s++) {
+-      const unsigned char s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+-      const unsigned char s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
+-      const unsigned char s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+-      values[s] = s ^ s8;
+-    }
+-  }
+-
+-  constexpr unsigned char operator()(uint8_t i) const { return values[i]; }
+-
+-  unsigned char values[256];
+-};
++static inline unsigned char mul09(unsigned char s) {
++  unsigned char s2, s4, s8;
+ 
+-static constexpr Mul09Table mul09;
++  s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
++  s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
++  s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
++  return s ^ s8;
++}
+ 
+ // {0b} \cdot s
+-struct Mul0bTable
+-{
+-  constexpr Mul0bTable() : values()
+-  {
+-    for(int s=0; s<256; s++) {
+-      const unsigned char s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+-      const unsigned char s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
+-      const unsigned char s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+-      values[s] = s ^ s2 ^ s8;
+-    }
+-  }
+-
+-  constexpr unsigned char operator()(uint8_t i) const { return values[i]; }
++static inline unsigned char mul0b(unsigned char s) {
++  unsigned char s2, s4, s8;
+ 
+-  unsigned char values[256];
+-};
+-
+-static constexpr Mul0bTable mul0b;
++  s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
++  s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
++  s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
++  return s ^ s2 ^ s8;
++}
+ 
+ // {0d} \cdot s
+-struct Mul0dTable
+-{
+-  constexpr Mul0dTable() : values()
+-  {
+-    for(int s=0; s<256; s++) {
+-      const unsigned char s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+-      const unsigned char s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
+-      const unsigned char s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+-      values[s] = s ^ s4 ^ s8;
+-    }
+-  }
++static inline unsigned char mul0d(unsigned char s) {
++  unsigned char s2, s4, s8;
+ 
+-  constexpr unsigned char operator()(uint8_t i) const { return values[i]; }
+-
+-  unsigned char values[256];
+-};
+-
+-static constexpr Mul0dTable mul0d;
++  s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
++  s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
++  s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
++  return s ^ s4 ^ s8;
++}
+ 
+ // {0e} \cdot s
+-struct Mul0eTable
+-{
+-  constexpr Mul0eTable() : values()
+-  {
+-    for(int s=0; s<256; s++) {
+-      const unsigned char s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
+-      const unsigned char s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
+-      const unsigned char s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
+-      values[s] = s2 ^ s4 ^ s8;
+-    }
+-  }
+-
+-  constexpr unsigned char operator()(uint8_t i) const { return values[i]; }
++static inline unsigned char mul0e(unsigned char s) {
++  unsigned char s2, s4, s8;
+ 
+-  unsigned char values[256];
+-};
+-
+-static constexpr Mul0eTable mul0e;
++  s2 = (s & 0x80) ? ((s << 1) ^ 0x1b) : (s << 1);
++  s4 = (s2 & 0x80) ? ((s2 << 1) ^ 0x1b) : (s2 << 1);
++  s8 = (s4 & 0x80) ? ((s4 << 1) ^ 0x1b) : (s4 << 1);
++  return s2 ^ s4 ^ s8;
++}
+ 
+ static inline void mixColumns(unsigned char *state) {
+   int c;
+-- 
+2.21.0
+
diff --git a/external/poppler/StaticLibrary_poppler.mk b/external/poppler/StaticLibrary_poppler.mk
index aa5ed693eb22..ae03836f2ba6 100644
--- a/external/poppler/StaticLibrary_poppler.mk
+++ b/external/poppler/StaticLibrary_poppler.mk
@@ -55,7 +55,6 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\
 	UnpackedTarball/poppler/goo/gfile \
 	UnpackedTarball/poppler/goo/GooTimer \
 	UnpackedTarball/poppler/goo/GooString \
-	UnpackedTarball/poppler/goo/FixedPoint \
 	UnpackedTarball/poppler/goo/NetPBMWriter \
 	UnpackedTarball/poppler/goo/PNGWriter \
 	UnpackedTarball/poppler/goo/TiffWriter \
diff --git a/external/poppler/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk
index 151fa5d0444f..76fd33236e5d 100644
--- a/external/poppler/UnpackedTarball_poppler.mk
+++ b/external/poppler/UnpackedTarball_poppler.mk
@@ -14,7 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,poppler,$(POPPLER_TARBALL),,poppler
 $(eval $(call gb_UnpackedTarball_add_patches,poppler,\
 	external/poppler/poppler-config.patch.1 \
 	external/poppler/poppler-c++11.patch.1 \
-	external/poppler/0001-ImageStream-getLine-fix-crash-on-broken-files.patch.1 \
+	external/poppler/0001-Revert-Make-the-mul-tables-be-calculated-at-compile-.patch.1 \
 ))
 
 # std::make_unique is only available in C++14
@@ -23,7 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,poppler,\
 # be happy with std::make_unique so just skip it
 ifneq ($(OS_FOR_BUILD),MACOSX)
 $(eval $(call gb_UnpackedTarball_set_post_action,poppler,\
-	env -i PATH="$(PATH)" $(FIND) . -name '*.cc' -exec sed -i -e 's/std::make_unique/o3tl::make_unique/' {} \\; \
+	env -i PATH="$(if $(filter WNT,$(OS)),/usr/bin,$(PATH))" $(FIND) . -name '*.cc' -exec sed -i -e 's/std::make_unique/o3tl::make_unique/' {} \\; \
 ))
 endif
 
diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1
index 1c68806276f7..cb74cd66fb5e 100644
--- a/external/poppler/poppler-config.patch.1
+++ b/external/poppler/poppler-config.patch.1
@@ -195,7 +195,7 @@ index 0fbd336a..451213f8 100644
 +#define PACKAGE_NAME "poppler"
 +
 +/* Define to the full name and version of this package. */
-+#define PACKAGE_STRING "poppler 0.74.0"
++#define PACKAGE_STRING "poppler 0.82.0"
 +
 +/* Define to the one symbol short name of this package. */
 +#define PACKAGE_TARNAME "poppler"
@@ -204,7 +204,7 @@ index 0fbd336a..451213f8 100644
 +#define PACKAGE_URL ""
 +
 +/* Define to the version of this package. */
-+#define PACKAGE_VERSION "0.74.0"
++#define PACKAGE_VERSION "0.82.0"
 +
 +/* Poppler data dir */
 +#define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -228,7 +228,7 @@ index 0fbd336a..451213f8 100644
 +/* #undef USE_FLOAT */
 +
 +/* Version number of package */
-+#define VERSION "0.74.0"
++#define VERSION "0.82.0"
 +
 +#if defined(__APPLE__)
 +#elif defined (_WIN32)
@@ -268,7 +268,7 @@ new file mode 100644
 index 0fbd336a..451213f8 100644
 --- /dev/null
 +++ b/poppler/poppler-config.h
-@@ -0,0 +1,168 @@
+@@ -0,0 +1,173 @@
 +//================================================= -*- mode: c++ -*- ====
 +//
 +// poppler-config.h
@@ -304,7 +304,7 @@ index 0fbd336a..451213f8 100644
 +
 +/* Defines the poppler version. */
 +#ifndef POPPLER_VERSION
-+#define POPPLER_VERSION "0.74.0"
++#define POPPLER_VERSION "0.82.0"
 +#endif
 +
 +/* Enable multithreading support. */
@@ -396,6 +396,11 @@ index 0fbd336a..451213f8 100644
 +/* #undef USE_CMS */
 +#endif
 +
++/* Use header-only classes from Boost in the Splash backend */
++#ifndef USE_BOOST_HEADERS
++/* #undef USE_BOOST_HEADERS */
++#endif
++
 +// Also, there are preprocessor symbols in the header files
 +// that are used but never defined when building poppler using configure
 +// or cmake: DISABLE_OUTLINE, DEBUG_MEM,
@@ -466,9 +471,9 @@ index 0fbd336a..451213f8 100644
 +
 +#include "poppler-global.h"
 +
-+#define POPPLER_VERSION "0.74.0"
++#define POPPLER_VERSION "0.82.0"
 +#define POPPLER_VERSION_MAJOR 0
-+#define POPPLER_VERSION_MINOR 74
++#define POPPLER_VERSION_MINOR 82
 +#define POPPLER_VERSION_MICRO 0
 +
 +namespace poppler
commit b4f2533ef0966dc792bdd76cd166777322a402d6
Author:     Rasmus Thomsen <oss at cogitri.dev>
AuthorDate: Sat Oct 26 14:11:35 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 15 19:09:02 2020 +0200

    Fix build with poppler-0.82
    
    Reviewed-on: https://gerrit.libreoffice.org/81545
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 2eadd46ab81058087af95bdfc1fea28fcdb65998)
    Reviewed-on: https://gerrit.libreoffice.org/83363
    Reviewed-by: Rasmus Thomsen <oss at cogitri.dev>
    (cherry picked from commit 928a372775a0758aa76eb10e568d5c106a8586eb)
    
    Change-Id: I3b6b3faea7986f3e5a6ae4790580d03bc9c955fc

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index cd6a5b65e30a..ed9ea6cc5440 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -877,11 +877,20 @@ void PDFOutDev::eoClip(GfxState *state)
     local offset of character (zero for horizontal writing mode). not
     taken into account for output pos updates. Used for vertical writing.
  */
+
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+void PDFOutDev::drawChar(GfxState *state, double x, double y,
+                         double dx, double dy,
+                         double originX, double originY,
+                         CharCode, int /*nBytes*/, const Unicode *u, int uLen)
+{
+#else
 void PDFOutDev::drawChar(GfxState *state, double x, double y,
                          double dx, double dy,
                          double originX, double originY,
                          CharCode, int /*nBytes*/, Unicode *u, int uLen)
 {
+#endif
     assert(state);
 
     if( u == nullptr )
@@ -995,6 +1004,13 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str,
     writeBinaryBuffer(aBuf);
 }
 
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
+                          int width, int height, GfxImageColorMap* colorMap,
+                          poppler_bool /*interpolate*/,
+                          const int* maskColors, poppler_bool /*inlineImg*/ )
+{
+#else
 void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
                           int width, int height, GfxImageColorMap* colorMap,
 #if POPPLER_CHECK_VERSION(0, 12, 0)
@@ -1002,6 +1018,7 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
 #endif
                           int* maskColors, poppler_bool /*inlineImg*/ )
 {
+#endif
     if (m_bSkipImages)
         return;
     OutputBuffer aBuf; initBuf(aBuf);
@@ -1022,12 +1039,20 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
         {
             GfxRGB aMinRGB;
             colorMap->getColorSpace()->getRGB(
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+                reinterpret_cast<const GfxColor*>(maskColors),
+#else
                 reinterpret_cast<GfxColor*>(maskColors),
+#endif
                 &aMinRGB );
 
             GfxRGB aMaxRGB;
             colorMap->getColorSpace()->getRGB(
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+                reinterpret_cast<const GfxColor*>(maskColors)+gfxColorMaxComps,
+#else
                 reinterpret_cast<GfxColor*>(maskColors)+gfxColorMaxComps,
+#endif
                 &aMaxRGB );
 
             aMaskBuf.push_back( colToByte(aMinRGB.r) );
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
index ced1a653a494..ccf5b8fa9535 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -232,10 +232,17 @@ namespace pdfi
         virtual void eoClip(GfxState *state) override;
 
         //----- text drawing
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+        virtual void drawChar(GfxState *state, double x, double y,
+                              double dx, double dy,
+                              double originX, double originY,
+                              CharCode code, int nBytes, const Unicode *u, int uLen) override;
+#else
         virtual void drawChar(GfxState *state, double x, double y,
                               double dx, double dy,
                               double originX, double originY,
                               CharCode code, int nBytes, Unicode *u, int uLen) override;
+#endif
 #if POPPLER_CHECK_VERSION(0, 64, 0)
         virtual void drawString(GfxState *state, const GooString *s) override;
 #else
@@ -250,12 +257,19 @@ namespace pdfi
                                    poppler_bool interpolate,
 #endif
                                    poppler_bool inlineImg) override;
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+        virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+                               int width, int height, GfxImageColorMap *colorMap,
+                               poppler_bool interpolate,
+                               const int* maskColors, poppler_bool inlineImg) override;
+#else
         virtual void drawImage(GfxState *state, Object *ref, Stream *str,
                                int width, int height, GfxImageColorMap *colorMap,
 #if POPPLER_CHECK_VERSION(0, 12, 0)
                                poppler_bool interpolate,
 #endif
                                int *maskColors, poppler_bool inlineImg) override;
+#endif
         virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
                                      int width, int height,
                                      GfxImageColorMap *colorMap,
commit 23c1d040bd4836d3c2afc48181fedff3e026619f
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Nov 20 15:08:24 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 15 19:09:02 2020 +0200

    libxslt: upgrade to release 1.1.34
    
    Fixes CVE-2019-18197.
    
    Remove obsolete e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1.
    
    Reviewed-on: https://gerrit.libreoffice.org/83312
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit e9ea24cc004a8b9a5856f2f268bd40433c504db1)
    Reviewed-on: https://gerrit.libreoffice.org/83377
    (cherry picked from commit d19b32c779bfeb51ef9570c3de8ed1925ec44473)
    
    Change-Id: I95cf498e245083528f98bfef8cdd240bbe2211b9

diff --git a/download.lst b/download.lst
index 159899abdbbc..7015fb31b8ca 100644
--- a/download.lst
+++ b/download.lst
@@ -175,8 +175,8 @@ export XMLSEC_TARBALL := xmlsec1-1.2.25.tar.gz
 export LIBXML_SHA256SUM := aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
 export LIBXML_VERSION_MICRO := 10
 export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO).tar.gz
-export LIBXSLT_SHA256SUM := 8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8
-export LIBXSLT_VERSION_MICRO := 33
+export LIBXSLT_SHA256SUM := 98b1bd46d6792925ad2dfe9a87452ea2adebf69dcb9919ffd55bf926a7f93f7f
+export LIBXSLT_VERSION_MICRO := 34
 export LIBXSLT_TARBALL := libxslt-1.1.$(LIBXSLT_VERSION_MICRO).tar.gz
 export LPSOLVE_SHA256SUM := 171816288f14215c69e730f7a4f1c325739873e21f946ff83884b350574e6695
 export LPSOLVE_TARBALL := 26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz
diff --git a/external/libxslt/UnpackedTarball_libxslt.mk b/external/libxslt/UnpackedTarball_libxslt.mk
index beb591b8b2a8..b035e99f0a79 100644
--- a/external/libxslt/UnpackedTarball_libxslt.mk
+++ b/external/libxslt/UnpackedTarball_libxslt.mk
@@ -19,7 +19,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libxslt,\
 	external/libxslt/libxslt-msvc.patch.2 \
 	external/libxslt/libxslt-1.1.26-memdump.patch \
 	external/libxslt/rpath.patch.0 \
-	external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1 \
+	external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1 b/external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1
deleted file mode 100644
index 260f35d1a35e..000000000000
--- a/external/libxslt/e03553605b45c88f0b4b2980adfbbb8f6fca2fd6.patch.1
+++ /dev/null
@@ -1,120 +0,0 @@
-From e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 Mon Sep 17 00:00:00 2001
-From: Nick Wellnhofer <wellnhofer at aevum.de>
-Date: Sun, 24 Mar 2019 09:51:39 +0100
-Subject: [PATCH] Fix security framework bypass
-
-xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
-don't check for this condition and allow access. With a specially
-crafted URL, xsltCheckRead could be tricked into returning an error
-because of a supposedly invalid URL that would still be loaded
-succesfully later on.
-
-Fixes #12.
-
-Thanks to Felix Wilhelm for the report.
----
- libxslt/documents.c | 18 ++++++++++--------
- libxslt/imports.c   |  9 +++++----
- libxslt/transform.c |  9 +++++----
- libxslt/xslt.c      |  9 +++++----
- 4 files changed, 25 insertions(+), 20 deletions(-)
-
-diff --git a/libxslt/documents.c b/libxslt/documents.c
-index 3f3a7312..4aad11bb 100644
---- a/libxslt/documents.c
-+++ b/libxslt/documents.c
-@@ -296,10 +296,11 @@ xsltLoadDocument(xsltTransformContextPtr ctxt, const xmlChar *URI) {
- 	int res;
- 
- 	res = xsltCheckRead(ctxt->sec, ctxt, URI);
--	if (res == 0) {
--	    xsltTransformError(ctxt, NULL, NULL,
--		 "xsltLoadDocument: read rights for %s denied\n",
--			     URI);
-+	if (res <= 0) {
-+            if (res == 0)
-+                xsltTransformError(ctxt, NULL, NULL,
-+                     "xsltLoadDocument: read rights for %s denied\n",
-+                                 URI);
- 	    return(NULL);
- 	}
-     }
-@@ -372,10 +373,11 @@ xsltLoadStyleDocument(xsltStylesheetPtr style, const xmlChar *URI) {
- 	int res;
- 
- 	res = xsltCheckRead(sec, NULL, URI);
--	if (res == 0) {
--	    xsltTransformError(NULL, NULL, NULL,
--		 "xsltLoadStyleDocument: read rights for %s denied\n",
--			     URI);
-+	if (res <= 0) {
-+            if (res == 0)
-+                xsltTransformError(NULL, NULL, NULL,
-+                     "xsltLoadStyleDocument: read rights for %s denied\n",
-+                                 URI);
- 	    return(NULL);
- 	}
-     }
-diff --git a/libxslt/imports.c b/libxslt/imports.c
-index 874870cc..3783b247 100644
---- a/libxslt/imports.c
-+++ b/libxslt/imports.c
-@@ -130,10 +130,11 @@ xsltParseStylesheetImport(xsltStylesheetPtr style, xmlNodePtr cur) {
- 	int secres;
- 
- 	secres = xsltCheckRead(sec, NULL, URI);
--	if (secres == 0) {
--	    xsltTransformError(NULL, NULL, NULL,
--		 "xsl:import: read rights for %s denied\n",
--			     URI);
-+	if (secres <= 0) {
-+            if (secres == 0)
-+                xsltTransformError(NULL, NULL, NULL,
-+                     "xsl:import: read rights for %s denied\n",
-+                                 URI);
- 	    goto error;
- 	}
-     }
-diff --git a/libxslt/transform.c b/libxslt/transform.c
-index 13793914..0636dbd0 100644
---- a/libxslt/transform.c
-+++ b/libxslt/transform.c
-@@ -3493,10 +3493,11 @@ xsltDocumentElem(xsltTransformContextPtr ctxt, xmlNodePtr node,
-      */
-     if (ctxt->sec != NULL) {
- 	ret = xsltCheckWrite(ctxt->sec, ctxt, filename);
--	if (ret == 0) {
--	    xsltTransformError(ctxt, NULL, inst,
--		 "xsltDocumentElem: write rights for %s denied\n",
--			     filename);
-+	if (ret <= 0) {
-+            if (ret == 0)
-+                xsltTransformError(ctxt, NULL, inst,
-+                     "xsltDocumentElem: write rights for %s denied\n",
-+                                 filename);
- 	    xmlFree(URL);
- 	    xmlFree(filename);
- 	    return;
-diff --git a/libxslt/xslt.c b/libxslt/xslt.c
-index 780a5ad7..a234eb79 100644
---- a/libxslt/xslt.c
-+++ b/libxslt/xslt.c
-@@ -6763,10 +6763,11 @@ xsltParseStylesheetFile(const xmlChar* filename) {
- 	int res;
- 
- 	res = xsltCheckRead(sec, NULL, filename);
--	if (res == 0) {
--	    xsltTransformError(NULL, NULL, NULL,
--		 "xsltParseStylesheetFile: read rights for %s denied\n",
--			     filename);
-+	if (res <= 0) {
-+            if (res == 0)
-+                xsltTransformError(NULL, NULL, NULL,
-+                     "xsltParseStylesheetFile: read rights for %s denied\n",
-+                                 filename);
- 	    return(NULL);
- 	}
-     }
--- 
-2.18.1
-
diff --git a/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1 b/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1
new file mode 100644
index 000000000000..f82c2e4f77ee
--- /dev/null
+++ b/external/libxslt/e2584eed1c84c18f16e42188c30d2c3d8e3e8853.patch.1
@@ -0,0 +1,69 @@
+From e2584eed1c84c18f16e42188c30d2c3d8e3e8853 Mon Sep 17 00:00:00 2001
+From: Chun-wei Fan <fanchunwei at src.gnome.org>
+Date: Tue, 12 Nov 2019 17:37:05 +0800
+Subject: [PATCH] win32: Add configuration for profiler
+
+Without this the generated xsltconfig.h will not be complete as there
+will be a configuration variable that is left in the header, breaking
+builds.
+
+This will allow one to enable or disable profiler support in Windows
+builds, and the default is to enable this.
+---
+ win32/configure.js | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/win32/configure.js b/win32/configure.js
+index 56694cce..12c99f30 100644
+--- a/win32/configure.js
++++ b/win32/configure.js
+@@ -47,6 +47,7 @@ var withIconv = true;
+ var withZlib = false;
+ var withCrypto = true;
+ var withModules = false;
++var withProfiler = true;
+ /* Win32 build options. */
+ var dirSep = "\\";
+ var compiler = "msvc";
+@@ -106,6 +107,7 @@ function usage()
+ 	txt += "  zlib:       Use zlib library (" + (withZlib? "yes" : "no") + ")\n";
+ 	txt += "  crypto:     Enable Crypto support (" + (withCrypto? "yes" : "no") + ")\n";
+ 	txt += "  modules:    Enable Module support (" + (withModules? "yes" : "no") + ")\n";
++	txt += "  profiler:   Enable Profiler support (" + (withProfiler? "yes" : "no") + ")\n";
+ 	txt += "\nWin32 build options, default value given in parentheses:\n\n";
+ 	txt += "  compiler:   Compiler to be used [msvc|mingw] (" + compiler + ")\n";
+ 	txt += "  cruntime:   C-runtime compiler option (only msvc) (" + cruntime + ")\n";
+@@ -192,6 +194,7 @@ function discoverVersion()
+ 	vf.WriteLine("WITH_ZLIB=" + (withZlib? "1" : "0"));
+ 	vf.WriteLine("WITH_CRYPTO=" + (withCrypto? "1" : "0"));
+ 	vf.WriteLine("WITH_MODULES=" + (withModules? "1" : "0"));
++	vf.WriteLine("WITH_PROFILER=" + (withProfiler? "1" : "0"));
+ 	vf.WriteLine("DEBUG=" + (buildDebug? "1" : "0"));
+ 	vf.WriteLine("STATIC=" + (buildStatic? "1" : "0"));
+ 	vf.WriteLine("PREFIX=" + buildPrefix);
+@@ -240,6 +243,8 @@ function configureXslt()
+ 			of.WriteLine(s.replace(/\@WITH_DEBUGGER\@/, withDebugger? "1" : "0"));
+ 		} else if (s.search(/\@WITH_MODULES\@/) != -1) {
+ 			of.WriteLine(s.replace(/\@WITH_MODULES\@/, withModules? "1" : "0"));
++		} else if (s.search(/\@WITH_PROFILER\@/) != -1) {
++			of.WriteLine(s.replace(/\@WITH_PROFILER\@/, withProfiler? "1" : "0"));
+ 		} else if (s.search(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/) != -1) {
+ 			of.WriteLine(s.replace(/\@LIBXSLT_DEFAULT_PLUGINS_PATH\@/, "NULL"));
+ 		} else
+@@ -343,6 +348,8 @@ for (i = 0; (i < WScript.Arguments.length) && (error == 0); i++) {
+ 			withCrypto = strToBool(arg.substring(opt.length + 1, arg.length));
+ 		else if (opt == "modules")
+ 			withModules = strToBool(arg.substring(opt.length + 1, arg.length));
++		else if (opt == "profiler")
++			withProfiler = strToBool(arg.substring(opt.length + 1, arg.length));
+ 		else if (opt == "compiler")
+ 			compiler = arg.substring(opt.length + 1, arg.length);
+  		else if (opt == "cruntime")
+@@ -477,6 +484,7 @@ txtOut += "         Use iconv: " + boolToStr(withIconv) + "\n";
+ txtOut += "         With zlib: " + boolToStr(withZlib) + "\n";
+ txtOut += "            Crypto: " + boolToStr(withCrypto) + "\n";
+ txtOut += "           Modules: " + boolToStr(withModules) + "\n";
++txtOut += "          Profiler: " + boolToStr(withProfiler) + "\n";
+ txtOut += "\n";
+ txtOut += "Win32 build configuration\n";
+ txtOut += "-------------------------\n";
diff --git a/external/libxslt/libxslt-config.patch.1 b/external/libxslt/libxslt-config.patch.1
index 7e2936357671..184f001f672e 100644
--- a/external/libxslt/libxslt-config.patch.1
+++ b/external/libxslt/libxslt-config.patch.1
@@ -23,13 +23,13 @@ Hack the xslt-config to return paths into WORKDIR.
  
  usage()
  {
-@@ -89,7 +95,8 @@
-     shift
- done
+@@ -92,7 +98,8 @@
+             libs="@XSLT_LIBDIR@ $libs"
+         fi
  
--the_libs="@XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@"
-+#the_libs="@XSLT_LIBDIR@ @XSLT_LIBS@ @EXTRA_LIBS@"
-+the_libs="-L${libdir} -lxslt -lm"
- if test "$includedir" != "/usr/include"; then
-     the_flags="$the_flags -I$includedir `@XML_CONFIG@ --cflags`"
- else
+-        libs="$libs @EXTRA_LIBS@"
++        #libs="$libs @EXTRA_LIBS@"
++        libs="-L${libdir}/libxslt/.libs -L${libdir}/libexslt/.libs -lxslt -lm"
+        	;;
+ 
+     *)
diff --git a/external/libxslt/libxslt-internal-symbols.patch.1 b/external/libxslt/libxslt-internal-symbols.patch.1
index 7b13e1007c00..84a15154d729 100644
--- a/external/libxslt/libxslt-internal-symbols.patch.1
+++ b/external/libxslt/libxslt-internal-symbols.patch.1
@@ -1,13 +1,13 @@
 --- xslt/libxslt/libxslt.syms.orig	2017-09-05 16:25:50.504966267 +0200
 +++ xslt/libxslt/libxslt.syms	2017-09-05 16:41:00.256895709 +0200
 @@ -497,5 +497,10 @@
- # xsltInternals
-   xsltFlagRVTs;
-   xsltDecimalFormatGetByQName;
+ 
+ # pattern
+   xsltCompMatchClearCache;
 +
 +# Solaris ld needs explicit auto-reduction (or, alternatively, "-B local")
 +    local:
 +  *;
 +
- } LIBXML2_1.1.27;
+ } LIBXML2_1.1.30;
  
commit 5d186acf4f1008edae46bcc66f40498f6e21a65a
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Nov 20 15:05:02 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 15 19:09:02 2020 +0200

    libxml2: upgrade to release 2.9.10
    
    ... which is, surprisingly enough, required to build the latest libxslt.
    
    Reviewed-on: https://gerrit.libreoffice.org/83311
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit d1bf39a78ed239d4493f0470ca937852265e79d6)
    Reviewed-on: https://gerrit.libreoffice.org/83347
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit e9dc4662d4ba3bde91407911f1bc1a7aa25fa0ce)
    
    Change-Id: Ifbb36ed61b8f68185f9c788f63a8edeb58899f94

diff --git a/download.lst b/download.lst
index f828c2fb989c..159899abdbbc 100644
--- a/download.lst
+++ b/download.lst
@@ -172,8 +172,8 @@ export LIBTOMMATH_SHA256SUM := 083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304
 export LIBTOMMATH_TARBALL := ltm-1.0.zip
 export XMLSEC_SHA256SUM := 967ca83edf25ccb5b48a3c4a09ad3405a63365576503bf34290a42de1b92fcd2
 export XMLSEC_TARBALL := xmlsec1-1.2.25.tar.gz
-export LIBXML_SHA256SUM := 94fb70890143e3c6549f265cee93ec064c80a84c42ad0f23e85ee1fd6540a871
-export LIBXML_VERSION_MICRO := 9
+export LIBXML_SHA256SUM := aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f
+export LIBXML_VERSION_MICRO := 10
 export LIBXML_TARBALL := libxml2-2.9.$(LIBXML_VERSION_MICRO).tar.gz
 export LIBXSLT_SHA256SUM := 8e36605144409df979cab43d835002f63988f3dc94d5d3537c12796db90e38c8
 export LIBXSLT_VERSION_MICRO := 33
diff --git a/external/libxml2/libxml2-android.patch b/external/libxml2/libxml2-android.patch
index 714de61068fb..42af83274026 100644
--- a/external/libxml2/libxml2-android.patch
+++ b/external/libxml2/libxml2-android.patch
@@ -4,7 +4,7 @@
  	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
  check: $(BUILT_SOURCES)
  	$(MAKE) $(AM_MAKEFLAGS) check-recursive
--all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \
+-all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \
 +all-am: Makefile $(LTLIBRARIES) \
  		config.h
  install-binPROGRAMS: install-libLTLIBRARIES
diff --git a/external/libxml2/libxml2-config.patch.1 b/external/libxml2/libxml2-config.patch.1
index 7d96fb530e57..8c28fb6a7806 100644
--- a/external/libxml2/libxml2-config.patch.1
+++ b/external/libxml2/libxml2-config.patch.1
@@ -25,45 +25,19 @@ Hack the xml2-config to return paths into WORKDIR.
  	;;
  
      --cflags)
--       	echo @XML_INCLUDEDIR@ @XML_CFLAGS@
-+        echo -I${includedir}
-+#       	echo @XML_INCLUDEDIR@ @XML_CFLAGS@
+-        cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
++        #cflags="@XML_INCLUDEDIR@ @XML_CFLAGS@"
++        cflags="-I${includedir}"
         	;;
  
      --libtool-libs)
-@@ -82,19 +88,24 @@
-        	;;
+@@ -91,7 +96,8 @@
+             libs="@XML_LIBDIR@ $libs"
+         fi
  
-     --libs)
--        if [ "`uname`" = "Linux" ]
--	then
--	    if [ "@XML_LIBDIR@" = "-L/usr/lib" -o "@XML_LIBDIR@" = "-L/usr/lib64" ]
--	    then
--		echo @XML_LIBS@ @MODULE_PLATFORM_LIBS@
--	    else
--		echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@
--	    fi
--	else
--	    echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@ @WIN32_EXTRA_LIBADD@
--	fi
-+        echo -L${libdir} -lxml2 -lm
-+#        if [ "`uname`" = "Linux" ]
-+#	then
-+#	    if [ "@XML_LIBDIR@" = "-L/usr/lib" -o "@XML_LIBDIR@" = "-L/usr/lib64" ]
-+#	    then
-+#		echo @XML_LIBS@ @MODULE_PLATFORM_LIBS@
-+#	    else
-+#		echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@
-+#	    fi
-+#	else
-+#	    echo @XML_LIBDIR@ @XML_LIBS@ @MODULE_PLATFORM_LIBS@ @WIN32_EXTRA_LIBADD@
-+#	fi
-        	;;
+-        libs="$libs @WIN32_EXTRA_LIBADD@"
++        #libs="$libs @WIN32_EXTRA_LIBADD@"
++        libs="-L${libdir} -lxml2 -lm"
+         ;;
  
-+    print) # ugly configure hack
-+        exit 0
-+        ;;
-+ 
      *)
- 	usage
- 	exit 1
commit 2e9ffdfc6f3ef5d282d508f231094681ce2548c5
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Fri Aug 16 15:36:15 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 15 19:09:01 2020 +0200

    Resolves: tdf#126928 allow link updates in an intermediate linked document
    
    ... if link updates are allowed in the current document and that
    intermediate document resides in a trusted location.
    
    This works with both, the "Always (from trusted locations)" and
    the "On request" settings under Tools -> Options -> Calc ->
    General. It can't work with documents residing in a non-trusted
    location as there is no way to allow updates on demand for a such
    loaded document (hidden via formulas).
    
    Reviewed-on: https://gerrit.libreoffice.org/77588
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit 54bf84746a2a9a2e2aaf0df9e429b0cfd538f640)
    Reviewed-on: https://gerrit.libreoffice.org/77604
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 14825a8b7f00ee4c148f2583856e5102312cabbd)
    
    (cherry picked from commit f136b30fa3e991b780e4b1ed704d04256d0cfca0)
    
    Change-Id: Ie483f7743db7c6d5cf947dc16a9c3660855f3423

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 39f4770ef8c8..7f43b86576c4 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -601,15 +601,22 @@ bool ScDocShell::Load( SfxMedium& rMedium )
     bool bRet = SfxObjectShell::Load(rMedium);
     if (bRet)
     {
-        comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = getEmbeddedObjectContainer();
-        rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);
-
         if (GetMedium())
         {
             const SfxUInt16Item* pUpdateDocItem = SfxItemSet::GetItem<SfxUInt16Item>(rMedium.GetItemSet(), SID_UPDATEDOCMODE, false);
             m_nCanUpdate = pUpdateDocItem ? pUpdateDocItem->GetValue() : css::document::UpdateDocMode::NO_UPDATE;
         }
 
+        // GetLinkUpdateModeState() evaluates m_nCanUpdate so that must have
+        // been set first. Do not override an already forbidden LinkUpdate (the
+        // default is allow).
+        comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = getEmbeddedObjectContainer();
+        if (rEmbeddedObjectContainer.getUserAllowsLinkUpdate())
+        {
+            // For anything else than LM_ALWAYS we need user confirmation.
+            rEmbeddedObjectContainer.setUserAllowsLinkUpdate( GetLinkUpdateModeState() == LM_ALWAYS);
+        }
+
         {
             //  prepare a valid document for XML filter
             //  (for ConvertFrom, InitNew is called before)
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index c157374b21d8..23ce5db529f7 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -112,6 +112,41 @@ using namespace ::com::sun::star;
 #include <memory>
 #include <sfx2/notebookbar/SfxNotebookBar.hxx>
 
+ScLkUpdMode ScDocShell::GetLinkUpdateModeState() const
+{
+    const ScDocument& rDoc = GetDocument();
+
+    ScLkUpdMode nSet = rDoc.GetLinkMode();
+
+    if (nSet == LM_UNKNOWN)
+    {
+        ScAppOptions aAppOptions = SC_MOD()->GetAppOptions();
+        nSet = aAppOptions.GetLinkMode();
+    }
+
+    if (m_nCanUpdate == css::document::UpdateDocMode::NO_UPDATE)
+        nSet = LM_NEVER;
+    else if (m_nCanUpdate == css::document::UpdateDocMode::FULL_UPDATE)
+        nSet = LM_ALWAYS;
+
+    if (nSet == LM_ALWAYS
+            && !(SvtSecurityOptions().isTrustedLocationUriForUpdatingLinks(
+                    GetMedium() == nullptr ? OUString() : GetMedium()->GetName())
+                || (IsDocShared()
+                    && SvtSecurityOptions().isTrustedLocationUriForUpdatingLinks(
+                        GetSharedFileURL()))))
+    {
+        nSet = LM_ON_DEMAND;
+    }
+    if (m_nCanUpdate == css::document::UpdateDocMode::QUIET_UPDATE
+            && nSet == LM_ON_DEMAND)
+    {
+        nSet = LM_NEVER;
+    }
+
+    return nSet;
+}
+
 void ScDocShell::Execute( SfxRequest& rReq )
 {
     const SfxItemSet* pReqArgs = rReq.GetArgs();
@@ -413,33 +448,9 @@ void ScDocShell::Execute( SfxRequest& rReq )
 
                 ScDocument& rDoc = GetDocument();
 
-                ScLkUpdMode nSet = rDoc.GetLinkMode();
-
                 sal_uInt16 nDlgRet=RET_NO;
-                if(nSet==LM_UNKNOWN)
-                {
-                    ScAppOptions aAppOptions=SC_MOD()->GetAppOptions();
-                    nSet=aAppOptions.GetLinkMode();
-                }
 
-                if (m_nCanUpdate == css::document::UpdateDocMode::NO_UPDATE)
-                    nSet = LM_NEVER;
-                else if (m_nCanUpdate == css::document::UpdateDocMode::FULL_UPDATE)
-                    nSet = LM_ALWAYS;
-
-                if (nSet == LM_ALWAYS
-                    && !(SvtSecurityOptions()
-                         .isTrustedLocationUriForUpdatingLinks(
-                             GetMedium() == nullptr
-                             ? OUString() : GetMedium()->GetName())))
-                {
-                    nSet = LM_ON_DEMAND;
-                }
-                if (m_nCanUpdate == css::document::UpdateDocMode::QUIET_UPDATE
-                    && nSet == LM_ON_DEMAND)
-                {
-                    nSet = LM_NEVER;
-                }
+                ScLkUpdMode nSet = GetLinkUpdateModeState();
 
                 if(nSet==LM_ON_DEMAND)
                 {
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index df80b8db258d..778e761fe780 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -57,6 +57,8 @@
 #include <columnspanset.hxx>
 #include <column.hxx>
 #include <com/sun/star/document/MacroExecMode.hpp>
+#include <com/sun/star/document/UpdateDocMode.hpp>
+#include <sal/log.hxx>
 
 #include <memory>
 #include <algorithm>
@@ -2533,6 +2535,11 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
 
     // If the current document is allowed to execute macros then the referenced
     // document may execute macros according to the security configuration.
+    // Similar for UpdateDocMode to update links, just that if we reach here
+    // the user already allowed updates and intermediate documents are expected
+    // to update as well. When loading the document ScDocShell::Load() will
+    // check through ScDocShell::GetLinkUpdateModeState() if its location is
+    // trusted.
     SfxObjectShell* pShell = mpDoc->GetDocumentShell();
     if (pShell)
     {
@@ -2544,6 +2551,8 @@ SfxObjectShellRef ScExternalRefManager::loadSrcDocument(sal_uInt16 nFileId, OUSt
                     static_cast<const SfxUInt16Item*>(pItem)->GetValue() != css::document::MacroExecMode::NEVER_EXECUTE)
                 pSet->Put( SfxUInt16Item( SID_MACROEXECMODE, css::document::MacroExecMode::USE_CONFIG));
         }
+
+        pSet->Put( SfxUInt16Item( SID_UPDATEDOCMODE, css::document::UpdateDocMode::FULL_UPDATE));
     }
 
     unique_ptr<SfxMedium> pMedium(new SfxMedium(aFile, StreamMode::STD_READ, pFilter, pSet));
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 349dc278c3b3..aaa3293f51c0 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -225,6 +225,7 @@ public:
 
     void    GetDocStat( ScDocStat& rDocStat );
 
+    const ScDocument& GetDocument() const { return m_aDocument; }
     ScDocument&     GetDocument()   { return m_aDocument; }
     ScDocFunc&      GetDocFunc()    { return *m_pDocFunc; }
 
@@ -306,6 +307,7 @@ public:
     virtual void    ReconnectDdeLink(SfxObjectShell& rServer) override;
     void            UpdateLinks() override;
     void            ReloadTabLinks();
+    ScLkUpdMode     GetLinkUpdateModeState() const;
 
     void            SetFormulaOptions( const ScFormulaOptions& rOpt, bool bForLoading = false );
     virtual void    CheckConfigOptions() override;
commit 741f1a358c9eaa323b6beb8efe1abfc35ea81eb1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Sep 16 09:34:00 2019 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri May 15 18:23:02 2020 +0200

    latest expat
    
    Change-Id: Ia98c9718ccd8e18b5f56851027bde944164f05c4
    Reviewed-on: https://gerrit.libreoffice.org/78978
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 4436a29401beffd0893ecae70cd09c7a49f49f22)

diff --git a/download.lst b/download.lst
index 4aa26e40e040..f828c2fb989c 100644
--- a/download.lst
+++ b/download.lst
@@ -42,8 +42,8 @@ export EPUBGEN_TARBALL := libepubgen-0.1.0.tar.bz2
 export ETONYEK_SHA256SUM := 69dbe10d4426d52f09060d489f8eb90dfa1df592e82eb0698d9dbaf38cc734ac
 export ETONYEK_VERSION_MICRO := 7
 export ETONYEK_TARBALL := libetonyek-0.1.$(ETONYEK_VERSION_MICRO).tar.xz
-export EXPAT_SHA256SUM := d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6
-export EXPAT_TARBALL := expat-2.2.5.tar.bz2
+export EXPAT_SHA256SUM := 9a130948b05a82da34e4171d5f5ae5d321d9630277af02c8fa51e431f6475102
+export EXPAT_TARBALL := expat-2.2.8.tar.bz2
 export FIREBIRD_SHA256SUM := 6994be3555e23226630c587444be19d309b25b0fcf1f87df3b4e3f88943e5860
 export FIREBIRD_TARBALL := Firebird-3.0.0.32483-0.tar.bz2
 export FONTCONFIG_SHA256SUM := cf0c30807d08f6a28ab46c61b8dbd55c97d2f292cf88f3a07d3384687f31f017
diff --git a/external/expat/ExternalProject_expat.mk b/external/expat/ExternalProject_expat.mk
index 1a638eed14d6..87886eab1f7e 100644
--- a/external/expat/ExternalProject_expat.mk
+++ b/external/expat/ExternalProject_expat.mk
@@ -15,7 +15,7 @@ $(eval $(call gb_ExternalProject_register_targets,expat,\
 
 $(call gb_ExternalProject_get_state_target,expat,configure) :
 	$(call gb_ExternalProject_run,configure,\
-		./configure \
+		./configure --without-docbook \
 			$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) \
 			$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \
 	,,expat_configure.log)
diff --git a/external/expat/StaticLibrary_expat.mk b/external/expat/StaticLibrary_expat.mk
index 31d03d03102e..bdcc767e2905 100644
--- a/external/expat/StaticLibrary_expat.mk
+++ b/external/expat/StaticLibrary_expat.mk
@@ -48,7 +48,6 @@ $(eval $(call gb_StaticLibrary_add_cflags,expat,\
 ))
 
 $(eval $(call gb_StaticLibrary_add_generated_cobjects,expat,\
-	UnpackedTarball/expat/lib/loadlibrary \
 	UnpackedTarball/expat/lib/xmlparse \
 	UnpackedTarball/expat/lib/xmlrole \
 	UnpackedTarball/expat/lib/xmltok \
diff --git a/external/expat/StaticLibrary_expat_x64.mk b/external/expat/StaticLibrary_expat_x64.mk
index 4f92d0fb284e..a38ba28c80dd 100644
--- a/external/expat/StaticLibrary_expat_x64.mk
+++ b/external/expat/StaticLibrary_expat_x64.mk
@@ -25,7 +25,6 @@ $(eval $(call gb_StaticLibrary_add_defs,expat_x64,\
 ))
 
 $(eval $(call gb_StaticLibrary_add_x64_generated_cobjects,expat_x64,\
-	UnpackedTarball/expat/lib/loadlibrary_x64 \
 	UnpackedTarball/expat/lib/xmlparse_x64 \
 	UnpackedTarball/expat/lib/xmltok_x64 \
 	UnpackedTarball/expat/lib/xmlrole_x64 \
diff --git a/external/expat/UnpackedTarball_expat.mk b/external/expat/UnpackedTarball_expat.mk
index 7c83f65af284..5d4f41f6d147 100644
--- a/external/expat/UnpackedTarball_expat.mk
+++ b/external/expat/UnpackedTarball_expat.mk
@@ -26,7 +26,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,expat,\
 
 $(eval $(call gb_UnpackedTarball_set_post_action,expat,\
 	$(if $(filter $(BUILD_X64),TRUE),         \
-	  cp lib/loadlibrary.c lib/loadlibrary_x64.c && \
 	  cp lib/xmlparse.c lib/xmlparse_x64.c && \
 	  cp lib/xmltok.c lib/xmltok_x64.c     && \
 	  cp lib/xmlrole.c lib/xmlrole_x64.c) \
diff --git a/external/expat/expat-winapi.patch b/external/expat/expat-winapi.patch
index 3fe8a8a63e5a..b33c12b83b4c 100644
--- a/external/expat/expat-winapi.patch
+++ b/external/expat/expat-winapi.patch
@@ -1,13 +1,13 @@
 --- misc/expat-2.1.0/lib/expat_external.h	2009-11-16 08:53:17.375000000 +0000
 +++ misc/build/expat-2.1.0/lib/expat_external.h	2009-11-16 08:53:34.703125000 +0000
-@@ -7,10 +7,6 @@
+@@ -81,10 +81,6 @@
+ #  ifndef XML_BUILDING_EXPAT
+ /* using Expat from an application */
  
- /* External API definitions */
- 
--#if defined(_MSC_EXTENSIONS) && !defined(__BEOS__) && !defined(__CYGWIN__)
--# define XML_USE_MSC_EXTENSIONS 1
--#endif
+-#    if defined(_MSC_EXTENSIONS) && ! defined(__BEOS__) && ! defined(__CYGWIN__)
+-#      define XMLIMPORT __declspec(dllimport)
+-#    endif
 -
- /* Expat tries very hard to make the API boundary very specifically
-    defined.  There are two macros defined to control this boundary;
-    each of these can be defined before including this header to
+ #  endif
+ #endif /* not defined XML_STATIC */
+ 
commit e29bd13c01a6b9f0860c3dee8d950057556761de
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon May 11 20:46:43 2020 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Wed May 13 13:49:18 2020 +0200

    limit forms to http[s]
    
    Change-Id: I3ed0bc626f693ec03f610dc7361f93cad914c9d8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93993
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx
index 3757378c663d..9fabde57ce4a 100644
--- a/forms/source/xforms/submission.cxx
+++ b/forms/source/xforms/submission.cxx
@@ -254,6 +254,9 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler )
         return false;
     }
 
+    if (!xSubmission->IsWebProtocol())
+        return false;
+
     xSubmission->setEncoding(getEncoding());
     CSubmission::SubmissionResult aResult = xSubmission->submit( xHandler );
 
diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx
index 7d726392c736..f93146d5923e 100644
--- a/forms/source/xforms/submission/submission.hxx
+++ b/forms/source/xforms/submission/submission.hxx
@@ -127,6 +127,12 @@ public:
         , m_xContext(::comphelper::getProcessComponentContext())
     {}
 
+    bool IsWebProtocol() const
+    {
+        INetProtocol eProtocol = m_aURLObj.GetProtocol();
+        return eProtocol == INetProtocol::Http || eProtocol == INetProtocol::Https;
+    }
+
     virtual ~CSubmission() {}
 
     void setEncoding(const OUString& aEncoding)


More information about the Libreoffice-commits mailing list