download.lst                                   |    4 
 external/pdfium/Library_pdfium.mk              |   12 -
 external/pdfium/UnpackedTarball_pdfium.mk      |    5 
 external/pdfium/build.patch.1                  |  156 +++++++------------------
 external/pdfium/inc/pch/precompiled_pdfium.hxx |   39 +++---
 external/pdfium/windows7.patch.1               |   14 +-
 6 files changed, 82 insertions(+), 148 deletions(-)

New commits:
commit 6d91efc9c90cd4354af17cb1cb6f40d992d98799
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Fri Jun 14 08:23:58 2024 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Jun 25 08:54:06 2024 +0200

    Update pdfium to 6536
    
    Drop part of build.patch.1, which is no longer needed.
    
    (cherry picked from commit 99500569187101cd47b2a491ca8d8878eb034b2e)
    
    Conflicts:
            external/pdfium/system-abseil.diff
    
    Change-Id: Ie68364d473d344904fd55ced2cd0915534fa816c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169458
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/download.lst b/download.lst
index 738e372adc9d..ca0960775c5a 100644
--- a/download.lst
+++ b/download.lst
@@ -586,8 +586,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-PDFIUM_SHA256SUM := 
fe0291b96d7352bac530d13ef2e5fd63ad9980e0128911f88b957b5992508f1c
-PDFIUM_TARBALL := pdfium-6425.tar.bz2
+PDFIUM_SHA256SUM := 
9c2db89e9ea96f632108170bce7d901dbfc773bb09d03b7cd0ac68ebe26b9092
+PDFIUM_TARBALL := pdfium-6536.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 7afafcb08864..f668443e6d26 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -372,6 +372,7 @@ $(eval $(call 
gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fxcodec/icc/icc_transform \
     UnpackedTarball/pdfium/core/fxcodec/jbig2/jbig2_decoder \
     UnpackedTarball/pdfium/core/fxcodec/jpeg/jpeg_common \
+    UnpackedTarball/pdfium/core/fxcodec/data_and_bytes_consumed \
 ))
 
 # fxcrt
diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1
index 1a5a35f1cdc7..8a70c96f67ee 100644
--- a/external/pdfium/build.patch.1
+++ b/external/pdfium/build.patch.1
@@ -12,19 +12,6 @@ index 31564f45f..5858549ef 100644
  
    std::vector<UnsupportedFeature> unsupported;
    CheckForSharedFormInternal(/*depth=*/0, doc->GetRoot(), &unsupported);
