download.lst | 4 - external/pdfium/build.patch.1 | 72 ++++--------------------- external/pdfium/buildfix-7.patch.1 | 20 ++++++ external/pdfium/fa84e52-revert.patch.1 | 12 ++-- external/pdfium/inc/pch/precompiled_pdfium.hxx | 8 +- 5 files changed, 45 insertions(+), 71 deletions(-)
New commits: commit d1a04abb835889dad327d1275426a3f9dc62884e Author: Miklos Vajna <[email protected]> AuthorDate: Wed Feb 14 08:22:37 2024 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Wed Nov 12 09:20:20 2025 +0100 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 <[email protected]> Reviewed-by: Mike Kaganski <[email protected]> (cherry picked from commit 82a7a38abed80461339555b9043bbb5b18025e32) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193821 Tested-by: allotropia jenkins <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/download.lst b/download.lst index 19c1f6f353b8..5f74128f58ab 100644 --- a/download.lst +++ b/download.lst @@ -455,8 +455,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 675b346cb868..c34920ac6627 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 @@ -90,7 +33,7 @@ index 2e7a72aa1..65fb3deaa 100644 +++ 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 std::nullopt; - return data; + return std::move(data); @@ -145,3 +88,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/buildfix-7.patch.1 b/external/pdfium/buildfix-7.patch.1 index 96e1c594eb95..8285d4a147fa 100644 --- a/external/pdfium/buildfix-7.patch.1 +++ b/external/pdfium/buildfix-7.patch.1 @@ -11,3 +11,23 @@ pdfium/core/fpdfdoc/cpdf_formcontrol.cpp:134: undefined reference to `fxcrt::Str : m_Span(reinterpret_cast<const UnsignedType*>(&ch), 1u) {} StringViewTemplate& operator=(const CharType* src) { +--- pdfium/core/fxge/cfx_face.cpp.orig 2025-11-11 13:42:28.181052508 +0100 ++++ pdfium/core/fxge/cfx_face.cpp 2025-11-11 13:45:12.583343976 +0100 +@@ -227,7 +227,7 @@ + case fxge::FontEncoding::kBig5: + return FT_ENCODING_BIG5; + case fxge::FontEncoding::kGB2312: +- return FT_ENCODING_PRC; ++ return FT_ENCODING_GB2312; + case fxge::FontEncoding::kJohab: + return FT_ENCODING_JOHAB; + case fxge::FontEncoding::kLatin1: +@@ -259,7 +259,7 @@ + return fxge::FontEncoding::kAppleRoman; + case FT_ENCODING_BIG5: + return fxge::FontEncoding::kBig5; +- case FT_ENCODING_PRC: ++ case FT_ENCODING_GB2312: + return fxge::FontEncoding::kGB2312; + case FT_ENCODING_JOHAB: + return fxge::FontEncoding::kJohab; diff --git a/external/pdfium/fa84e52-revert.patch.1 b/external/pdfium/fa84e52-revert.patch.1 index 9041b6006013..43159d36654f 100644 --- a/external/pdfium/fa84e52-revert.patch.1 +++ b/external/pdfium/fa84e52-revert.patch.1 @@ -77,10 +77,10 @@ index 3da0372..e09ca61 100644 using ScopedFXFTFaceRec = std::unique_ptr<FXFT_FaceRec, FXFTFaceRecDeleter>; @@ -76,6 +76,7 @@ - #define FXFT_Get_Face_Ascender(face) (face)->ascender - #define FXFT_Get_Face_Descender(face) (face)->descender - #define FXFT_Get_Glyph_HoriAdvance(face) (face)->glyph->metrics.horiAdvance + #define FXFT_Get_Glyph_HoriBearingX(face) (face)->glyph->metrics.horiBearingX + #define FXFT_Get_Glyph_HoriBearingY(face) (face)->glyph->metrics.horiBearingY + #define FXFT_Get_Glyph_Width(face) (face)->glyph->metrics.width +#define FXFT_Free(face, p) (face)->memory->free((face)->memory, p) - #define FXFT_Get_Glyph_Outline(face) &((face)->glyph->outline) - #define FXFT_Get_Glyph_Bitmap(face) (face)->glyph->bitmap - #define FXFT_Get_Bitmap_Width(bitmap) (bitmap).width + #define FXFT_Get_Glyph_Height(face) (face)->glyph->metrics.height + #define FXFT_Get_Glyph_HoriAdvance(face) (face)->glyph->metrics.horiAdvance + 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>
