download.lst                                   |    4 -
 external/pdfium/build.patch.1                  |   83 +++----------------------
 external/pdfium/inc/pch/precompiled_pdfium.hxx |    8 --
 3 files changed, 18 insertions(+), 77 deletions(-)

New commits:
commit 192db287045bf9c6de4272845b36b0cda625a316
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Feb 14 08:22:37 2024 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Feb 14 15:19:14 2024 +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.
    
    Change-Id: Ida533485d81845a82d890f8c0b70fa61e201f880
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163329
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/download.lst b/download.lst
index 15f67f8a409e..f242427f172b 100644
--- a/download.lst
+++ b/download.lst
@@ -523,8 +523,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