configure.ac | 2 download.lst | 20 +- external/pdfium/AndroidNDK19.patch.1 | 16 -- external/pdfium/Library_pdfium.mk | 79 ++++------ external/pdfium/README | 1 external/pdfium/UnpackedTarball_pdfium.mk | 30 --- external/pdfium/build.patch.1 | 173 ++++++++++++++++++----- external/pdfium/c++20-comparison.patch | 12 - external/pdfium/cg-instead-of-carbon.patch.1 | 23 --- external/pdfium/configs/build_config.h | 132 ----------------- external/pdfium/gcc-c++20-comparison.patch | 18 -- external/pdfium/inc/pch/precompiled_pdfium.hxx | 55 ++----- external/pdfium/include.patch | 11 - external/poppler/ExternalPackage_poppler_data.mk | 24 +-- external/poppler/README | 2 external/poppler/StaticLibrary_poppler.mk | 52 +++--- external/poppler/UnpackedTarball_poppler.mk | 6 external/poppler/disable-freetype.patch.1 | 18 +- external/poppler/disable-nss-and-gpgmepp.patch.1 | 76 ++++++++++ external/poppler/gcc7-EntityInfo.patch.1 | 43 +++-- external/poppler/gcc7-GfxFont.patch.1 | 94 ++++++++++++ external/poppler/inc/pch/precompiled_poppler.hxx | 30 +++ external/poppler/poppler-config.patch.1 | 40 ++--- external/poppler/sanitizer.patch | 4 external/python3/python-3.3.0-darwin.patch.1 | 2 scripting/source/pyprov/mailmerge.py | 10 - vcl/unx/kf5/KF5SalInstance.cxx | 3 27 files changed, 523 insertions(+), 453 deletions(-)
New commits: commit 129dc6c609e7ce3dfd7704e9ff1b275cc57ac98e Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Mon Sep 25 15:50:43 2023 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 17:32:23 2023 +0200 poppler: upgrade to release 23.09.0 Fixes CVE-2023-34872 Change-Id: I289b3016695a01aff7d393cb09d66cd726d9b592 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157247 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/download.lst b/download.lst index f6fb81c84224..566f3aec3e2c 100644 --- a/download.lst +++ b/download.lst @@ -481,8 +481,8 @@ LIBPNG_TARBALL := libpng-1.6.38.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -POPPLER_SHA256SUM := d38c6b2f31c8f6f3727fb60a011a0e6c567ebf56ef1ccad36263ca9ed6448a65 -POPPLER_TARBALL := poppler-23.06.0.tar.xz +POPPLER_SHA256SUM := 80d1d44dd8bdf4ac1a47d56c5065075eb9991790974b1ed7d14b972acde88e55 +POPPLER_TARBALL := poppler-23.09.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 c8c2e47c43d1..7b6f958245ac 100644 --- a/external/poppler/StaticLibrary_poppler.mk +++ b/external/poppler/StaticLibrary_poppler.mk @@ -13,7 +13,10 @@ $(eval $(call gb_StaticLibrary_use_unpacked,poppler,poppler)) $(eval $(call gb_StaticLibrary_set_precompiled_header,poppler,external/poppler/inc/pch/precompiled_poppler)) -$(eval $(call gb_StaticLibrary_use_external,poppler,libjpeg)) +$(eval $(call gb_StaticLibrary_use_externals,poppler,\ + libjpeg \ + zlib \ +)) $(eval $(call gb_StaticLibrary_set_warnings_disabled,poppler)) @@ -92,6 +95,7 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\ UnpackedTarball/poppler/poppler/FDPDFDocBuilder \ UnpackedTarball/poppler/poppler/FILECacheLoader \ UnpackedTarball/poppler/poppler/FileSpec \ + UnpackedTarball/poppler/poppler/FlateEncoder \ UnpackedTarball/poppler/poppler/FontEncodingTables \ UnpackedTarball/poppler/poppler/FontInfo \ UnpackedTarball/poppler/poppler/Form \ diff --git a/external/poppler/disable-freetype.patch.1 b/external/poppler/disable-freetype.patch.1 index 77c643de40f5..3c4d1d0f7a8a 100644 --- a/external/poppler/disable-freetype.patch.1 +++ b/external/poppler/disable-freetype.patch.1 @@ -19,9 +19,9 @@ disable freetype dependent code -#include FT_FREETYPE_H +//#include <ft2build.h> +//#include FT_FREETYPE_H + #include <unordered_set> // helper for using std::visit to get a dependent false for static_asserts - // to help get compile errors if one ever extends variants @@ -2760,6 +2760,8 @@ Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath, int faceIndex, const std::string &fontFamily, const std::string &fontStyle, bool forceName) diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1 index be8fc98556a7..8f71e987b2b9 100644 --- a/external/poppler/poppler-config.patch.1 +++ b/external/poppler/poppler-config.patch.1 @@ -2,7 +2,7 @@ note: to get the 3rd one, use -DENABLE_CPP=on -mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_GPGME=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off -DENABLE_QT6 +mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_GPGME=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off -DENABLE_QT6=off manually disabled these because cmake failed to do it: HAVE_CAIRO @@ -37,9 +37,6 @@ index 0fbd336a..451213f8 100644 +/* Do not hardcode the library location */ +/* #undef ENABLE_RELOCATABLE */ + -+/* Build against zlib. */ -+/* #undef ENABLE_ZLIB */ -+ +/* Use zlib instead of builtin zlib decoder to uncompress flate streams. */ +/* #undef ENABLE_ZLIB_UNCOMPRESS */ + @@ -182,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.06.0" ++#define PACKAGE_STRING "poppler 23.09.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "poppler" @@ -191,7 +188,7 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_URL "" + +/* Define to the version of this package. */ -+#define PACKAGE_VERSION "23.06.0" ++#define PACKAGE_VERSION "23.09.0" + +/* Poppler data dir */ +#define POPPLER_DATADIR "/usr/local/share/poppler" @@ -209,12 +206,15 @@ index 0fbd336a..451213f8 100644 +/* #undef USE_FLOAT */ + +/* Version number of package */ -+#define VERSION "23.06.0" ++#define VERSION "23.09.0" + +#if defined(__APPLE__) +#elif defined (_WIN32) +/* Use win32 font configuration backend */ +#define WITH_FONTCONFIGURATION_WIN32 1 ++#elif defined (__ANDROID__) ++/* Use android font configuration backend */ ++#define WITH_FONTCONFIGURATION_ANDROID 1 +#else +/* Use fontconfig font configuration backend */ +#define WITH_FONTCONFIGURATION_FONTCONFIG 1 @@ -251,7 +251,7 @@ new file mode 100644 index 0fbd336a..451213f8 100644 --- /dev/null +++ b/poppler/poppler-config.h -@@ -0,0 +1,161 @@ +@@ -0,0 +1,156 @@ +//================================================= -*- mode: c++ -*- ==== +// +// poppler-config.h @@ -290,7 +290,7 @@ index 0fbd336a..451213f8 100644 + +/* Defines the poppler version. */ +#ifndef POPPLER_VERSION -+#define POPPLER_VERSION "23.06.0" ++#define POPPLER_VERSION "23.09.0" +#endif + +/* Use single precision arithmetic in the Splash backend */ @@ -328,11 +328,6 @@ index 0fbd336a..451213f8 100644 +/* #define ENABLE_LIBPNG 1 */ +#endif + -+/* Use zlib instead of builtin zlib decoder. */ -+#ifndef ENABLE_ZLIB -+/* #undef ENABLE_ZLIB */ -+#endif -+ +/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'. + */ +#ifndef HAVE_DIRENT_H @@ -442,9 +437,9 @@ index 0fbd336a..451213f8 100644 + +#include "poppler-global.h" + -+#define POPPLER_VERSION "23.06.0" ++#define POPPLER_VERSION "23.09.0" +#define POPPLER_VERSION_MAJOR 23 -+#define POPPLER_VERSION_MINOR 06 ++#define POPPLER_VERSION_MINOR 9 +#define POPPLER_VERSION_MICRO 0 + +namespace poppler commit d02f3cdb24c189ef81cc63ccc71015cbef8217ed Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Wed Jun 14 09:58:15 2023 +0900 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 17:25:55 2023 +0200 poppler: upgrade to release 23.06.0 Add external/poppler/disable-nss-and-gpgmepp.patch.1 to get rid of some code that requires NSS or GPGMEPP. Update external/poppler/inc/pch/precompiled_poppler.hxx. Change-Id: I5e61371776c64962452022516446b5079c3840e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153097 Tested-by: Jenkins Reviewed-by: Taichi Haradaguchi <20001...@ymail.ne.jp> diff --git a/download.lst b/download.lst index 17ff555698bc..f6fb81c84224 100644 --- a/download.lst +++ b/download.lst @@ -481,8 +481,8 @@ LIBPNG_TARBALL := libpng-1.6.38.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -POPPLER_SHA256SUM := b04148bf849c1965ada7eff6be4685130e3a18a84e0cce73bf9bc472ec32f2b4 -POPPLER_TARBALL := poppler-23.03.0.tar.xz +POPPLER_SHA256SUM := d38c6b2f31c8f6f3727fb60a011a0e6c567ebf56ef1ccad36263ca9ed6448a65 +POPPLER_TARBALL := poppler-23.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/README b/external/poppler/README index 35a640264618..08d3612c3542 100644 --- a/external/poppler/README +++ b/external/poppler/README @@ -1 +1 @@ -From [http://poppler.freedesktop.org/]. Not modified. PDF rendering library based on the xpdf-3.0 code base. +From [https://poppler.freedesktop.org/]. Not modified. PDF rendering library based on the xpdf-3.0 code base. diff --git a/external/poppler/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk index b223b8d64779..52585d4c940e 100644 --- a/external/poppler/UnpackedTarball_poppler.mk +++ b/external/poppler/UnpackedTarball_poppler.mk @@ -15,6 +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/gcc7-EntityInfo.patch.1 \ external/poppler/gcc7-GfxFont.patch.1 \ external/poppler/poppler-config.patch.1 \ diff --git a/external/poppler/disable-freetype.patch.1 b/external/poppler/disable-freetype.patch.1 index 710742206925..77c643de40f5 100644 --- a/external/poppler/disable-freetype.patch.1 +++ b/external/poppler/disable-freetype.patch.1 @@ -1,8 +1,8 @@ disable freetype dependent code ---- poppler/poppler/Form.cc.orig 2022-09-14 15:46:48.588316681 +0200 -+++ poppler/poppler/Form.cc 2022-09-14 15:48:01.468274551 +0200 -@@ -46,7 +46,7 @@ +--- poppler/poppler/Form.cc.orig 2023-06-05 19:29:14.000000000 +0900 ++++ poppler/poppler/Form.cc 2023-06-14 18:50:22.232312300 +0900 +@@ -48,7 +48,7 @@ #include <cstdlib> #include <cstring> #include <cctype> @@ -11,7 +11,7 @@ disable freetype dependent code #include "goo/gmem.h" #include "goo/gfile.h" #include "goo/GooString.h" -@@ -77,8 +77,8 @@ +@@ -78,8 +78,8 @@ #include "fofi/FoFiTrueType.h" #include "fofi/FoFiIdentifier.h" @@ -20,18 +20,18 @@ disable freetype dependent code +//#include <ft2build.h> +//#include FT_FREETYPE_H - // return a newly allocated char* containing an UTF16BE string of size length - char *pdfDocEncodingToUTF16(const std::string &orig, int *length) -@@ -2743,6 +2743,8 @@ + // helper for using std::visit to get a dependent false for static_asserts + // to help get compile errors if one ever extends variants +@@ -2760,6 +2760,8 @@ - Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath, int faceIndex, const std::string &fontFamily, const std::string &fontStyle) + 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")) { 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 {}; -@@ -2951,6 +2953,7 @@ +@@ -2994,6 +2996,7 @@ } return { dictFontName, fontDictRef }; diff --git a/external/poppler/disable-nss-and-gpgmepp.patch.1 b/external/poppler/disable-nss-and-gpgmepp.patch.1 new file mode 100644 index 000000000000..01b442f53a1c --- /dev/null +++ b/external/poppler/disable-nss-and-gpgmepp.patch.1 @@ -0,0 +1,76 @@ +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" +@@ -577,7 +577,7 @@ + { + return static_cast<FormFieldSignature *>(field)->validateSignature(doVerifyCert, forceRevalidation, validationTime, ocspRevocationCheck, enableAIA); + } +- ++#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) + { +@@ -607,10 +607,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; +@@ -698,6 +700,8 @@ + fclose(file); + + 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 @@ + + void FormFieldSignature::hashSignedDataBlock(CryptoSign::VerificationInterface *handler, Goffset block_len) + { ++#if 0 + if (!handler) { + return; + } +@@ -2335,6 +2340,7 @@ + i += BLOCK_SIZE; + } + } ++#endif + } + + FormSignatureType FormWidgetSignature::signatureType() const +@@ -2349,6 +2355,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 @@ + 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; + } + diff --git a/external/poppler/gcc7-EntityInfo.patch.1 b/external/poppler/gcc7-EntityInfo.patch.1 index b450bff93af9..1dd7c83ad475 100644 --- a/external/poppler/gcc7-EntityInfo.patch.1 +++ b/external/poppler/gcc7-EntityInfo.patch.1 @@ -2,28 +2,35 @@ gcc 7.3.1 says: workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc:42:34: error: function ‘X509CertificateInfo::EntityInfo& X509CertificateInfo::EntityInfo::operator=(X509CertificateInfo::EntityInfo&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’ ---- poppler/poppler/CertificateInfo.h.orig 2022-09-14 19:32:12.426351385 +0200 -+++ poppler/poppler/CertificateInfo.h 2022-09-14 19:32:18.947347812 +0200 -@@ -70,7 +70,7 @@ - ~EntityInfo(); - - EntityInfo(EntityInfo &&) noexcept; -- EntityInfo &operator=(EntityInfo &&) noexcept; -+ EntityInfo &operator=(EntityInfo &&) /*noexcept*/; - - EntityInfo(const EntityInfo &) = delete; - EntityInfo &operator=(const EntityInfo &) = delete; ---- poppler/poppler/CertificateInfo.cc.orig 2022-09-14 19:31:10.225385467 +0200 -+++ poppler/poppler/CertificateInfo.cc 2022-09-14 19:31:12.572384182 +0200 -@@ -39,7 +39,7 @@ +workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc: In member function ‘void X509CertificateInfo::setPublicKeyInfo(X509CertificateInfo::PublicKeyInfo&&)’: +workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc:106:39: error: use of deleted function ‘X509CertificateInfo::PublicKeyInfo& X509CertificateInfo::PublicKeyInfo::operator=(X509CertificateInfo::PublicKeyInfo&&)’ + public_key_info = std::move(pkInfo); + ^ +In file included from workdir/UnpackedTarball/poppler/poppler/CertificateInfo.cc:15:0: +workdir/UnpackedTarball/poppler/poppler/CertificateInfo.h:58:24: note: ‘X509CertificateInfo::PublicKeyInfo& X509CertificateInfo::PublicKeyInfo::operator=(X509CertificateInfo::PublicKeyInfo&&) noexcept’ is implicitly deleted because its exception-specification does not match the implicit exception-specification ‘’ + PublicKeyInfo &operator=(PublicKeyInfo &&) noexcept = default; + ^~~~~~~~ + +--- poppler/poppler/CertificateInfo.h.orig 2023-06-05 19:29:14.000000000 +0900 ++++ poppler/poppler/CertificateInfo.h 2023-06-19 18:10:55.760031700 +0900 +@@ -55,7 +55,7 @@ + PublicKeyInfo() = default; - X509CertificateInfo::EntityInfo::EntityInfo(X509CertificateInfo::EntityInfo &&other) noexcept = default; + PublicKeyInfo(PublicKeyInfo &&) noexcept = default; +- PublicKeyInfo &operator=(PublicKeyInfo &&) noexcept = default; ++ PublicKeyInfo &operator=(PublicKeyInfo &&) /*noexcept*/ = default; --X509CertificateInfo::EntityInfo &X509CertificateInfo::EntityInfo::operator=(X509CertificateInfo::EntityInfo &&other) noexcept = default; -+X509CertificateInfo::EntityInfo &X509CertificateInfo::EntityInfo::operator=(X509CertificateInfo::EntityInfo &&other) /*noexcept*/ = default; + PublicKeyInfo(const PublicKeyInfo &) = delete; + PublicKeyInfo &operator=(const PublicKeyInfo &) = delete; +@@ -71,7 +71,7 @@ + ~EntityInfo() = default; - X509CertificateInfo::X509CertificateInfo() : ku_extensions(KU_NONE), cert_version(-1), is_self_signed(false) { } + EntityInfo(EntityInfo &&) noexcept = default; +- EntityInfo &operator=(EntityInfo &&) noexcept = default; ++ EntityInfo &operator=(EntityInfo &&) /*noexcept*/ = default; + EntityInfo(const EntityInfo &) = delete; + EntityInfo &operator=(const EntityInfo &) = delete; --- poppler/poppler/GfxFont.cc.orig 2022-09-14 20:24:32.569607333 +0200 +++ poppler/poppler/GfxFont.cc 2022-09-14 20:24:52.323596186 +0200 @@ -180,7 +180,7 @@ diff --git a/external/poppler/inc/pch/precompiled_poppler.hxx b/external/poppler/inc/pch/precompiled_poppler.hxx index 0b2824d753c9..50944b80daef 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 2021-11-03 15:11:24 using: + Generated on 2023-06-18 21:15:26 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: @@ -22,7 +22,22 @@ #include <sal/config.h> #if PCH_LEVEL >= 1 +#include <Object.h> #include <algorithm> +#include <annot_stamp_approved.h> +#include <annot_stamp_as_is.h> +#include <annot_stamp_confidential.h> +#include <annot_stamp_departmental.h> +#include <annot_stamp_draft.h> +#include <annot_stamp_experimental.h> +#include <annot_stamp_expired.h> +#include <annot_stamp_final.h> +#include <annot_stamp_for_comment.h> +#include <annot_stamp_for_public_release.h> +#include <annot_stamp_not_approved.h> +#include <annot_stamp_not_for_public_release.h> +#include <annot_stamp_sold.h> +#include <annot_stamp_top_secret.h> #include <array> #include <cassert> #include <cctype> @@ -40,18 +55,23 @@ #include <cstdlib> #include <cstring> #include <ctime> +#include <gbase64.h> +#include <gbasename.h> #include <gdir.h> #include <gfile.h> #include <glibc.h> #include <gmem.h> #include <grandom.h> #include <gstrtod.h> +#include <iomanip> +#include <iostream> #include <limits> #include <memory> #include <poppler-config.h> #include <random> #include <regex> #include <set> +#include <sstream> #include <vector> #endif // PCH_LEVEL >= 1 #if PCH_LEVEL >= 2 @@ -65,6 +85,10 @@ #include <goo/GooLikely.h> #include <goo/GooString.h> #include <goo/GooTimer.h> +#include <goo/ImgWriter.h> +#include <goo/JpegWriter.h> +#include <goo/PNGWriter.h> +#include <goo/TiffWriter.h> #include <goo/gdir.h> #include <goo/gfile.h> #include <goo/glibc.h> @@ -72,6 +96,10 @@ #include <goo/grandom.h> #include <goo/gstrtod.h> #include <poppler/Error.h> +#include <poppler/GfxState.h> +#include <poppler/GfxState_helpers.h> +#include <splash/Splash.h> +#include <splash/SplashBitmap.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 503cf1c0ae46..be8fc98556a7 100644 --- a/external/poppler/poppler-config.patch.1 +++ b/external/poppler/poppler-config.patch.1 @@ -2,7 +2,7 @@ note: to get the 3rd one, use -DENABLE_CPP=on -mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off +mkdir build && cd build && cmake .. -DENABLE_DCTDECODER=libjpeg -DHAVE_CAIRO=off -DENABLE_LIBOPENJPEG=none -DENABLE_CMS=none -DENABLE_LIBCURL=off -DENABLE_ZLIB=off -DENABLE_ZLIB_UNCOMPRESS=off -DENABLE_GPGME=off -DENABLE_NSS3=off -DENABLE_LIBPNG=off -DENABLE_LIBTIFF=off -DENABLE_SPLASH=off -DENABLE_UTILS=off -DENABLE_CPP=off -DENABLE_GLIB=off -DENABLE_GOBJECT_INTROSPECTION=off -DENABLE_GTK_DOC=off -DENABLE_QT5=off -DENABLE_QT6 manually disabled these because cmake failed to do it: HAVE_CAIRO @@ -16,7 +16,7 @@ new file mode 100644 index 0fbd336a..451213f8 100644 --- /dev/null +++ b/config.h -@@ -0,0 +1,220 @@ +@@ -0,0 +1,229 @@ +/* config.h. Generated from config.h.cmake by cmake. */ + +/* Build against libcurl. */ @@ -46,6 +46,15 @@ index 0fbd336a..451213f8 100644 +/* Build against libnss3 for digital signature validation */ +/* #define ENABLE_NSS3 1 */ + ++/* Build against libgpgme for digital signature validation */ ++/* #undef ENABLE_GPGME */ ++ ++/* Signatures enabled */ ++/* #define ENABLE_SIGNATURES 1 */ ++ ++/* Default signature backend */ ++/* #define DEFAULT_SIGNATURE_BACKEND "NSS" */ ++ +/* Use cairo for rendering. */ +/* #define HAVE_CAIRO 1 */ + @@ -173,7 +182,7 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_NAME "poppler" + +/* Define to the full name and version of this package. */ -+#define PACKAGE_STRING "poppler 23.03.0" ++#define PACKAGE_STRING "poppler 23.06.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "poppler" @@ -182,7 +191,7 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_URL "" + +/* Define to the version of this package. */ -+#define PACKAGE_VERSION "23.03.0" ++#define PACKAGE_VERSION "23.06.0" + +/* Poppler data dir */ +#define POPPLER_DATADIR "/usr/local/share/poppler" @@ -200,7 +209,7 @@ index 0fbd336a..451213f8 100644 +/* #undef USE_FLOAT */ + +/* Version number of package */ -+#define VERSION "23.03.0" ++#define VERSION "23.06.0" + +#if defined(__APPLE__) +#elif defined (_WIN32) @@ -281,7 +290,7 @@ index 0fbd336a..451213f8 100644 + +/* Defines the poppler version. */ +#ifndef POPPLER_VERSION -+#define POPPLER_VERSION "23.03.0" ++#define POPPLER_VERSION "23.06.0" +#endif + +/* Use single precision arithmetic in the Splash backend */ @@ -373,7 +382,7 @@ index 0fbd336a..451213f8 100644 +//------------------------------------------------------------------------ + +// copyright notice -+#define popplerCopyright "Copyright 2005-2022 The Poppler Developers - http://poppler.freedesktop.org" ++#define popplerCopyright "Copyright 2005-2023 The Poppler Developers - http://poppler.freedesktop.org" +#define xpdfCopyright "Copyright 1996-2011, 2022 Glyph & Cog, LLC" + +//------------------------------------------------------------------------ @@ -433,9 +442,9 @@ index 0fbd336a..451213f8 100644 + +#include "poppler-global.h" + -+#define POPPLER_VERSION "23.03.0" ++#define POPPLER_VERSION "23.06.0" +#define POPPLER_VERSION_MAJOR 23 -+#define POPPLER_VERSION_MINOR 03 ++#define POPPLER_VERSION_MINOR 06 +#define POPPLER_VERSION_MICRO 0 + +namespace poppler commit d5c1f435934f28d43c0cdf28a2cd3a3192cd1339 Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Tue Mar 14 19:01:26 2023 +0900 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 17:25:12 2023 +0200 poppler: upgrade to release 23.03.0 * Upgrade poppler-data to 0.4.12 * Update poppler-config.patch.1 Change-Id: Ic2a3e8d4f801d52d1568210d0df064cacb51290f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148842 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/download.lst b/download.lst index 44231a1b2db4..17ff555698bc 100644 --- a/download.lst +++ b/download.lst @@ -481,10 +481,10 @@ LIBPNG_TARBALL := libpng-1.6.38.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -POPPLER_SHA256SUM := d9aa9cacdfbd0f8e98fc2b3bb008e645597ed480685757c3e7bc74b4278d15c0 -POPPLER_TARBALL := poppler-22.12.0.tar.xz -POPPLER_DATA_SHA256SUM := 2cec05cd1bb03af98a8b06a1e22f6e6e1a65b1e2f3816cb3069bb0874825f08c -POPPLER_DATA_TARBALL := poppler-data-0.4.11.tar.gz +POPPLER_SHA256SUM := b04148bf849c1965ada7eff6be4685130e3a18a84e0cce73bf9bc472ec32f2b4 +POPPLER_TARBALL := poppler-23.03.0.tar.xz +POPPLER_DATA_SHA256SUM := c835b640a40ce357e1b83666aabd95edffa24ddddd49b8daff63adb851cdab74 +POPPLER_DATA_TARBALL := poppler-data-0.4.12.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/poppler/ExternalPackage_poppler_data.mk b/external/poppler/ExternalPackage_poppler_data.mk index 78024d3fec8b..b85a73f0e663 100644 --- a/external/poppler/ExternalPackage_poppler_data.mk +++ b/external/poppler/ExternalPackage_poppler_data.mk @@ -100,6 +100,7 @@ poppler_cmap-files = \ cMap/Adobe-GB1/GB-EUC-H \ cMap/Adobe-GB1/GB-EUC-V \ cMap/Adobe-GB1/GB-H \ + cMap/Adobe-GB1/GB-V \ cMap/Adobe-GB1/GBK2K-H \ cMap/Adobe-GB1/GBK2K-V \ cMap/Adobe-GB1/GBK-EUC-H \ @@ -114,10 +115,9 @@ poppler_cmap-files = \ cMap/Adobe-GB1/GBT-EUC-H \ cMap/Adobe-GB1/GBT-EUC-V \ cMap/Adobe-GB1/GBT-H \ + cMap/Adobe-GB1/GBT-V \ cMap/Adobe-GB1/GBTpc-EUC-H \ cMap/Adobe-GB1/GBTpc-EUC-V \ - cMap/Adobe-GB1/GBT-V \ - cMap/Adobe-GB1/GB-V \ cMap/Adobe-GB1/UCS2-GBK-EUC \ cMap/Adobe-GB1/UCS2-GBpc-EUC \ cMap/Adobe-GB1/UniGB-UCS2-H \ @@ -131,17 +131,17 @@ poppler_cmap-files = \ cMap/Adobe-Japan1/78-EUC-H \ cMap/Adobe-Japan1/78-EUC-V \ cMap/Adobe-Japan1/78-H \ - cMap/Adobe-Japan1/78ms-RKSJ-H \ - cMap/Adobe-Japan1/78ms-RKSJ-V \ cMap/Adobe-Japan1/78-RKSJ-H \ cMap/Adobe-Japan1/78-RKSJ-V \ cMap/Adobe-Japan1/78-V \ + cMap/Adobe-Japan1/78ms-RKSJ-H \ + cMap/Adobe-Japan1/78ms-RKSJ-V \ cMap/Adobe-Japan1/83pv-RKSJ-H \ - cMap/Adobe-Japan1/90msp-RKSJ-H \ - cMap/Adobe-Japan1/90msp-RKSJ-V \ cMap/Adobe-Japan1/90ms-RKSJ-H \ cMap/Adobe-Japan1/90ms-RKSJ-UCS2 \ cMap/Adobe-Japan1/90ms-RKSJ-V \ + cMap/Adobe-Japan1/90msp-RKSJ-H \ + cMap/Adobe-Japan1/90msp-RKSJ-V \ cMap/Adobe-Japan1/90pv-RKSJ-H \ cMap/Adobe-Japan1/90pv-RKSJ-UCS2 \ cMap/Adobe-Japan1/90pv-RKSJ-UCS2C \ @@ -201,9 +201,6 @@ poppler_cmap-files = \ cMap/Adobe-Japan1/UniJIS2004-UTF32-V \ cMap/Adobe-Japan1/UniJIS2004-UTF8-H \ cMap/Adobe-Japan1/UniJIS2004-UTF8-V \ - cMap/Adobe-Japan1/UniJISPro-UCS2-HW-V \ - cMap/Adobe-Japan1/UniJISPro-UCS2-V \ - cMap/Adobe-Japan1/UniJISPro-UTF8-V \ cMap/Adobe-Japan1/UniJIS-UCS2-H \ cMap/Adobe-Japan1/UniJIS-UCS2-HW-H \ cMap/Adobe-Japan1/UniJIS-UCS2-HW-V \ @@ -214,10 +211,13 @@ poppler_cmap-files = \ cMap/Adobe-Japan1/UniJIS-UTF32-V \ cMap/Adobe-Japan1/UniJIS-UTF8-H \ cMap/Adobe-Japan1/UniJIS-UTF8-V \ - cMap/Adobe-Japan1/UniJISX02132004-UTF32-H \ - cMap/Adobe-Japan1/UniJISX02132004-UTF32-V \ + cMap/Adobe-Japan1/UniJISPro-UCS2-HW-V \ + cMap/Adobe-Japan1/UniJISPro-UCS2-V \ + cMap/Adobe-Japan1/UniJISPro-UTF8-V \ cMap/Adobe-Japan1/UniJISX0213-UTF32-H \ cMap/Adobe-Japan1/UniJISX0213-UTF32-V \ + cMap/Adobe-Japan1/UniJISX02132004-UTF32-H \ + cMap/Adobe-Japan1/UniJISX02132004-UTF32-V \ cMap/Adobe-Japan1/V \ cMap/Adobe-Japan1/WP-Symbol \ cMap/Adobe-Japan2/Adobe-Japan2-0 \ @@ -235,6 +235,7 @@ poppler_cmap-files = \ cMap/Adobe-Korea1/KSC-H \ cMap/Adobe-Korea1/KSC-Johab-H \ cMap/Adobe-Korea1/KSC-Johab-V \ + cMap/Adobe-Korea1/KSC-V \ cMap/Adobe-Korea1/KSCms-UHC-H \ cMap/Adobe-Korea1/KSCms-UHC-HW-H \ cMap/Adobe-Korea1/KSCms-UHC-HW-V \ @@ -244,7 +245,6 @@ poppler_cmap-files = \ cMap/Adobe-Korea1/KSCpc-EUC-UCS2 \ cMap/Adobe-Korea1/KSCpc-EUC-UCS2C \ cMap/Adobe-Korea1/KSCpc-EUC-V \ - cMap/Adobe-Korea1/KSC-V \ cMap/Adobe-Korea1/UCS2-KSCms-UHC \ cMap/Adobe-Korea1/UCS2-KSCpc-EUC \ cMap/Adobe-Korea1/UniKS-UCS2-H \ diff --git a/external/poppler/StaticLibrary_poppler.mk b/external/poppler/StaticLibrary_poppler.mk index 2f6433f88f64..c8c2e47c43d1 100644 --- a/external/poppler/StaticLibrary_poppler.mk +++ b/external/poppler/StaticLibrary_poppler.mk @@ -55,24 +55,26 @@ $(eval $(call gb_StaticLibrary_add_generated_cobjects,poppler,\ )) $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\ + UnpackedTarball/poppler/goo/gbase64 \ + UnpackedTarball/poppler/goo/gbasename \ UnpackedTarball/poppler/goo/gfile \ - UnpackedTarball/poppler/goo/GooTimer \ + UnpackedTarball/poppler/goo/glibc \ + UnpackedTarball/poppler/goo/glibc_strtok_r \ + UnpackedTarball/poppler/goo/grandom \ + UnpackedTarball/poppler/goo/gstrtod \ UnpackedTarball/poppler/goo/GooString \ + UnpackedTarball/poppler/goo/GooTimer \ + UnpackedTarball/poppler/goo/ImgWriter \ + UnpackedTarball/poppler/goo/JpegWriter \ UnpackedTarball/poppler/goo/NetPBMWriter \ UnpackedTarball/poppler/goo/PNGWriter \ UnpackedTarball/poppler/goo/TiffWriter \ - UnpackedTarball/poppler/goo/JpegWriter \ - UnpackedTarball/poppler/goo/ImgWriter \ - UnpackedTarball/poppler/goo/gstrtod \ - UnpackedTarball/poppler/goo/grandom \ - UnpackedTarball/poppler/goo/glibc \ - UnpackedTarball/poppler/goo/glibc_strtok_r \ UnpackedTarball/poppler/fofi/FoFiBase \ UnpackedTarball/poppler/fofi/FoFiEncodings \ + UnpackedTarball/poppler/fofi/FoFiIdentifier \ UnpackedTarball/poppler/fofi/FoFiTrueType \ UnpackedTarball/poppler/fofi/FoFiType1 \ UnpackedTarball/poppler/fofi/FoFiType1C \ - UnpackedTarball/poppler/fofi/FoFiIdentifier \ UnpackedTarball/poppler/poppler/Annot \ UnpackedTarball/poppler/poppler/AnnotStampImageHelper \ UnpackedTarball/poppler/poppler/Array \ @@ -82,6 +84,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/DCTStream \ UnpackedTarball/poppler/poppler/DateInfo \ UnpackedTarball/poppler/poppler/Decrypt \ UnpackedTarball/poppler/poppler/Dict \ @@ -90,8 +93,8 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\ UnpackedTarball/poppler/poppler/FILECacheLoader \ UnpackedTarball/poppler/poppler/FileSpec \ UnpackedTarball/poppler/poppler/FontEncodingTables \ - UnpackedTarball/poppler/poppler/Form \ UnpackedTarball/poppler/poppler/FontInfo \ + UnpackedTarball/poppler/poppler/Form \ UnpackedTarball/poppler/poppler/Function \ UnpackedTarball/poppler/poppler/Gfx \ UnpackedTarball/poppler/poppler/GfxFont \ @@ -103,43 +106,42 @@ $(eval $(call gb_StaticLibrary_add_generated_exception_objects,poppler,\ UnpackedTarball/poppler/poppler/JBIG2Stream \ UnpackedTarball/poppler/poppler/JSInfo \ UnpackedTarball/poppler/poppler/Lexer \ - UnpackedTarball/poppler/poppler/Link \ UnpackedTarball/poppler/poppler/Linearization \ + UnpackedTarball/poppler/poppler/Link \ UnpackedTarball/poppler/poppler/LocalPDFDocBuilder \ UnpackedTarball/poppler/poppler/MarkedContentOutputDev \ + UnpackedTarball/poppler/poppler/Movie \ UnpackedTarball/poppler/poppler/NameToCharCode \ UnpackedTarball/poppler/poppler/Object \ UnpackedTarball/poppler/poppler/OptionalContent \ UnpackedTarball/poppler/poppler/Outline \ UnpackedTarball/poppler/poppler/OutputDev \ UnpackedTarball/poppler/poppler/Page \ + UnpackedTarball/poppler/poppler/PageLabelInfo \ UnpackedTarball/poppler/poppler/PageTransition \ UnpackedTarball/poppler/poppler/Parser \ UnpackedTarball/poppler/poppler/PDFDoc \ UnpackedTarball/poppler/poppler/PDFDocBuilder \ UnpackedTarball/poppler/poppler/PDFDocEncoding \ UnpackedTarball/poppler/poppler/PDFDocFactory \ - UnpackedTarball/poppler/poppler/ProfileData \ UnpackedTarball/poppler/poppler/PreScanOutputDev \ + UnpackedTarball/poppler/poppler/ProfileData \ + UnpackedTarball/poppler/poppler/PSOutputDev \ UnpackedTarball/poppler/poppler/PSTokenizer \ + UnpackedTarball/poppler/poppler/Rendition \ + UnpackedTarball/poppler/poppler/SecurityHandler \ UnpackedTarball/poppler/poppler/SignatureInfo \ + UnpackedTarball/poppler/poppler/Sound \ UnpackedTarball/poppler/poppler/Stream \ - UnpackedTarball/poppler/poppler/StructTreeRoot \ UnpackedTarball/poppler/poppler/StructElement \ + UnpackedTarball/poppler/poppler/StructTreeRoot \ + UnpackedTarball/poppler/poppler/TextOutputDev \ + UnpackedTarball/poppler/poppler/UTF \ UnpackedTarball/poppler/poppler/UnicodeMap \ UnpackedTarball/poppler/poppler/UnicodeMapFuncs \ UnpackedTarball/poppler/poppler/UnicodeTypeTable \ - UnpackedTarball/poppler/poppler/UTF \ - UnpackedTarball/poppler/poppler/XRef \ - UnpackedTarball/poppler/poppler/PSOutputDev \ - UnpackedTarball/poppler/poppler/TextOutputDev \ - UnpackedTarball/poppler/poppler/PageLabelInfo \ - UnpackedTarball/poppler/poppler/SecurityHandler \ - UnpackedTarball/poppler/poppler/Sound \ UnpackedTarball/poppler/poppler/ViewerPreferences \ - UnpackedTarball/poppler/poppler/Movie \ - UnpackedTarball/poppler/poppler/Rendition \ - UnpackedTarball/poppler/poppler/DCTStream \ + UnpackedTarball/poppler/poppler/XRef \ UnpackedTarball/poppler/splash/SplashBitmap \ )) diff --git a/external/poppler/UnpackedTarball_poppler.mk b/external/poppler/UnpackedTarball_poppler.mk index 5726814fee82..b223b8d64779 100644 --- a/external/poppler/UnpackedTarball_poppler.mk +++ b/external/poppler/UnpackedTarball_poppler.mk @@ -14,10 +14,11 @@ $(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/poppler-config.patch.1 \ - external/poppler/pch.patch.0 \ external/poppler/disable-freetype.patch.1 \ external/poppler/gcc7-EntityInfo.patch.1 \ + external/poppler/gcc7-GfxFont.patch.1 \ + external/poppler/poppler-config.patch.1 \ + external/poppler/pch.patch.0 \ )) ifneq ($(filter -fsanitize=%,$(CC)),) diff --git a/external/poppler/gcc7-GfxFont.patch.1 b/external/poppler/gcc7-GfxFont.patch.1 new file mode 100644 index 000000000000..a240b1b8bad2 --- /dev/null +++ b/external/poppler/gcc7-GfxFont.patch.1 @@ -0,0 +1,94 @@ +Revert of upstream: https://gitlab.freedesktop.org/poppler/poppler/-/commit/d5ea5a24124badf2b32a7d08dd2c06a4a40f93fb + +gcc 7.5.0 says: + +workdir/UnpackedTarball/poppler/poppler/GfxFont.cc: In member function ‘std::optional<GfxFontLoc> GfxFont::locateFont(XRef*, PSOutputDev*)’: +/home/taichi/libo-core/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:660:24: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’ + return fontLoc; + ^~~~~~~ +workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:671:16: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’ + return fontLoc; + ^~~~~~~ +workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:680:16: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’ + return fontLoc; + ^~~~~~~ +libo-core/workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:711:24: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’ + return fontLoc; + ^~~~~~~ +workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:723:20: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’ + return fontLoc; + ^~~~~~~ +workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:752:20: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’ + return fontLoc; + ^~~~~~~ +workdir/UnpackedTarball/poppler/poppler/GfxFont.cc: In static member function ‘static std::optional<GfxFontLoc> GfxFont::getExternalFont(GooString*, bool)’: +workdir/UnpackedTarball/poppler/poppler/GfxFont.cc:814:12: error: could not convert ‘fontLoc’ from ‘GfxFontLoc’ to ‘std::optional<GfxFontLoc>’ + return fontLoc; + +diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc +index cc2ce038..b0d0d610 100644 +--- a/poppler/GfxFont.cc ++++ b/poppler/GfxFont.cc +@@ -657,7 +657,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps) + fontLoc.locType = gfxFontLocEmbedded; + fontLoc.fontType = type; + fontLoc.embFontID = embFontID; +- return fontLoc; ++ return std::move(fontLoc); // std::move only required to please g++-7 + } + } + } +@@ -668,7 +668,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps) + fontLoc.locType = gfxFontLocResident; + fontLoc.fontType = fontType1; + fontLoc.path = *name; +- return fontLoc; ++ return std::move(fontLoc); // std::move only required to please g++-7 + } + + //----- PS resident Base-14 font +@@ -677,7 +677,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps) + fontLoc.locType = gfxFontLocResident; + fontLoc.fontType = fontType1; + fontLoc.path = ((Gfx8BitFont *)this)->base14->base14Name; +- return fontLoc; ++ return std::move(fontLoc); // std::move only required to please g++-7 + } + + //----- external font file (fontFile, fontDir) +@@ -708,7 +708,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps) + fontLoc.fontType = fontCIDType2; + fontLoc.setPath(path); + fontLoc.fontNum = fontNum; +- return fontLoc; ++ return std::move(fontLoc); // std::move only required to please g++-7 + } + } else { + GfxFontLoc fontLoc; +@@ -720,7 +720,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps) + fontLoc.fontType = fontType1; + fontLoc.fontNum = fontNum; + } +- return fontLoc; ++ return std::move(fontLoc); // std::move only required to please g++-7 + } + delete path; + } +@@ -749,7 +749,7 @@ std::optional<GfxFontLoc> GfxFont::locateFont(XRef *xref, PSOutputDev *ps) + fontLoc.fontType = fontType1; + fontLoc.path = substName; + fontLoc.substIdx = substIdx; +- return fontLoc; ++ return std::move(fontLoc); // std::move only required to please g++-7 + } else { + path = globalParams->findFontFile(substName); + if (path) { +@@ -811,7 +811,7 @@ std::optional<GfxFontLoc> GfxFont::getExternalFont(GooString *path, bool cid) + fontLoc.locType = gfxFontLocExternal; + fontLoc.fontType = fontType; + fontLoc.setPath(path); +- return fontLoc; ++ return std::move(fontLoc); // std::move only required to please g++-7 + } + + std::optional<std::vector<unsigned char>> GfxFont::readEmbFontFile(XRef *xref) diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1 index 1e61b533d31b..503cf1c0ae46 100644 --- a/external/poppler/poppler-config.patch.1 +++ b/external/poppler/poppler-config.patch.1 @@ -173,7 +173,7 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_NAME "poppler" + +/* Define to the full name and version of this package. */ -+#define PACKAGE_STRING "poppler 22.12.0" ++#define PACKAGE_STRING "poppler 23.03.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "poppler" @@ -182,7 +182,7 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_URL "" + +/* Define to the version of this package. */ -+#define PACKAGE_VERSION "22.12.0" ++#define PACKAGE_VERSION "23.03.0" + +/* Poppler data dir */ +#define POPPLER_DATADIR "/usr/local/share/poppler" @@ -200,7 +200,7 @@ index 0fbd336a..451213f8 100644 +/* #undef USE_FLOAT */ + +/* Version number of package */ -+#define VERSION "22.12.0" ++#define VERSION "23.03.0" + +#if defined(__APPLE__) +#elif defined (_WIN32) @@ -281,7 +281,7 @@ index 0fbd336a..451213f8 100644 + +/* Defines the poppler version. */ +#ifndef POPPLER_VERSION -+#define POPPLER_VERSION "22.12.0" ++#define POPPLER_VERSION "23.03.0" +#endif + +/* Use single precision arithmetic in the Splash backend */ @@ -433,9 +433,9 @@ index 0fbd336a..451213f8 100644 + +#include "poppler-global.h" + -+#define POPPLER_VERSION "22.12.0" -+#define POPPLER_VERSION_MAJOR 22 -+#define POPPLER_VERSION_MINOR 12 ++#define POPPLER_VERSION "23.03.0" ++#define POPPLER_VERSION_MAJOR 23 ++#define POPPLER_VERSION_MINOR 03 +#define POPPLER_VERSION_MICRO 0 + +namespace poppler commit e9917f0414efcdd46f544ad420f3052933dc867f Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Tue Mar 14 18:55:18 2023 +0900 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 17:06:03 2023 +0200 fix poppler build * Update POPPLER_VERSION in poppler-config.patch.1 Change-Id: Iba770e6a3036a091925997025d4528f1d855da5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148841 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/external/poppler/poppler-config.patch.1 b/external/poppler/poppler-config.patch.1 index 455a88e2afc4..1e61b533d31b 100644 --- a/external/poppler/poppler-config.patch.1 +++ b/external/poppler/poppler-config.patch.1 @@ -173,7 +173,7 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_NAME "poppler" + +/* Define to the full name and version of this package. */ -+#define PACKAGE_STRING "poppler 22.09.0" ++#define PACKAGE_STRING "poppler 22.12.0" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "poppler" @@ -182,7 +182,7 @@ index 0fbd336a..451213f8 100644 +#define PACKAGE_URL "" + +/* Define to the version of this package. */ -+#define PACKAGE_VERSION "22.09.0" ++#define PACKAGE_VERSION "22.12.0" + +/* Poppler data dir */ +#define POPPLER_DATADIR "/usr/local/share/poppler" @@ -200,7 +200,7 @@ index 0fbd336a..451213f8 100644 +/* #undef USE_FLOAT */ + +/* Version number of package */ -+#define VERSION "22.09.0" ++#define VERSION "22.12.0" + +#if defined(__APPLE__) +#elif defined (_WIN32) @@ -281,7 +281,7 @@ index 0fbd336a..451213f8 100644 + +/* Defines the poppler version. */ +#ifndef POPPLER_VERSION -+#define POPPLER_VERSION "22.09.0" ++#define POPPLER_VERSION "22.12.0" +#endif + +/* Use single precision arithmetic in the Splash backend */ @@ -433,9 +433,9 @@ index 0fbd336a..451213f8 100644 + +#include "poppler-global.h" + -+#define POPPLER_VERSION "22.09.0" ++#define POPPLER_VERSION "22.12.0" +#define POPPLER_VERSION_MAJOR 22 -+#define POPPLER_VERSION_MINOR 9 ++#define POPPLER_VERSION_MINOR 12 +#define POPPLER_VERSION_MICRO 0 + +namespace poppler commit cd08ae7faa63c8ca3b641e5e2bdbe60981face15 Author: Taichi Haradaguchi <20001...@ymail.ne.jp> AuthorDate: Sun Dec 11 18:00:28 2022 +0900 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 17:04:47 2023 +0200 poppler: upgrade to release 22.12.0 Change-Id: Ic0544fa378705b97b437132fc8860a65692634da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143977 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/download.lst b/download.lst index c7c91d90ca4c..44231a1b2db4 100644 --- a/download.lst +++ b/download.lst @@ -481,8 +481,8 @@ LIBPNG_TARBALL := libpng-1.6.38.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -POPPLER_SHA256SUM := d7a8f748211359cadb774ba3e18ecda6464b34027045c0648eb30d5852a41e2e -POPPLER_TARBALL := poppler-22.09.0.tar.xz +POPPLER_SHA256SUM := d9aa9cacdfbd0f8e98fc2b3bb008e645597ed480685757c3e7bc74b4278d15c0 +POPPLER_TARBALL := poppler-22.12.0.tar.xz POPPLER_DATA_SHA256SUM := 2cec05cd1bb03af98a8b06a1e22f6e6e1a65b1e2f3816cb3069bb0874825f08c POPPLER_DATA_TARBALL := poppler-data-0.4.11.tar.gz # three static lines diff --git a/external/poppler/disable-freetype.patch.1 b/external/poppler/disable-freetype.patch.1 index d59006eba979..710742206925 100644 --- a/external/poppler/disable-freetype.patch.1 +++ b/external/poppler/disable-freetype.patch.1 @@ -22,7 +22,7 @@ disable freetype dependent code // return a newly allocated char* containing an UTF16BE string of size length char *pdfDocEncodingToUTF16(const std::string &orig, int *length) -@@ -2730,6 +2730,8 @@ +@@ -2743,6 +2743,8 @@ Form::AddFontResult Form::addFontToDefaultResources(const std::string &filepath, int faceIndex, const std::string &fontFamily, const std::string &fontStyle) { @@ -31,7 +31,7 @@ disable freetype dependent code if (!GooString::endsWith(filepath, ".ttf") && !GooString::endsWith(filepath, ".ttc") && !GooString::endsWith(filepath, ".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 {}; -@@ -2939,6 +2941,7 @@ +@@ -2951,6 +2953,7 @@ } return { dictFontName, fontDictRef }; diff --git a/external/poppler/sanitizer.patch b/external/poppler/sanitizer.patch index 149361661b95..c08e1b4e8a4f 100644 --- a/external/poppler/sanitizer.patch +++ b/external/poppler/sanitizer.patch @@ -1,6 +1,6 @@ --- poppler/PSOutputDev.cc +++ poppler/PSOutputDev.cc -@@ -3111,6 +3111,8 @@ +@@ -3138,6 +3138,8 @@ bool PSOutputDev::checkPageSlice(Page *page, double /*hDPI*/, double /*vDPI*/, int rotateA, bool useMediaBox, bool crop, int sliceX, int sliceY, int sliceW, int sliceH, bool printing, bool (*abortCheckCbk)(void *data), void *abortCheckCbkData, bool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), void *annotDisplayDecideCbkData) { @@ -9,7 +9,7 @@ PreScanOutputDev *scan; bool rasterize; bool useFlate, useLZW; -@@ -3593,5 +3595,6 @@ +@@ -3623,5 +3625,6 @@ return false; +#endif commit c08b7e629c7341f2573337b03763035d0066bfad Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Mon Sep 25 14:22:40 2023 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 16:49:43 2023 +0200 libtommath: upgrade to release 1.2.1 Fixes CVE-2023-36328. Change-Id: I1193f5df789c7dd10855e35936fc2697697c464e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157246 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/download.lst b/download.lst index 706d1b4a63b8..c7c91d90ca4c 100644 --- a/download.lst +++ b/download.lst @@ -357,8 +357,8 @@ LIBNUMBERTEXT_TARBALL := libnumbertext-1.0.10.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -LIBTOMMATH_SHA256SUM := 083daa92d8ee6f4af96a6143b12d7fc8fe1a547e14f862304f7281f8f7347483 -LIBTOMMATH_TARBALL := ltm-1.0.zip +LIBTOMMATH_SHA256SUM := 986025d7b374276fee2e30e99f3649e4ac0db8a02257a37ee10eae72abed0d1f +LIBTOMMATH_TARBALL := ltm-1.2.1.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts commit 46f2805817f3a6b24ee03e83b3f7e050de8e3ec9 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Mon Aug 28 10:13:28 2023 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 16:41:13 2023 +0200 python3: upgrade to release 3.8.18 Fixes CVE-2023-40217 Change-Id: Ie08af471009b7f5c42aa6875dd4f9d886ad1d617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156183 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/configure.ac b/configure.ac index 1269de2c7a7e..5e99e4026d50 100644 --- a/configure.ac +++ b/configure.ac @@ -9881,7 +9881,7 @@ internal) SYSTEM_PYTHON= PYTHON_VERSION_MAJOR=3 PYTHON_VERSION_MINOR=8 - PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.17 + PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18 if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst]) fi diff --git a/download.lst b/download.lst index 98202b953df4..706d1b4a63b8 100644 --- a/download.lst +++ b/download.lst @@ -493,8 +493,8 @@ POSTGRESQL_TARBALL := postgresql-13.10.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts -PYTHON_SHA256SUM := 2e54b0c68191f16552f6de2e97a2396540572a219f6bbb28591a137cecc490a9 -PYTHON_TARBALL := Python-3.8.17.tar.xz +PYTHON_SHA256SUM := 3ffb71cd349a326ba7b2fadc7e7df86ba577dd9c4917e52a8401adbda7405e3f +PYTHON_TARBALL := Python-3.8.18.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts commit 48a62b663d777675c293fdfb5f19a46e404105c9 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Jul 28 12:13:41 2023 +0100 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 16:31:47 2023 +0200 follow python recommendation and pass SSL contexts i.e. https://docs.python.org/3/library/ssl.html#security-considerations Change-Id: I67a0f9e1c25abc6644412b014f30933a7e681da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155016 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de> diff --git a/scripting/source/pyprov/mailmerge.py b/scripting/source/pyprov/mailmerge.py index 69b3b3ae4c97..792f28cac908 100644 --- a/scripting/source/pyprov/mailmerge.py +++ b/scripting/source/pyprov/mailmerge.py @@ -47,7 +47,7 @@ from email.utils import formatdate from email.utils import parseaddr from socket import _GLOBAL_DEFAULT_TIMEOUT -import sys, smtplib, imaplib, poplib +import sys, ssl, smtplib, imaplib, poplib dbg = False # pythonloader looks for a static g_ImplementationHelper variable @@ -103,7 +103,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): if dbg: print("Timeout: " + str(tout), file=dbgout) if port == 465: - self.server = smtplib.SMTP_SSL(server, port,timeout=tout) + self.server = smtplib.SMTP_SSL(server, port, timeout=tout, context=ssl.create_default_context()) else: self.server = smtplib.SMTP(server, port,timeout=tout) @@ -119,7 +119,7 @@ class PyMailSMTPService(unohelper.Base, XSmtpService): print("ConnectionType: " + connectiontype, file=dbgout) if connectiontype.upper() == 'SSL' and port != 465: self.server.ehlo() - self.server.starttls() + self.server.starttls(context=ssl.create_default_context()) self.server.ehlo() user = xAuthenticator.getUserName() @@ -310,7 +310,7 @@ class PyMailIMAPService(unohelper.Base, XMailService): print(connectiontype, file=dbgout) print("BEFORE", file=dbgout) if connectiontype.upper() == 'SSL': - self.server = imaplib.IMAP4_SSL(server, port) + self.server = imaplib.IMAP4_SSL(server, port, ssl_context=ssl.create_default_context()) else: self.server = imaplib.IMAP4(server, port) print("AFTER", file=dbgout) @@ -379,7 +379,7 @@ class PyMailPOP3Service(unohelper.Base, XMailService): print(connectiontype, file=dbgout) print("BEFORE", file=dbgout) if connectiontype.upper() == 'SSL': - self.server = poplib.POP3_SSL(server, port) + self.server = poplib.POP3_SSL(server, port, context=ssl.create_default_context()) else: tout = xConnectionContext.getValueByName("Timeout") if dbg: commit 132377f38dc752d369126b44ce22210411d8149c Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed May 24 20:13:48 2023 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 16:31:41 2023 +0200 Update pdfium to 5778 - external/pdfium/abseil-trivial.patch is no longer needed, upstream does what we did previously - external/pdfium/build.patch.1: re-generate with 'patch -p1' + 'git diff' - external/pdfium/include.patch is no longer needed, upstream does what we did previously Change-Id: I39a6f721e436aa53914bbf43b78ac7d86e5eac59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152244 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/download.lst b/download.lst index 04c561cefc25..98202b953df4 100644 --- a/download.lst +++ b/download.lst @@ -466,8 +466,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := 1a625b25562fb4c25c8bf4660c704111cdd306b8934b94dcd9b89329909ede55 -PDFIUM_TARBALL := pdfium-5636.tar.bz2 +PDFIUM_SHA256SUM := b1052ff24e9ffb11af017c444bb0f6ad508d64c9a0fb88cacb0e8210245dde06 +PDFIUM_TARBALL := pdfium-5778.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index f137f851a0b2..bdab04c6861d 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -293,6 +293,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfunc \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_basedcs \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_indexedcs \ + UnpackedTarball/pdfium/core/fpdfapi/parser/object_tree_traversal_util \ )) # fpdfdoc diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 180d361cff9f..a2214f645ae8 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -14,12 +14,6 @@ pdfium_patches += build.patch.1 # Avoids Windows 8 build dependency. pdfium_patches += windows7.patch.1 pdfium_patches += c++20-comparison.patch -# Use CoreGraphics.h instead of Carbon.h -- https://pdfium-review.googlesource.com/c/pdfium/+/99753 -# pdfium_patches += cg-instead-of-carbon.patch.1 -# Android NDK 19 - that is known to work well - does not have 2 defines -- https://pdfium-review.googlesource.com/c/pdfium/+/96530 -# pdfium_patches += AndroidNDK19.patch.1 - -pdfium_patches += include.patch $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium)) diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 6f6a53a44ef3..2c177b3b61a4 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -1,9 +1,66 @@ -*- Mode: diff -*- +diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp +index f5a51b24e..8b308d0a6 100644 +--- a/core/fpdfapi/font/cpdf_cidfont.cpp ++++ b/core/fpdfapi/font/cpdf_cidfont.cpp +@@ -755,7 +755,7 @@ int CPDF_CIDFont::GlyphFromCharCode(uint32_t charcode, bool* pVertGlyph) { + uint32_t maccode = CharCodeFromUnicodeForFreetypeEncoding( + FT_ENCODING_APPLE_ROMAN, name_unicode); + index = maccode ? FT_Get_Char_Index(face, maccode) +- : FT_Get_Name_Index(face, name); ++ : FT_Get_Name_Index(face, const_cast<char*>(name)); + } + if (index == 0 || index == 0xffff) + return charcode ? static_cast<int>(charcode) : -1; +diff --git a/core/fpdfapi/font/cpdf_truetypefont.cpp b/core/fpdfapi/font/cpdf_truetypefont.cpp +index 0a59b54eb..a96e11759 100644 +--- a/core/fpdfapi/font/cpdf_truetypefont.cpp ++++ b/core/fpdfapi/font/cpdf_truetypefont.cpp +@@ -91,7 +91,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { + FT_ENCODING_APPLE_ROMAN, + m_Encoding.UnicodeFromCharCode(charcode)); + if (!maccode) { +- m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name); ++ m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name)); + } else { + m_GlyphIndex[charcode] = FT_Get_Char_Index(face, maccode); + } +@@ -105,7 +105,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { + m_GlyphIndex[charcode] = FT_Get_Char_Index(face, 32); + continue; + } +- m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name); ++ m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name)); + if (m_GlyphIndex[charcode] != 0 || !bToUnicode) + continue; + +diff --git a/core/fpdfapi/font/cpdf_type1font.cpp b/core/fpdfapi/font/cpdf_type1font.cpp +index 55510e7d7..2f13f00b8 100644 +--- a/core/fpdfapi/font/cpdf_type1font.cpp ++++ b/core/fpdfapi/font/cpdf_type1font.cpp +@@ -263,7 +263,7 @@ void CPDF_Type1Font::LoadGlyphMap() { + static_cast<uint32_t>(charcode)); + if (name) { + m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name)); +- m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name); ++ m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name)); + } else { + m_GlyphIndex[charcode] = FT_Get_Char_Index( + m_Font.GetFaceRec(), static_cast<uint32_t>(charcode)); +@@ -294,7 +294,7 @@ void CPDF_Type1Font::LoadGlyphMap() { + continue; + + m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name)); +- m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name); ++ m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name)); + if (m_GlyphIndex[charcode] != 0) + continue; + diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp -index 323de4ffc..f11a0b0ad 100644 +index 228a0c137..bf512beb3 100644 --- a/core/fpdfdoc/cpdf_metadata.cpp +++ b/core/fpdfdoc/cpdf_metadata.cpp -@@ -74,7 +74,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const { +@@ -77,7 +77,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const { CFX_XMLParser parser(stream); std::unique_ptr<CFX_XMLDocument> doc = parser.Parse(); if (!doc) @@ -12,37 +69,11 @@ index 323de4ffc..f11a0b0ad 100644 std::vector<UnsupportedFeature> unsupported; CheckForSharedFormInternal(doc->GetRoot(), &unsupported); -diff --git a/third_party/base/span.h b/third_party/base/span.h -index ec9f9903f..1c17ad091 100644 ---- a/third_party/base/span.h -+++ b/third_party/base/span.h -@@ -208,7 +208,7 @@ class span { - // Conversions from spans of compatible types: this allows a span<T> to be - // seamlessly used as a span<const T>, but not the other way around. - template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>> -- constexpr span(const span<U>& other) : span(other.data(), other.size()) {} -+ span(const span<U>& other) : span(other.data(), other.size()) {} - span& operator=(const span& other) noexcept { - if (this != &other) { - ReleaseEmptySpan(); -diff --git a/third_party/base/span.h b/third_party/base/span.h -index 0fb627ba8..dda1fc8bc 100644 ---- a/third_party/base/span.h -+++ b/third_party/base/span.h -@@ -204,7 +204,7 @@ class span { - // size()|. - template <typename Container, - typename = internal::EnableIfSpanCompatibleContainer<Container, T>> -- constexpr span(Container& container) -+ span(Container& container) - : span(container.data(), container.size()) {} - template < - typename Container, diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp -index d8875786c..bc019ebe1 100644 +index 9391d61ab..490ce2230 100644 --- a/core/fxcodec/jpx/cjpx_decoder.cpp +++ b/core/fxcodec/jpx/cjpx_decoder.cpp -@@ -73,7 +73,7 @@ absl::optional<OpjImageRgbData> alloc_rgb(size_t size) { +@@ -75,7 +75,7 @@ absl::optional<OpjImageRgbData> alloc_rgb(size_t size) { if (!data.b) return absl::nullopt; @@ -52,10 +83,10 @@ index d8875786c..bc019ebe1 100644 void sycc_to_rgb(int offset, diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp -index 8b3a72700..ea1db23f4 100644 +index a2a44df39..d6cedee46 100644 --- a/core/fxge/cfx_font.cpp +++ b/core/fxge/cfx_font.cpp -@@ -47,25 +47,9 @@ struct OUTLINE_PARAMS { +@@ -48,25 +48,9 @@ struct OUTLINE_PARAMS { // TODO(crbug.com/pdfium/1400): When FT_Done_MM_Var() is more likely to be // available to all users in the future, remove FreeMMVar() and use // FT_Done_MM_Var() directly. @@ -82,10 +113,10 @@ index 8b3a72700..ea1db23f4 100644 FX_RECT FXRectFromFTPos(FT_Pos left, FT_Pos top, FT_Pos right, FT_Pos bottom) { diff --git a/third_party/base/numerics/safe_conversions_impl.h b/third_party/base/numerics/safe_conversions_impl.h -index 4d8a7b7d9..d14c6dc06 100644 +index 44c921a14..0152a89b7 100644 --- a/third_party/base/numerics/safe_conversions_impl.h +++ b/third_party/base/numerics/safe_conversions_impl.h -@@ -88,7 +88,7 @@ constexpr typename std::make_unsigned<T>::type SafeUnsignedAbs(T value) { +@@ -89,7 +89,7 @@ constexpr typename std::make_unsigned<T>::type SafeUnsignedAbs(T value) { // TODO(jschuh): Switch to std::is_constant_evaluated() once C++20 is supported. // Alternately, the usage could be restructured for "consteval if" in C++23. @@ -94,57 +125,28 @@ index 4d8a7b7d9..d14c6dc06 100644 // TODO(jschuh): Debug builds don't reliably propagate constants, so we restrict // some accelerated runtime paths to release builds until this can be forced ---- pdfium/core/fpdfapi/font/cpdf_cidfont.cpp.orig 2022-05-20 09:25:52.066728467 +0000 -+++ pdfium/core/fpdfapi/font/cpdf_cidfont.cpp 2022-05-20 09:25:56.146736531 +0000 -@@ -738,7 +738,7 @@ - uint32_t maccode = CharCodeFromUnicodeForFreetypeEncoding( - FT_ENCODING_APPLE_ROMAN, name_unicode); - index = maccode ? FT_Get_Char_Index(face, maccode) -- : FT_Get_Name_Index(face, name); -+ : FT_Get_Name_Index(face, const_cast<char*>(name)); - } - if (index == 0 || index == 0xffff) - return charcode ? static_cast<int>(charcode) : -1; ---- pdfium/core/fpdfapi/font/cpdf_type1font.cpp.orig 2022-05-20 09:26:59.090862058 +0000 -+++ pdfium/core/fpdfapi/font/cpdf_type1font.cpp 2022-05-20 09:27:33.810932435 +0000 -@@ -260,7 +260,7 @@ - static_cast<uint32_t>(charcode)); - if (name) { - m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name)); -- m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name); -+ m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name)); - } else { - m_GlyphIndex[charcode] = FT_Get_Char_Index( - m_Font.GetFaceRec(), static_cast<uint32_t>(charcode)); -@@ -291,7 +291,7 @@ - continue; - - m_Encoding.SetUnicode(charcode, UnicodeFromAdobeName(name)); -- m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), name); -+ m_GlyphIndex[charcode] = FT_Get_Name_Index(m_Font.GetFaceRec(), const_cast<char*>(name)); - if (m_GlyphIndex[charcode] != 0) - continue; - ---- pdfium/core/fpdfapi/font/cpdf_truetypefont.cpp.orig 2022-05-20 09:26:12.066767996 +0000 -+++ pdfium/core/fpdfapi/font/cpdf_truetypefont.cpp 2022-05-20 09:26:46.690836923 +0000 -@@ -90,7 +90,7 @@ - FT_ENCODING_APPLE_ROMAN, - m_Encoding.UnicodeFromCharCode(charcode)); - if (!maccode) { -- m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name); -+ m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name)); - } else { - m_GlyphIndex[charcode] = FT_Get_Char_Index(face, maccode); - } -@@ -104,7 +104,7 @@ - m_GlyphIndex[charcode] = FT_Get_Char_Index(face, 32); - continue; - } -- m_GlyphIndex[charcode] = FT_Get_Name_Index(face, name); -+ m_GlyphIndex[charcode] = FT_Get_Name_Index(face, const_cast<char*>(name)); - if (m_GlyphIndex[charcode] != 0 || !bToUnicode) - continue; +diff --git a/third_party/base/span.h b/third_party/base/span.h +index ed2a3c8de..87493861c 100644 +--- a/third_party/base/span.h ++++ b/third_party/base/span.h +@@ -211,7 +211,7 @@ class TRIVIAL_ABI GSL_POINTER span { + #else + template <typename Container, + typename = internal::EnableIfSpanCompatibleContainer<Container, T>> +- constexpr span(Container& container) ++ span(Container& container) + : span(container.data(), container.size()) {} + #endif +@@ -225,7 +225,7 @@ class TRIVIAL_ABI GSL_POINTER span { + // Conversions from spans of compatible types: this allows a span<T> to be + // seamlessly used as a span<const T>, but not the other way around. + template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>> +- constexpr span(const span<U>& other) : span(other.data(), other.size()) {} ++ span(const span<U>& other) : span(other.data(), other.size()) {} + span& operator=(const span& other) noexcept { + if (this != &other) { + ReleaseEmptySpan(); diff --git a/third_party/libopenjpeg/openjpeg.c b/third_party/libopenjpeg/openjpeg.c index 29d3ee528..d5c7a1bc9 100644 --- a/third_party/libopenjpeg/openjpeg.c diff --git a/external/pdfium/include.patch b/external/pdfium/include.patch deleted file mode 100644 index 75c0e3b9272a..000000000000 --- a/external/pdfium/include.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- constants/annotation_flags.h -+++ constants/annotation_flags.h -@@ -5,6 +5,8 @@ - #ifndef CONSTANTS_ANNOTATION_FLAGS_H_ - #define CONSTANTS_ANNOTATION_FLAGS_H_ - -+#include <stdint.h> -+ - namespace pdfium { - namespace annotation_flags { - commit 89bfda53227c9bc4e2329d8d8e007d97bae6c268 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Fri Mar 10 17:21:42 2023 +0100 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 16:24:35 2023 +0200 Update pdfium to 5636 Some changes in the bundled libtiff, but it seems that would be for XFA which we disable, so it doesn't affect us. Change-Id: Ibadeecf20daec342fbfef6d1e89bd17f5f0095e9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148652 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/download.lst b/download.lst index 0e9887c7263d..04c561cefc25 100644 --- a/download.lst +++ b/download.lst @@ -466,8 +466,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := 7db59b1e91f2bc0ab4c5e19d1a4f881e6a47dbb0d3b7e980a7358225b12a0f35 -PDFIUM_TARBALL := pdfium-5408.tar.bz2 +PDFIUM_SHA256SUM := 1a625b25562fb4c25c8bf4660c704111cdd306b8934b94dcd9b89329909ede55 +PDFIUM_TARBALL := pdfium-5636.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index 315b5d81ec12..6258e8036360 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -310,6 +310,8 @@ #include <core/fxcrt/fileaccess_iface.h> #include <core/fxcrt/fixed_try_alloc_zeroed_data_vector.h> #include <core/fxcrt/fixed_uninit_data_vector.h> +#include <core/fxcrt/fixed_zeroed_data_vector.h> +#include <core/fxcrt/fx_2d_size.h> #include <core/fxcrt/fx_bidi.h> #include <core/fxcrt/fx_codepage.h> #include <core/fxcrt/fx_coordinates.h> commit 729807519ef83b148398c9335c3d2d55fcae2763 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Wed Nov 9 13:19:49 2022 +0100 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 16:16:11 2023 +0200 Update pdfium to 5408 - drop cg-instead-of-carbon.patch.1, no longer needed after https://pdfium-review.googlesource.com/c/pdfium/+/99753 - drop AndroidNDK19.patch.1, no longer needed after https://pdfium-review.googlesource.com/c/pdfium/+/96530 - drop gcc-c++20-comparison.patch, no longer needed after <https://pdfium.googlesource.com/pdfium/+/065698acf82962a3168a0d56bb1d5964bc593d00> "Fix interaction between RetainPtr<T> and transparent comparisons" since chromium/5321 Change-Id: I1f861dd8a3d490400bb39c108bd4e767a2f45d30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142474 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/download.lst b/download.lst index b958c643d14b..0e9887c7263d 100644 --- a/download.lst +++ b/download.lst @@ -466,8 +466,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := ecb9c2a0d777196949994946e3f24ed251ae5d3db8a9fa1e2827ef857151db13 -PDFIUM_TARBALL := pdfium-5298.tar.bz2 +PDFIUM_SHA256SUM := 7db59b1e91f2bc0ab4c5e19d1a4f881e6a47dbb0d3b7e980a7358225b12a0f35 +PDFIUM_TARBALL := pdfium-5408.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/pdfium/AndroidNDK19.patch.1 b/external/pdfium/AndroidNDK19.patch.1 deleted file mode 100644 index f0d926f555d8..000000000000 --- a/external/pdfium/AndroidNDK19.patch.1 +++ /dev/null @@ -1,16 +0,0 @@ -diff -Naur pdfium.org/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h ---- pdfium.org/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h 2021-05-05 23:01:25.705057178 +0200 -+++ pdfium/third_party/base/allocator/partition_allocator/page_allocator_internals_posix.h 2021-05-05 23:06:52.194081762 +0200 -@@ -15,6 +15,12 @@ - #endif - #if BUILDFLAG(IS_ANDROID) - #include <sys/prctl.h> -+#ifndef PR_SET_VMA -+#define PR_SET_VMA 0x53564d41 -+#endif -+#ifndef PR_SET_VMA_ANON_NAME -+#define PR_SET_VMA_ANON_NAME 0 -+#endif - #endif - #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) - #include <sys/resource.h> diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index c00a5f8f89e3..f137f851a0b2 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -244,9 +244,9 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfapi/render/charposlist \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_devicebuffer \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_docrenderdata \ - UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imageloader \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_imageloader \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagerenderer \ - UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_pagerendercache \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_pageimagecache \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_progressiverenderer \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_rendercontext \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_renderoptions \ @@ -566,17 +566,7 @@ endif # pdfium_base $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/address_space_randomization \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/page_allocator \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/spin_lock \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_alloc \ UnpackedTarball/pdfium/third_party/base/debug/alias \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/oom_callback \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_bucket \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_oom \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_page \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_root_base \ - UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/random \ UnpackedTarball/pdfium/third_party/base/memory/aligned_memory \ )) diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 1195869c9118..180d361cff9f 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -14,15 +14,10 @@ pdfium_patches += build.patch.1 # Avoids Windows 8 build dependency. pdfium_patches += windows7.patch.1 pdfium_patches += c++20-comparison.patch -# Use CoreGraphics.h instead of Carbon.h -pdfium_patches += cg-instead-of-carbon.patch.1 -# Android NDK 19 - that is known to work well - does not have 2 defines -pdfium_patches += AndroidNDK19.patch.1 - -# Work around <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94141> "c++20 rewritten operator== -# recursive call mixing friend and external operators for template class" in GCC with -# --with-latest-c++: -pdfium_patches += gcc-c++20-comparison.patch +# Use CoreGraphics.h instead of Carbon.h -- https://pdfium-review.googlesource.com/c/pdfium/+/99753 +# pdfium_patches += cg-instead-of-carbon.patch.1 +# Android NDK 19 - that is known to work well - does not have 2 defines -- https://pdfium-review.googlesource.com/c/pdfium/+/96530 +# pdfium_patches += AndroidNDK19.patch.1 pdfium_patches += include.patch @@ -41,17 +36,7 @@ $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\ mv third_party/bigint/BigIntegerUtils.cc third_party/bigint/BigIntegerUtils.cpp && \ mv third_party/bigint/BigUnsigned.cc third_party/bigint/BigUnsigned.cpp && \ mv third_party/bigint/BigUnsignedInABase.cc third_party/bigint/BigUnsignedInABase.cpp && \ - mv third_party/base/allocator/partition_allocator/address_space_randomization.cc third_party/base/allocator/partition_allocator/address_space_randomization.cpp && \ - mv third_party/base/allocator/partition_allocator/page_allocator.cc third_party/base/allocator/partition_allocator/page_allocator.cpp && \ - mv third_party/base/allocator/partition_allocator/partition_alloc.cc third_party/base/allocator/partition_allocator/partition_alloc.cpp && \ - mv third_party/base/allocator/partition_allocator/spin_lock.cc third_party/base/allocator/partition_allocator/spin_lock.cpp && \ mv third_party/base/debug/alias.cc third_party/base/debug/alias.cpp && \ - mv third_party/base/allocator/partition_allocator/oom_callback.cc third_party/base/allocator/partition_allocator/oom_callback.cpp && \ - mv third_party/base/allocator/partition_allocator/partition_bucket.cc third_party/base/allocator/partition_allocator/partition_bucket.cpp && \ - mv third_party/base/allocator/partition_allocator/partition_oom.cc third_party/base/allocator/partition_allocator/partition_oom.cpp && \ - mv third_party/base/allocator/partition_allocator/partition_page.cc third_party/base/allocator/partition_allocator/partition_page.cpp && \ - mv third_party/base/allocator/partition_allocator/partition_root_base.cc third_party/base/allocator/partition_allocator/partition_root_base.cpp && \ - mv third_party/base/allocator/partition_allocator/random.cc third_party/base/allocator/partition_allocator/random.cpp && \ mv third_party/base/memory/aligned_memory.cc third_party/base/memory/aligned_memory.cpp && \ mv third_party/base/win/win_util.cc third_party/base/win/win_util.cpp && \ mv third_party/libopenjpeg/opj_malloc.cc third_party/libopenjpeg/opj_malloc.cpp && \ diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 35073e2c94d3..6f6a53a44ef3 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -158,16 +158,3 @@ index 29d3ee528..d5c7a1bc9 100644 OPJ_BOOL strict) { if (p_codec) { -diff --git a/core/fpdfapi/parser/cpdf_data_avail.cpp b/core/fpdfapi/parser/cpdf_data_avail.cpp -index a17ec0353..3b024ac91 100644 ---- a/core/fpdfapi/parser/cpdf_data_avail.cpp -+++ b/core/fpdfapi/parser/cpdf_data_avail.cpp -@@ -902,7 +902,7 @@ CPDF_DataAvail::DocAvailStatus CPDF_DataAvail::CheckResources( - CPDF_PageObjectAvail* resource_avail = - m_PagesResourcesAvail - .insert(std::make_pair( -- resources, -+ resources.Get(), - std::make_unique<CPDF_PageObjectAvail>( - GetValidator(), m_pDocument.Get(), resources.Get()))) - .first->second.get(); diff --git a/external/pdfium/cg-instead-of-carbon.patch.1 b/external/pdfium/cg-instead-of-carbon.patch.1 deleted file mode 100644 index 055eac735307..000000000000 --- a/external/pdfium/cg-instead-of-carbon.patch.1 +++ /dev/null @@ -1,23 +0,0 @@ --*- Mode: Diff -*- ---- a/core/fxge/apple/fx_quartz_device.h -+++ b/core/fxge/apple/fx_quartz_device.h -@@ -7,7 +7,7 @@ - #ifndef CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_ - #define CORE_FXGE_APPLE_FX_QUARTZ_DEVICE_H_ - --#include <Carbon/Carbon.h> -+#include <CoreGraphics/CoreGraphics.h> - #include <stdint.h> - - #include "core/fxcrt/retain_ptr.h" ---- a/core/fpdfapi/font/cpdf_type1font.cpp -+++ b/core/fpdfapi/font/cpdf_type1font.cpp -@@ -19,7 +19,7 @@ - #include "core/fxge/fx_font.h" - - #if BUILDFLAG(IS_APPLE) --#include <Carbon/Carbon.h> -+#include <CoreGraphics/CoreGraphics.h> - #endif // BUILDFLAG(IS_APPLE) - - namespace { diff --git a/external/pdfium/gcc-c++20-comparison.patch b/external/pdfium/gcc-c++20-comparison.patch deleted file mode 100644 index 0895ea8b5f9d..000000000000 --- a/external/pdfium/gcc-c++20-comparison.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- core/fxcrt/retain_ptr.h -+++ core/fxcrt/retain_ptr.h -@@ -135,6 +135,7 @@ - mutable intptr_t m_nRefCount = 0; - }; - -+#if __cplusplus < 202002L - template <typename T, typename U> - inline bool operator==(const U* lhs, const RetainPtr<T>& rhs) { - return rhs == lhs; -@@ -144,6 +144,7 @@ - inline bool operator!=(const U* lhs, const RetainPtr<T>& rhs) { - return rhs != lhs; - } -+#endif - - } // namespace fxcrt - diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index 21bc61f05fb3..315b5d81ec12 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.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 2020-09-21 15:21:21 using: + Generated on 2022-11-08 17:05:53 using: ./bin/update_pch external/pdfium pdfium --cutoff=1 --exclude:system --include:module --include:local If after updating build fails, use the following command to locate conflicting headers: @@ -31,7 +31,6 @@ #include <agg_vcgen_stroke.h> #include <algorithm> #include <array> -#include <atomic> #include <cassert> #include <cfloat> #include <climits> @@ -127,11 +126,13 @@ #include <core/fpdfapi/page/cpdf_graphicstates.h> #include <core/fpdfapi/page/cpdf_iccprofile.h> #include <core/fpdfapi/page/cpdf_image.h> +#include <core/fpdfapi/page/cpdf_imageloader.h> #include <core/fpdfapi/page/cpdf_imageobject.h> #include <core/fpdfapi/page/cpdf_indexedcs.h> #include <core/fpdfapi/page/cpdf_meshstream.h> #include <core/fpdfapi/page/cpdf_occontext.h> #include <core/fpdfapi/page/cpdf_page.h> +#include <core/fpdfapi/page/cpdf_pageimagecache.h> #include <core/fpdfapi/page/cpdf_pagemodule.h> #include <core/fpdfapi/page/cpdf_pageobject.h> #include <core/fpdfapi/page/cpdf_pageobjectholder.h> @@ -189,9 +190,7 @@ #include <core/fpdfapi/render/charposlist.h> #include <core/fpdfapi/render/cpdf_devicebuffer.h> #include <core/fpdfapi/render/cpdf_docrenderdata.h> -#include <core/fpdfapi/render/cpdf_imageloader.h> #include <core/fpdfapi/render/cpdf_imagerenderer.h> -#include <core/fpdfapi/render/cpdf_pagerendercache.h> #include <core/fpdfapi/render/cpdf_pagerendercontext.h> #include <core/fpdfapi/render/cpdf_progressiverenderer.h> #include <core/fpdfapi/render/cpdf_rendercontext.h> @@ -309,6 +308,8 @@ #include <core/fxcrt/css/cfx_cssvaluelistparser.h> #include <core/fxcrt/data_vector.h> #include <core/fxcrt/fileaccess_iface.h> +#include <core/fxcrt/fixed_try_alloc_zeroed_data_vector.h> +#include <core/fxcrt/fixed_uninit_data_vector.h> #include <core/fxcrt/fx_bidi.h> #include <core/fxcrt/fx_codepage.h> #include <core/fxcrt/fx_coordinates.h> @@ -461,22 +462,6 @@ #include <third_party/agg23/agg_rasterizer_scanline_aa.h> #include <third_party/agg23/agg_renderer_scanline.h> #include <third_party/agg23/agg_scanline_u.h> -#include <third_party/base/allocator/partition_allocator/address_space_randomization.h> -#include <third_party/base/allocator/partition_allocator/oom.h> -#include <third_party/base/allocator/partition_allocator/oom_callback.h> -#include <third_party/base/allocator/partition_allocator/page_allocator.h> -#include <third_party/base/allocator/partition_allocator/page_allocator_internal.h> -#include <third_party/base/allocator/partition_allocator/partition_alloc.h> -#include <third_party/base/allocator/partition_allocator/partition_alloc_check.h> -#include <third_party/base/allocator/partition_allocator/partition_alloc_constants.h> -#include <third_party/base/allocator/partition_allocator/partition_bucket.h> -#include <third_party/base/allocator/partition_allocator/partition_direct_map_extent.h> -#include <third_party/base/allocator/partition_allocator/partition_oom.h> -#include <third_party/base/allocator/partition_allocator/partition_page.h> -#include <third_party/base/allocator/partition_allocator/partition_root_base.h> -#include <third_party/base/allocator/partition_allocator/random.h> -#include <third_party/base/allocator/partition_allocator/spin_lock.h> -#include <third_party/base/bits.h> #include <third_party/base/check.h> #include <third_party/base/check_op.h> #include <third_party/base/compiler_specific.h> commit 7a5232451e46f8d55245be18f7d83c73f33ea4fa Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Sep 13 20:26:53 2022 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 14:42:38 2023 +0200 external: update pdfium to 5298 pdfium_arm64.patch.1 is now upstreamed as <https://pdfium-review.googlesource.com/c/pdfium/+/96010>. Change-Id: Iafb1ba480161429094db5446ab50314068ae4cfc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139876 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/download.lst b/download.lst index 0d1e4e9ac67d..b958c643d14b 100644 --- a/download.lst +++ b/download.lst @@ -466,8 +466,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := 04e0e3f90589250c1fa97cec543af6f5e6c8c2daa377d614ec1f04b061b86651 -PDFIUM_TARBALL := pdfium-5187.tar.bz2 +PDFIUM_SHA256SUM := ecb9c2a0d777196949994946e3f24ed251ae5d3db8a9fa1e2827ef857151db13 +PDFIUM_TARBALL := pdfium-5298.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index 9ae166889b2c..c00a5f8f89e3 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -244,7 +244,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfapi/render/charposlist \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_devicebuffer \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_docrenderdata \ - UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagecacheentry \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imageloader \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagerenderer \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_pagerendercache \ @@ -413,10 +412,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxcrt/css/cfx_cssoutputtextbuf \ UnpackedTarball/pdfium/core/fxcrt/cfx_datetime \ UnpackedTarball/pdfium/core/fxcrt/bytestring \ - UnpackedTarball/pdfium/core/fxcrt/cfx_binarybuf \ UnpackedTarball/pdfium/core/fxcrt/cfx_bitstream \ UnpackedTarball/pdfium/core/fxcrt/cfx_utf8decoder \ - UnpackedTarball/pdfium/core/fxcrt/cfx_widetextbuf \ UnpackedTarball/pdfium/core/fxcrt/fx_random \ UnpackedTarball/pdfium/core/fxcrt/fx_string \ UnpackedTarball/pdfium/core/fxcrt/widestring \ @@ -424,9 +421,14 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxcrt/fx_codepage \ UnpackedTarball/pdfium/core/fxcrt/fx_number \ UnpackedTarball/pdfium/core/fxcrt/cfx_utf8encoder \ - UnpackedTarball/pdfium/core/fxcrt/cfx_readonlymemorystream \ UnpackedTarball/pdfium/core/fxcrt/observed_ptr \ UnpackedTarball/pdfium/core/fxcrt/string_data_template \ + UnpackedTarball/pdfium/core/fxcrt/binary_buffer \ + UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_span_stream \ + UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_string_stream \ + UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_vector_stream \ + UnpackedTarball/pdfium/core/fxcrt/fx_memory_malloc \ + UnpackedTarball/pdfium/core/fxcrt/widetext_buffer \ )) # fxge @@ -527,6 +529,7 @@ ifneq ($(SYSTEM_ABSEIL),TRUE) # third_party/abseil-cpp $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/third_party/abseil-cpp/absl/types/bad_optional_access \ + UnpackedTarball/pdfium/third_party/abseil-cpp/absl/types/bad_variant_access \ )) endif diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index afffd116d0e3..1195869c9118 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -55,7 +55,8 @@ $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\ mv third_party/base/memory/aligned_memory.cc third_party/base/memory/aligned_memory.cpp && \ mv third_party/base/win/win_util.cc third_party/base/win/win_util.cpp && \ mv third_party/libopenjpeg/opj_malloc.cc third_party/libopenjpeg/opj_malloc.cpp && \ - mv third_party/abseil-cpp/absl/types/bad_optional_access.cc third_party/abseil-cpp/absl/types/bad_optional_access.cpp \ + mv third_party/abseil-cpp/absl/types/bad_optional_access.cc third_party/abseil-cpp/absl/types/bad_optional_access.cpp && \ + mv third_party/abseil-cpp/absl/types/bad_variant_access.cc third_party/abseil-cpp/absl/types/bad_variant_access.cpp \ )) # vim: set noet sw=4 ts=4: diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 7e783a07fdb1..35073e2c94d3 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -13,18 +13,18 @@ index 323de4ffc..f11a0b0ad 100644 std::vector<UnsupportedFeature> unsupported; CheckForSharedFormInternal(doc->GetRoot(), &unsupported); diff --git a/third_party/base/span.h b/third_party/base/span.h -index 0fb627ba8..f71c362e2 100644 +index ec9f9903f..1c17ad091 100644 --- a/third_party/base/span.h +++ b/third_party/base/span.h -@@ -214,7 +214,7 @@ class span { +@@ -208,7 +208,7 @@ class span { // Conversions from spans of compatible types: this allows a span<T> to be // seamlessly used as a span<const T>, but not the other way around. template <typename U, typename = internal::EnableIfLegalSpanConversion<U, T>> - constexpr span(const span<U>& other) : span(other.data(), other.size()) {} + span(const span<U>& other) : span(other.data(), other.size()) {} - span& operator=(const span& other) noexcept = default; - ~span() noexcept { - if (!size_) { + span& operator=(const span& other) noexcept { + if (this != &other) { + ReleaseEmptySpan(); diff --git a/third_party/base/span.h b/third_party/base/span.h index 0fb627ba8..dda1fc8bc 100644 --- a/third_party/base/span.h diff --git a/external/pdfium/c++20-comparison.patch b/external/pdfium/c++20-comparison.patch index 638497f6aee4..d26fe66ad8b7 100644 --- a/external/pdfium/c++20-comparison.patch +++ b/external/pdfium/c++20-comparison.patch @@ -10,4 +10,4 @@ + bool operator!=(const FxPartitionAllocAllocator& that) const { return false; } }; - // Used to put backing store for std::vector<> and such + // Used to put backing store for std::vector<> and such into the diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index eaa6090cf6c6..21bc61f05fb3 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -54,6 +54,7 @@ #include <stack> #include <stdarg.h> #include <stddef.h> +#include <stdint.h> #include <stdlib.h> #include <string.h> #include <string> @@ -188,7 +189,6 @@ #include <core/fpdfapi/render/charposlist.h> #include <core/fpdfapi/render/cpdf_devicebuffer.h> #include <core/fpdfapi/render/cpdf_docrenderdata.h> -#include <core/fpdfapi/render/cpdf_imagecacheentry.h> #include <core/fpdfapi/render/cpdf_imageloader.h> #include <core/fpdfapi/render/cpdf_imagerenderer.h> #include <core/fpdfapi/render/cpdf_pagerendercache.h> @@ -274,18 +274,18 @@ #include <core/fxcodec/scanlinedecoder.h> #include <core/fxcrt/autonuller.h> #include <core/fxcrt/autorestorer.h> +#include <core/fxcrt/binary_buffer.h> #include <core/fxcrt/bytestring.h> -#include <core/fxcrt/cfx_binarybuf.h> #include <core/fxcrt/cfx_bitstream.h> #include <core/fxcrt/cfx_datetime.h> -#include <core/fxcrt/cfx_fixedbufgrow.h> #include <core/fxcrt/cfx_memorystream.h> -#include <core/fxcrt/cfx_readonlymemorystream.h> +#include <core/fxcrt/cfx_read_only_span_stream.h> +#include <core/fxcrt/cfx_read_only_string_stream.h> +#include <core/fxcrt/cfx_read_only_vector_stream.h> #include <core/fxcrt/cfx_seekablestreamproxy.h> #include <core/fxcrt/cfx_timer.h> #include <core/fxcrt/cfx_utf8decoder.h> #include <core/fxcrt/cfx_utf8encoder.h> -#include <core/fxcrt/cfx_widetextbuf.h> #include <core/fxcrt/css/cfx_css.h> #include <core/fxcrt/css/cfx_csscolorvalue.h> #include <core/fxcrt/css/cfx_csscomputedstyle.h> @@ -307,6 +307,7 @@ #include <core/fxcrt/css/cfx_cssvalue.h> #include <core/fxcrt/css/cfx_cssvaluelist.h> #include <core/fxcrt/css/cfx_cssvaluelistparser.h> +#include <core/fxcrt/data_vector.h> #include <core/fxcrt/fileaccess_iface.h> #include <core/fxcrt/fx_bidi.h> #include <core/fxcrt/fx_codepage.h> @@ -328,12 +329,14 @@ #include <core/fxcrt/pauseindicator_iface.h> #include <core/fxcrt/retain_ptr.h> #include <core/fxcrt/scoped_set_insertion.h> +#include <core/fxcrt/small_buffer.h> #include <core/fxcrt/span_util.h> #include <core/fxcrt/stl_util.h> #include <core/fxcrt/string_data_template.h> #include <core/fxcrt/string_pool_template.h> #include <core/fxcrt/unowned_ptr.h> #include <core/fxcrt/widestring.h> +#include <core/fxcrt/widetext_buffer.h> #include <core/fxcrt/xml/cfx_xmlchardata.h> #include <core/fxcrt/xml/cfx_xmldocument.h> #include <core/fxcrt/xml/cfx_xmlelement.h> commit 3039361d200b1975eaf713e67259ded88cb1f54a Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Jul 19 20:01:06 2022 +0200 Commit: Gabor Kelemen <gabor.kelemen.ext...@allotropia.de> CommitDate: Fri Oct 6 14:20:25 2023 +0200 external: update pdfium to 5187 build.patch.1 is extended to avoid: > C:/lo/master/workdir/UnpackedTarball/pdfium/third_party/libopenjpeg/openjpeg.c(438): error C2491: 'opj_decoder_set_strict_mode': definition of dllimport function not allowed and also is extended to avoid: > /opt/rh/devtoolset-7/root/usr/include/c++/7/bits/stl_tree.h:2028:5: note: no known conversion for argument 1 from ‘std::pair<fxcrt::RetainPtr<CPDF_Object>, std::unique_ptr<CPDF_PageObjectAvail> >::first_type {aka fxcrt::RetainPtr<CPDF_Object>}’ to ‘const CPDF_Object* const&’ Change-Id: Icacc05627a8612b33d6445685d26470e7c757b8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137238 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/download.lst b/download.lst index 73257b7ae13e..0d1e4e9ac67d 100644 --- a/download.lst +++ b/download.lst @@ -466,8 +466,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := eaf4ce9fad32b5d951c524139df23119b66c67720057defb97acab2dfb2582ac -PDFIUM_TARBALL := pdfium-5058.tar.bz2 +PDFIUM_SHA256SUM := 04e0e3f90589250c1fa97cec543af6f5e6c8c2daa377d614ec1f04b061b86651 +PDFIUM_TARBALL := pdfium-5187.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index 57f67693450d..9ae166889b2c 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -484,6 +484,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/dib/cfx_cmyk_to_srgb \ UnpackedTarball/pdfium/core/fxge/text_char_pos \ UnpackedTarball/pdfium/core/fxge/cfx_face \ + UnpackedTarball/pdfium/core/fxge/cfx_defaultrenderdevice \ UnpackedTarball/pdfium/core/fxge/calculate_pitch \ )) @@ -532,30 +533,31 @@ endif ifneq ($(SYSTEM_OPENJPEG2),TRUE) # third_party/fx_libopenjpeg $(eval $(call gb_Library_add_generated_cobjects,pdfium,\ - UnpackedTarball/pdfium/third_party/libopenjpeg20/bio \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/cio \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/dwt \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/event \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/function_list \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/image \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/invert \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/j2k \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/jp2 \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/mct \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/mqc \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/openjpeg \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_clock \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/pi \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/thread \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/t1 \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/t2 \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/tcd \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/tgt \ - UnpackedTarball/pdfium/third_party/libopenjpeg20/sparse_array \ + UnpackedTarball/pdfium/third_party/libopenjpeg/bio \ + UnpackedTarball/pdfium/third_party/libopenjpeg/cio \ + UnpackedTarball/pdfium/third_party/libopenjpeg/dwt \ + UnpackedTarball/pdfium/third_party/libopenjpeg/event \ + UnpackedTarball/pdfium/third_party/libopenjpeg/function_list \ + UnpackedTarball/pdfium/third_party/libopenjpeg/image \ + UnpackedTarball/pdfium/third_party/libopenjpeg/invert \ + UnpackedTarball/pdfium/third_party/libopenjpeg/j2k \ + UnpackedTarball/pdfium/third_party/libopenjpeg/jp2 \ + UnpackedTarball/pdfium/third_party/libopenjpeg/mct \ + UnpackedTarball/pdfium/third_party/libopenjpeg/mqc \ + UnpackedTarball/pdfium/third_party/libopenjpeg/openjpeg \ + UnpackedTarball/pdfium/third_party/libopenjpeg/opj_clock \ + UnpackedTarball/pdfium/third_party/libopenjpeg/pi \ + UnpackedTarball/pdfium/third_party/libopenjpeg/thread \ + UnpackedTarball/pdfium/third_party/libopenjpeg/t1 \ + UnpackedTarball/pdfium/third_party/libopenjpeg/t2 \ + UnpackedTarball/pdfium/third_party/libopenjpeg/tcd \ + UnpackedTarball/pdfium/third_party/libopenjpeg/tgt \ + UnpackedTarball/pdfium/third_party/libopenjpeg/sparse_array \ + UnpackedTarball/pdfium/third_party/libopenjpeg/ht_dec \ )) $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ - UnpackedTarball/pdfium/third_party/libopenjpeg20/opj_malloc \ + UnpackedTarball/pdfium/third_party/libopenjpeg/opj_malloc \ )) endif diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 06b94e4d064d..afffd116d0e3 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -54,7 +54,7 @@ $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\ mv third_party/base/allocator/partition_allocator/random.cc third_party/base/allocator/partition_allocator/random.cpp && \ mv third_party/base/memory/aligned_memory.cc third_party/base/memory/aligned_memory.cpp && \ mv third_party/base/win/win_util.cc third_party/base/win/win_util.cpp && \ - mv third_party/libopenjpeg20/opj_malloc.cc third_party/libopenjpeg20/opj_malloc.cpp && \ + mv third_party/libopenjpeg/opj_malloc.cc third_party/libopenjpeg/opj_malloc.cpp && \ mv third_party/abseil-cpp/absl/types/bad_optional_access.cc third_party/abseil-cpp/absl/types/bad_optional_access.cpp \ )) diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 46ea17fbc9bd..7e783a07fdb1 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -145,3 +145,29 @@ index 4d8a7b7d9..d14c6dc06 100644 if (m_GlyphIndex[charcode] != 0 || !bToUnicode) continue; +diff --git a/third_party/libopenjpeg/openjpeg.c b/third_party/libopenjpeg/openjpeg.c +index 29d3ee528..d5c7a1bc9 100644 ... etc. - the rest is truncated