From d1f29087cca44a4b7ba36fce4d759f72b57082b6 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Mon, 22 Apr 2024 08:17:09 +0200 Subject: Update pdfium to 6425 Drop parts of build.patch.1 and the entire include.patch, which are probably obsolete and don't apply anymore. (cherry picked from commit 116ac059a3c30146d7a30bd917e048256f7b3cd8) Conflicts: external/pdfium/UnpackedTarball_pdfium.mk Change-Id: I18c8d5e2ee97c7793e75ac0e47b5705b99585d59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169457 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mike Kaganski --- external/pdfium/Library_pdfium.mk | 11 +++----- external/pdfium/UnpackedTarball_pdfium.mk | 5 ++-- external/pdfium/build.patch.1 | 35 -------------------------- external/pdfium/inc/pch/precompiled_pdfium.hxx | 28 +++++++++++---------- external/pdfium/windows7.patch.1 | 14 +++++------ 5 files changed, 28 insertions(+), 65 deletions(-) (limited to 'external') diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index f8d075b8db08..7afafcb08864 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -428,6 +428,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_vector_stream \ UnpackedTarball/pdfium/core/fxcrt/fx_memory_malloc \ UnpackedTarball/pdfium/core/fxcrt/widetext_buffer \ + UnpackedTarball/pdfium/core/fxcrt/debug/alias \ + UnpackedTarball/pdfium/core/fxcrt/string_template \ )) # fxge @@ -563,12 +565,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ )) endif -# pdfium_base -$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ - UnpackedTarball/pdfium/third_party/base/debug/alias \ - UnpackedTarball/pdfium/third_party/base/memory/aligned_memory \ -)) - $(eval $(call gb_Library_use_externals,pdfium,\ libjpeg \ lcms2 \ @@ -660,7 +656,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/cfx_windowsrenderdevice \ UnpackedTarball/pdfium/core/fxcrt/cfx_fileaccess_windows \ UnpackedTarball/pdfium/core/fxcrt/fx_folder_windows \ - UnpackedTarball/pdfium/third_party/base/win/win_util \ + UnpackedTarball/pdfium/core/fxcrt/win/win_util \ + UnpackedTarball/pdfium/core/fxcrt/code_point_view \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_windowsrenderdevice \ )) diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 924bbe23a8b8..9c0b002d8073 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -31,9 +31,8 @@ $(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/debug/alias.cc third_party/base/debug/alias.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 core/fxcrt/debug/alias.cc core/fxcrt/debug/alias.cpp && \ + mv core/fxcrt/win/win_util.cc core/fxcrt/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_variant_access.cc third_party/abseil-cpp/absl/types/bad_variant_access.cpp \ diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 0e8472efe8c8..1a5a35f1cdc7 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -12,41 +12,6 @@ index 31564f45f..5858549ef 100644 std::vector unsupported; CheckForSharedFormInternal(/*depth=*/0, doc->GetRoot(), &unsupported); -diff --git a/third_party/base/containers/span.h b/third_party/base/containers/span.h -index 435fafa85..d8e8bfbc4 100644 ---- a/third_party/base/containers/span.h -+++ b/third_party/base/containers/span.h -@@ -211,7 +211,7 @@ class TRIVIAL_ABI GSL_POINTER span { - #else - template > -- 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 to be - // seamlessly used as a span, but not the other way around. - template > -- constexpr span(const span& other) : span(other.data(), other.size()) {} -+ span(const span& other) : span(other.data(), other.size()) {} - span& operator=(const span& other) noexcept { - if (this != &other) { - data_ = other.data_; -diff --git a/third_party/base/numerics/safe_conversions_impl.h b/third_party/base/numerics/safe_conversions_impl.h -index 44c921a14..0152a89b7 100644 ---- a/third_party/base/numerics/safe_conversions_impl.h -+++ b/third_party/base/numerics/safe_conversions_impl.h -@@ -89,7 +89,7 @@ constexpr typename std::make_unsigned::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. --#define IsConstantEvaluated() (__builtin_is_constant_evaluated()) -+#define IsConstantEvaluated() (false) - - // TODO(jschuh): Debug builds don't reliably propagate constants, so we restrict - // some accelerated runtime paths to release builds until this can be forced diff --git a/third_party/libopenjpeg/openjpeg.c b/third_party/libopenjpeg/openjpeg.c index 9dd4256d7..949d65830 100644 --- a/third_party/libopenjpeg/openjpeg.c diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index 083b05571de5..f3e3330c65f4 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -277,6 +277,7 @@ #include #include #include +#include #include #include #include @@ -286,7 +287,12 @@ #include #include #include +#include +#include #include +#include +#include +#include #include #include #include @@ -309,6 +315,7 @@ #include #include #include +#include #include #include #include @@ -329,14 +336,22 @@ #include #include #include +#include +#include +#include +#include #include #include +#include +#include #include #include +#include #include #include #include #include +#include #include #include #include @@ -468,19 +483,6 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #endif // PCH_LEVEL >= 3 #if PCH_LEVEL >= 4 #endif // PCH_LEVEL >= 4 diff --git a/external/pdfium/windows7.patch.1 b/external/pdfium/windows7.patch.1 index d33f273ff4ca..9c82a8a34d49 100644 --- a/external/pdfium/windows7.patch.1 +++ b/external/pdfium/windows7.patch.1 @@ -1,9 +1,9 @@ -diff --git a/third_party/base/win/win_util.cc b/third_party/base/win/win_util.cc -index ae2dba84d..7a3718848 100644 ---- a/third_party/base/win/win_util.cc -+++ b/third_party/base/win/win_util.cc -@@ -12,28 +12,7 @@ namespace base { - namespace win { +diff --git a/core/fxcrt/win/win_util.cc b/core/fxcrt/win/win_util.cc +index 43e9151d1..76657ac0a 100644 +--- a/core/fxcrt/win/win_util.cc ++++ b/core/fxcrt/win/win_util.cc +@@ -10,28 +10,7 @@ + namespace pdfium { bool IsUser32AndGdi32Available() { - static auto is_user32_and_gdi32_available = []() { @@ -31,4 +31,4 @@ index ae2dba84d..7a3718848 100644 + return true; } - } // namespace win + } // namespace pdfium -- cgit