-diff --git a/third_party/libopenjpeg/openjpeg.c 
b/third_party/libopenjpeg/openjpeg.c
-index 9dd4256d7..949d65830 100644
---- a/third_party/libopenjpeg/openjpeg.c
-+++ b/third_party/libopenjpeg/openjpeg.c
-@@ -358,7 +358,7 @@ OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t 
*p_codec,
-     return OPJ_FALSE;
- }
- 
--OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t 
*p_codec,
-+OPJ_BOOL OPJ_CALLCONV opj_decoder_set_strict_mode(opj_codec_t *p_codec,
-         OPJ_BOOL strict)
- {
-     if (p_codec) {
 diff --git a/core/fxge/cfx_face.cpp b/core/fxge/cfx_face.cpp
 index 7d9cd0f44..0d0a311aa 100644
 --- a/core/fxge/cfx_face.cpp
@@ -38,3 +25,42 @@ index 7d9cd0f44..0d0a311aa 100644
  }
  
  FX_RECT CFX_Face::GetCharBBox(uint32_t code, int glyph_index) {
+diff --git a/core/fpdfdoc/cpdf_action.cpp b/core/fpdfdoc/cpdf_action.cpp
+index a5b687d76..076a260d5 100644
+--- a/core/fpdfdoc/cpdf_action.cpp
++++ b/core/fpdfdoc/cpdf_action.cpp
+@@ -21,7 +21,7 @@
+ 
+ namespace {
+ 
+-constexpr auto kActionTypeStrings = fxcrt::ToArray<const char*>({
++std::array<const char*, 18> kActionTypeStrings = {
+     "GoTo",
+     "GoToR",
+     "GoToE",
+@@ -40,7 +40,7 @@ constexpr auto kActionTypeStrings = fxcrt::ToArray<const 
char*>({
+     "Rendition",
+     "Trans",
+     "GoTo3DView",
+-});
++};
+ 
+ }  // namespace
+ 
+diff --git a/core/fpdfdoc/cpdf_dest.cpp b/core/fpdfdoc/cpdf_dest.cpp
+index 8026a75d5..34c20d62f 100644
+--- a/core/fpdfdoc/cpdf_dest.cpp
++++ b/core/fpdfdoc/cpdf_dest.cpp
+@@ -21,9 +21,9 @@ namespace {
+ 
+ // These arrays are indexed by the PDFDEST_VIEW_* constants.
+ 
+-constexpr auto kZoomModes =
+-    fxcrt::ToArray<const char*>({"Unknown", "XYZ", "Fit", "FitH", "FitV",
+-                                 "FitR", "FitB", "FitBH", "FitBV"});
++std::array<const char*, 9>  kZoomModes = {
++    "Unknown", "XYZ", "Fit", "FitH", "FitV",
++                                 "FitR", "FitB", "FitBH", "FitBV"};
+ 
+ constexpr auto kZoomModeMaxParamCount =
+     fxcrt::ToArray<const uint8_t>({0, 3, 0, 1, 1, 4, 0, 1, 1});
diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx 
b/external/pdfium/inc/pch/precompiled_pdfium.hxx
index f3e3330c65f4..5b94cea8372d 100644
--- a/external/pdfium/inc/pch/precompiled_pdfium.hxx
+++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx
@@ -82,6 +82,8 @@
 #include <constants/stream_dict_common.h>
 #include <constants/transparency.h>
 #include <core/fdrm/fx_crypt.h>
+#include <core/fdrm/fx_crypt_aes.h>
+#include <core/fdrm/fx_crypt_sha.h>
 #include <core/fpdfapi/cmaps/CNS1/cmaps_cns1.h>
 #include <core/fpdfapi/cmaps/GB1/cmaps_gb1.h>
 #include <core/fpdfapi/cmaps/Japan1/cmaps_japan1.h>
@@ -244,6 +246,7 @@
 #include <core/fpdftext/unicodenormalizationdata.h>
 #include <core/fxcodec/basic/basicmodule.h>
 #include <core/fxcodec/cfx_codec_memory.h>
+#include <core/fxcodec/data_and_bytes_consumed.h>
 #include <core/fxcodec/fax/faxmodule.h>
 #include <core/fxcodec/flate/flatemodule.h>
 #include <core/fxcodec/fx_codec.h>
commit d1f29087cca44a4b7ba36fce4d759f72b57082b6
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Apr 22 08:17:09 2024 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Jun 25 08:54:00 2024 +0200

    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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/download.lst b/download.lst
index 999a77c7614c..738e372adc9d 100644
--- a/download.lst
+++ b/download.lst
@@ -586,8 +586,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-PDFIUM_SHA256SUM := 
6bc4dac8f1ef646a9bbd50848cb3fb8a108087ed6b3973bbee5846dc371b646d
-PDFIUM_TARBALL := pdfium-6296.tar.bz2
+PDFIUM_SHA256SUM := 
fe0291b96d7352bac530d13ef2e5fd63ad9980e0128911f88b957b5992508f1c
+PDFIUM_TARBALL := pdfium-6425.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 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<UnsupportedFeature> 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 <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) {
-       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<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.
--#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 <core/fxcrt/autonuller.h>
 #include <core/fxcrt/autorestorer.h>
 #include <core/fxcrt/binary_buffer.h>
+#include <core/fxcrt/byteorder.h>
 #include <core/fxcrt/bytestring.h>
 #include <core/fxcrt/cfx_bitstream.h>
 #include <core/fxcrt/cfx_datetime.h>
@@ -286,7 +287,12 @@
 #include <core/fxcrt/cfx_read_only_vector_stream.h>
 #include <core/fxcrt/cfx_seekablestreamproxy.h>
 #include <core/fxcrt/cfx_timer.h>
+#include <core/fxcrt/check.h>
+#include <core/fxcrt/check_op.h>
 #include <core/fxcrt/code_point_view.h>
+#include <core/fxcrt/compiler_specific.h>
+#include <core/fxcrt/containers/adapters.h>
+#include <core/fxcrt/containers/contains.h>
 #include <core/fxcrt/css/cfx_css.h>
 #include <core/fxcrt/css/cfx_csscolorvalue.h>
 #include <core/fxcrt/css/cfx_csscomputedstyle.h>
@@ -309,6 +315,7 @@
 #include <core/fxcrt/css/cfx_cssvaluelist.h>
 #include <core/fxcrt/css/cfx_cssvaluelistparser.h>
 #include <core/fxcrt/data_vector.h>
+#include <core/fxcrt/debug/alias.h>
 #include <core/fxcrt/fileaccess_iface.h>
 #include <core/fxcrt/fixed_size_data_vector.h>
 #include <core/fxcrt/fx_2d_size.h>
@@ -329,14 +336,22 @@
 #include <core/fxcrt/fx_system.h>
 #include <core/fxcrt/fx_unicode.h>
 #include <core/fxcrt/maybe_owned.h>
+#include <core/fxcrt/notreached.h>
+#include <core/fxcrt/numerics/clamped_math.h>
+#include <core/fxcrt/numerics/safe_conversions.h>
+#include <core/fxcrt/numerics/safe_math.h>
 #include <core/fxcrt/observed_ptr.h>
 #include <core/fxcrt/pauseindicator_iface.h>
+#include <core/fxcrt/ptr_util.h>
+#include <core/fxcrt/raw_span.h>
 #include <core/fxcrt/retain_ptr.h>
 #include <core/fxcrt/scoped_set_insertion.h>
+#include <core/fxcrt/span.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/string_template.h>
 #include <core/fxcrt/string_view_template.h>
 #include <core/fxcrt/unowned_ptr.h>
 #include <core/fxcrt/unowned_ptr_exclusion.h>
@@ -468,19 +483,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/check.h>
-#include <third_party/base/check_op.h>
-#include <third_party/base/compiler_specific.h>
-#include <third_party/base/containers/adapters.h>
-#include <third_party/base/containers/contains.h>
-#include <third_party/base/containers/span.h>
-#include <third_party/base/debug/alias.h>
-#include <third_party/base/memory/aligned_memory.h>
-#include <third_party/base/memory/ptr_util.h>
-#include <third_party/base/notreached.h>
-#include <third_party/base/numerics/clamped_math.h>
-#include <third_party/base/numerics/safe_conversions.h>
-#include <third_party/base/numerics/safe_math.h>
 #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
commit 82a7a38abed80461339555b9043bbb5b18025e32
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Feb 14 08:22:37 2024 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Tue Jun 25 08:53:53 2024 +0200

    Update pdfium to 6296
    
    - external/pdfium/build.patch.1: drop most hunks which no longer apply,
      assuming they were only relevant for the RHEL 7 / C++17 baseline.
    
    (cherry picked from commit 192db287045bf9c6de4272845b36b0cda625a316)
    
    Change-Id: Ida533485d81845a82d890f8c0b70fa61e201f880
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169456
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/download.lst b/download.lst
index d33987c1c093..999a77c7614c 100644
--- a/download.lst
+++ b/download.lst
@@ -586,8 +586,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-PDFIUM_SHA256SUM := 
4d3f08fe0e2fda86246832085426616826dcca0912202874428bfbc24d13d95c
-PDFIUM_TARBALL := pdfium-6179.tar.bz2
+PDFIUM_SHA256SUM := 
6bc4dac8f1ef646a9bbd50848cb3fb8a108087ed6b3973bbee5846dc371b646d
+PDFIUM_TARBALL := pdfium-6296.tar.bz2
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1
index 3dbd9427c037..0e8472efe8c8 100644
--- a/external/pdfium/build.patch.1
+++ b/external/pdfium/build.patch.1
@@ -1,61 +1,4 @@
 -*- Mode: diff -*-
-diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp 
b/core/fpdfapi/font/cpdf_cidfont.cpp
-index 7d2d549b8..c4864060a 100644
---- a/core/fpdfapi/font/cpdf_cidfont.cpp
-+++ b/core/fpdfapi/font/cpdf_cidfont.cpp
-@@ -754,7 +754,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 f19ace9d0..562b015f0 100644
---- a/core/fpdfapi/font/cpdf_truetypefont.cpp
-+++ b/core/fpdfapi/font/cpdf_truetypefont.cpp
-@@ -90,7 +90,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);
-           }
-@@ -104,7 +104,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 31564f45f..5858549ef 100644
 --- a/core/fpdfdoc/cpdf_metadata.cpp
@@ -69,19 +12,6 @@ index 31564f45f..5858549ef 100644
  
    std::vector<UnsupportedFeature> unsupported;
    CheckForSharedFormInternal(/*depth=*/0, doc->GetRoot(), &unsupported);
-diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp 
b/core/fxcodec/jpx/cjpx_decoder.cpp
-index 2e7a72aa1..65fb3deaa 100644
---- a/core/fxcodec/jpx/cjpx_decoder.cpp
-+++ b/core/fxcodec/jpx/cjpx_decoder.cpp
-@@ -74,7 +74,7 @@ absl::optional<OpjImageRgbData> alloc_rgb(size_t size) {
-   if (!data.b)
-     return absl::nullopt;
- 
--  return data;
-+  return std::move(data);
- }
- 
- void sycc_to_rgb(int offset,
 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
@@ -130,3 +60,16 @@ index 9dd4256d7..949d65830 100644
          OPJ_BOOL strict)
  {
      if (p_codec) {
+diff --git a/core/fxge/cfx_face.cpp b/core/fxge/cfx_face.cpp
+index 7d9cd0f44..0d0a311aa 100644
+--- a/core/fxge/cfx_face.cpp
++++ b/core/fxge/cfx_face.cpp
+@@ -654,7 +654,7 @@ int CFX_Face::GetCharIndex(uint32_t code) {
+ }
+ 
+ int CFX_Face::GetNameIndex(const char* name) {
+-  return FT_Get_Name_Index(GetRec(), name);
++  return FT_Get_Name_Index(GetRec(), const_cast<char*>(name));
+ }
+ 
+ FX_RECT CFX_Face::GetCharBBox(uint32_t code, int glyph_index) {
diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx 
b/external/pdfium/inc/pch/precompiled_pdfium.hxx
index c58757bc605d..083b05571de5 100644
--- a/external/pdfium/inc/pch/precompiled_pdfium.hxx
+++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx
@@ -46,6 +46,7 @@
 #include <memory>
 #include <new>
 #include <numeric>
+#include <optional>
 #include <ostream>
 #include <queue>
 #include <set>
@@ -309,9 +310,7 @@
 #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/fixed_zeroed_data_vector.h>
+#include <core/fxcrt/fixed_size_data_vector.h>
 #include <core/fxcrt/fx_2d_size.h>
 #include <core/fxcrt/fx_bidi.h>
 #include <core/fxcrt/fx_codepage.h>
@@ -390,6 +389,7 @@
 #include <core/fxge/fontdata/chromefontdata/chromefontdata.h>
 #include <core/fxge/freetype/fx_freetype.h>
 #include <core/fxge/fx_font.h>
+#include <core/fxge/fx_fontencoding.h>
 #include <core/fxge/renderdevicedriver_iface.h>
 #include <core/fxge/scoped_font_transform.h>
 #include <core/fxge/systemfontinfo_iface.h>
@@ -458,8 +458,6 @@
 #include <public/fpdf_text.h>
 #include <public/fpdf_transformpage.h>
 #include <public/fpdfview.h>
-#include <third_party/abseil-cpp/absl/container/inlined_vector.h>
-#include <third_party/abseil-cpp/absl/types/optional.h>
 #include <third_party/abseil-cpp/absl/types/variant.h>
 #include <third_party/agg23/agg_clip_liang_barsky.h>
 #include <third_party/agg23/agg_conv_dash.h>

Reply via email to