download.lst | 4 external/pdfium/Library_pdfium.mk | 54 +++-- external/pdfium/README | 1 external/pdfium/UnpackedTarball_pdfium.mk | 9 external/pdfium/build.patch.1 | 238 +++++++++++-------------- external/pdfium/buildfix-7.patch.1 | 221 +++++++++++++++++++++++ external/pdfium/buildfix.patch.1 | 11 + external/pdfium/fa84e52-revert.patch.1 | 87 +++++++++ external/pdfium/inc/pch/precompiled_pdfium.hxx | 70 ++++--- external/pdfium/ubsan.patch | 33 --- external/pdfium/windows7.patch.1 | 14 - vcl/qa/cppunit/pdfexport/pdfexport.cxx | 2 vcl/source/pdf/PDFiumLibrary.cxx | 14 - 13 files changed, 527 insertions(+), 231 deletions(-)
New commits: commit db93791018ad6c5a67bafaef3cae7acca910e09e Author: Miklos Vajna <[email protected]> AuthorDate: Thu Feb 13 13:45:38 2025 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 20:41:57 2026 +0100 Update pdfium to 7012 Windows has to switch to clang-cl, see <https://groups.google.com/g/pdfium/c/d7KZi_wePHs/m/7eZyhYhVDAAJ> "Does anyone still use MSVC?", similar to what skia does already. This also allows reverting the CppunitTest_vcl_pdfexport and CppunitTest_vcl_pdfexport2 test tweaks from commit 59c5a7d5c7502770896491a59c73de3c627afcc5 (Update pdfium to 6764, 2024-10-14). (cherry picked from commit 6007fbef5c2e4a0b80a4c0031ff36117aa41e63f) Change-Id: I14052c74c551c4412a13a77eac6284455365d888 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182915 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 1118df298a3541e9b86aee2cbfb520cc85f4d583) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193769 (cherry picked from commit 96aed26163a408368a34d26f928698886aa787a8) diff --git a/download.lst b/download.lst index 32f1fc072e08..de4aa4e104d6 100644 --- a/download.lst +++ b/download.lst @@ -502,8 +502,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := 03aabafd8bed319f87aa96871264dc599879e482a0923450070dac987c8a671e -PDFIUM_TARBALL := pdfium-6887.tar.bz2 +PDFIUM_SHA256SUM := e647ca4fcc2c91d9dca717452e1b1be1ab6155ac4977dca716041652c7b10bdd +PDFIUM_TARBALL := pdfium-7012.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 515745d4f1bc..99317b1d29dc 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -13,7 +13,17 @@ $(eval $(call gb_Library_use_unpacked,pdfium,pdfium)) $(eval $(call gb_Library_set_warnings_disabled,pdfium)) -$(eval $(call gb_Library_set_precompiled_header,pdfium,external/pdfium/inc/pch/precompiled_pdfium)) +$(eval $(call gb_Library_use_clang,pdfium)) +#This currently results in all sorts of compile complaints +#$(eval $(call gb_Library_set_precompiled_header,pdfium,external/pdfium/inc/pch/precompiled_pdfium)) +# The clang-cl provided with at least VS 2019 16.11.28 is known-broken with -std:c++20: +ifneq ($(filter -std:c++20,$(CXXFLAGS_CXX11)),) +ifeq ($(LO_CLANG_VERSION),120000) +$(eval $(call gb_Library_add_cxxflags,pdfium, \ + -std:c++17 \ +)) +endif +endif # force C++20 with MSVC ifneq ($(filter -std:c++17,$(CXXFLAGS_CXX11)),) diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 3ec343061ada..20b688943e65 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -132,3 +132,15 @@ index 8026a75d5..34c20d62f 100644 static_assert(kModeKeyForMode.size() == FPDF_ANNOT_APPEARANCEMODE_COUNT, "length of kModeKeyForMode should be equal to " "FPDF_ANNOT_APPEARANCEMODE_COUNT"); +--- a/core/fxcrt/fx_memory_wrappers.h 2025-02-13 13:38:35.761778900 +0100 ++++ b/core/fxcrt/fx_memory_wrappers.h 2025-02-13 13:38:48.136654800 +0100 +@@ -33,9 +33,6 @@ + template <class T, void* Alloc(size_t, size_t), void Free(void*)> + struct FxPartitionAllocAllocator { + public: +- static_assert(std::is_arithmetic<T>::value || std::is_enum<T>::value || +- IsFXDataPartitionException<T>::value, +- "Only numeric types allowed in this partition"); + + using value_type = T; + using pointer = T*; commit 9311c77eb19ddf0a3eb163c3024957c5072ad82c Author: Miklos Vajna <[email protected]> AuthorDate: Wed Dec 11 11:11:05 2024 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 20:37:20 2026 +0100 Update pdfium to 6887 CPWL_Dash-switch-to-universal-init.patch.1 is upstreamed, remove it. (cherry picked from commit 39f35f2ed2277931da36b6e3d2516c2355296fc9) Conflicts: external/pdfium/UnpackedTarball_pdfium.mk Change-Id: I4ff68f15d58b853896626b0458d3817f64fbc32f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182907 Tested-by: Jenkins CollaboraOffice <[email protected]> Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 2e23914bc0f49565bcd2527ff7a6b1f1499e5fb1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193768 (cherry picked from commit 13c58e97976144b700cdbd4804b2a7f34a44ea2c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193902 Reviewed-by: Michael Stahl <[email protected]> Tested-by: allotropia jenkins <[email protected]> (cherry picked from commit 81fc050a888874dc63a1aaf921dd5023f710c99a) diff --git a/download.lst b/download.lst index ae1662e141f5..32f1fc072e08 100644 --- a/download.lst +++ b/download.lst @@ -502,8 +502,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := 59d5df3b38312b069d96a8de9d4f8d7f44a29835c9dc82bd792ea02be86c4e49 -PDFIUM_TARBALL := pdfium-6764.tar.bz2 +PDFIUM_SHA256SUM := 03aabafd8bed319f87aa96871264dc599879e482a0923450070dac987c8a671e +PDFIUM_TARBALL := pdfium-6887.tar.bz2 # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/pdfium/CPWL_Dash-switch-to-universal-init.patch.1 b/external/pdfium/CPWL_Dash-switch-to-universal-init.patch.1 deleted file mode 100644 index 9a82052c5013..000000000000 --- a/external/pdfium/CPWL_Dash-switch-to-universal-init.patch.1 +++ /dev/null @@ -1,150 +0,0 @@ -From 4467963f67102181c41a1579e627a9748b954d74 Mon Sep 17 00:00:00 2001 -From: Miklos Vajna <[email protected]> -Date: Fri, 18 Oct 2024 22:08:25 +0000 -Subject: [PATCH] CPWL_Dash: switch to universal init - -E.g. clang-15 in -std=c++20 mode fails without this with the following -error message: - -pdfium/fpdfsdk/pwl/cpwl_wnd.cpp:43:7: error: no matching constructor for initialization of 'CPWL_Dash' - sDash(3, 0, 0) {} - ^ ~~~~~~~ -pdfium/fpdfsdk/pwl/cpwl_wnd.h:61:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided -struct CPWL_Dash { - ^ -pdfium/fpdfsdk/pwl/cpwl_wnd.h:61:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 3 were provided -pdfium/fpdfsdk/pwl/cpwl_wnd.h:61:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 3 were provided -1 error generated. - -Switching to universal init restores the ability to build with this -compiler, as it was working in the past. - -Change-Id: I48b2079b87cce9bc4e2ec7b813e21ea5bcb786d3 -Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/125170 -Reviewed-by: Tom Sepez <[email protected]> -Commit-Queue: Tom Sepez <[email protected]> -Reviewed-by: Lei Zhang <[email protected]> -Reviewed-by: Tom Sepez <[email protected]> ---- - fpdfsdk/cpdfsdk_appstream.cpp | 20 ++++++++++---------- - fpdfsdk/formfiller/cffl_formfield.cpp | 2 +- - fpdfsdk/pwl/cpwl_wnd.cpp | 2 +- - 3 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/fpdfsdk/cpdfsdk_appstream.cpp b/fpdfsdk/cpdfsdk_appstream.cpp -index 3a9bfabef..b7b06cae8 100644 ---- a/fpdfsdk/cpdfsdk_appstream.cpp -+++ b/fpdfsdk/cpdfsdk_appstream.cpp -@@ -1055,7 +1055,7 @@ ByteString GetDropButtonAppStream(const CFX_FloatRect& rcBBox) { - rcBBox, 2, CFX_Color(CFX_Color::Type::kGray, 0), - CFX_Color(CFX_Color::Type::kGray, 1), - CFX_Color(CFX_Color::Type::kGray, 0.5), BorderStyle::kBeveled, -- CPWL_Dash(3, 0, 0)); -+ CPWL_Dash{3, 0, 0}); - } - - CFX_PointF ptCenter = CFX_PointF((rcBBox.left + rcBBox.right) / 2, -@@ -1162,14 +1162,14 @@ void CPDFSDK_AppStream::SetAsPushButton() { - CFX_Color crBorder = pControl->GetOriginalBorderColor(); - - float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); -- CPWL_Dash dsBorder(3, 0, 0); -+ CPWL_Dash dsBorder{3, 0, 0}; - CFX_Color crLeftTop; - CFX_Color crRightBottom; - - BorderStyle nBorderStyle = widget_->GetBorderStyle(); - switch (nBorderStyle) { - case BorderStyle::kDash: -- dsBorder = CPWL_Dash(3, 3, 0); -+ dsBorder = CPWL_Dash{3, 3, 0}; - break; - case BorderStyle::kBeveled: - fBorderWidth *= 2; -@@ -1313,14 +1313,14 @@ void CPDFSDK_AppStream::SetAsCheckBox() { - CFX_Color crBackground = pControl->GetOriginalBackgroundColor(); - CFX_Color crBorder = pControl->GetOriginalBorderColor(); - float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); -- CPWL_Dash dsBorder(3, 0, 0); -+ CPWL_Dash dsBorder{3, 0, 0}; - CFX_Color crLeftTop; - CFX_Color crRightBottom; - - BorderStyle nBorderStyle = widget_->GetBorderStyle(); - switch (nBorderStyle) { - case BorderStyle::kDash: -- dsBorder = CPWL_Dash(3, 3, 0); -+ dsBorder = CPWL_Dash{3, 3, 0}; - break; - case BorderStyle::kBeveled: - fBorderWidth *= 2; -@@ -1392,14 +1392,14 @@ void CPDFSDK_AppStream::SetAsRadioButton() { - CFX_Color crBackground = pControl->GetOriginalBackgroundColor(); - CFX_Color crBorder = pControl->GetOriginalBorderColor(); - float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); -- CPWL_Dash dsBorder(3, 0, 0); -+ CPWL_Dash dsBorder{3, 0, 0}; - CFX_Color crLeftTop; - CFX_Color crRightBottom; - - BorderStyle nBorderStyle = widget_->GetBorderStyle(); - switch (nBorderStyle) { - case BorderStyle::kDash: -- dsBorder = CPWL_Dash(3, 3, 0); -+ dsBorder = CPWL_Dash{3, 3, 0}; - break; - case BorderStyle::kBeveled: - fBorderWidth *= 2; -@@ -1769,7 +1769,7 @@ void CPDFSDK_AppStream::SetAsTextField(std::optional<WideString> sValue) { - ByteString sColor = - GetStrokeColorAppStream(widget_->GetBorderPWLColor()); - if (sColor.GetLength() > 0) { -- CPWL_Dash dsBorder = CPWL_Dash(3, 3, 0); -+ CPWL_Dash dsBorder = CPWL_Dash{3, 3, 0}; - AutoClosedQCommand q(&sLines); - sLines << widget_->GetBorderWidth() << " " << kSetLineWidthOperator - << " " -@@ -1876,12 +1876,12 @@ ByteString CPDFSDK_AppStream::GetBorderAppStream() const { - CFX_Color crRightBottom; - - float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); -- CPWL_Dash dsBorder(3, 0, 0); -+ CPWL_Dash dsBorder{3, 0, 0}; - - BorderStyle nBorderStyle = widget_->GetBorderStyle(); - switch (nBorderStyle) { - case BorderStyle::kDash: -- dsBorder = CPWL_Dash(3, 3, 0); -+ dsBorder = CPWL_Dash{3, 3, 0}; - break; - case BorderStyle::kBeveled: - fBorderWidth *= 2; -diff --git a/fpdfsdk/formfiller/cffl_formfield.cpp b/fpdfsdk/formfiller/cffl_formfield.cpp -index 49edfdaed..bba78eda6 100644 ---- a/fpdfsdk/formfiller/cffl_formfield.cpp -+++ b/fpdfsdk/formfiller/cffl_formfield.cpp -@@ -336,7 +336,7 @@ CPWL_Wnd::CreateParams CFFL_FormField::GetCreateParam() { - cp.nBorderStyle = m_pWidget->GetBorderStyle(); - switch (cp.nBorderStyle) { - case BorderStyle::kDash: -- cp.sDash = CPWL_Dash(3, 3, 0); -+ cp.sDash = CPWL_Dash{3, 3, 0}; - break; - case BorderStyle::kBeveled: - case BorderStyle::kInset: -diff --git a/fpdfsdk/pwl/cpwl_wnd.cpp b/fpdfsdk/pwl/cpwl_wnd.cpp -index 502568709..88b0cf03e 100644 ---- a/fpdfsdk/pwl/cpwl_wnd.cpp -+++ b/fpdfsdk/pwl/cpwl_wnd.cpp -@@ -40,7 +40,7 @@ CPWL_Wnd::CreateParams::CreateParams(CFX_Timer::HandlerIface* timer_handler, - pFillerNotify(filler_notify), - pProvider(provider), - fFontSize(kDefaultFontSize), -- sDash(3, 0, 0) {} -+ sDash{3, 0, 0} {} - - CPWL_Wnd::CreateParams::CreateParams(const CreateParams& other) = default; - --- -2.43.0 - diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index e2813f425935..515745d4f1bc 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -381,10 +381,13 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxcodec/flate/flatemodule \ 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 \ )) +$(eval $(call gb_Library_add_generated_cobjects,pdfium,\ + UnpackedTarball/pdfium/core/fxcodec/jpeg/jpeg_common \ +)) + # fxcrt $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxcrt/cfx_memorystream \ diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 85791bc2c57c..9214b9616f5b 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -15,8 +15,6 @@ pdfium_patches += fa84e52-revert.patch.1 pdfium_patches += build.patch.1 # Avoids Windows 8 build dependency. pdfium_patches += windows7.patch.1 -# https://pdfium-review.googlesource.com/c/pdfium/+/125170 -pdfium_patches += CPWL_Dash-switch-to-universal-init.patch.1 pdfium_patches += c++20-comparison.patch pdfium_patches += constexpr-template.patch diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index f40a830ae6dd..3ec343061ada 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -35,7 +35,9 @@ index 435fafa85..d8e8bfbc4 100644 typename = internal::EnableIfSpanCompatibleContainer<Container, T>> - constexpr span(Container& container) + span(Container& container) - : span(container.data(), container.size()) {} + // SAFETY: `size()` is the number of elements that can be safely accessed + // at `data()`. + : UNSAFE_BUFFERS(span(container.data(), container.size())) {} #endif @@ -225,7 +225,7 @@ class TRIVIAL_ABI GSL_POINTER span { @@ -44,9 +46,9 @@ index 435fafa85..d8e8bfbc4 100644 typename = internal::EnableIfLegalSpanConversion<U, T>> - constexpr span(const span<U, M, R>& other) + span(const span<U, M, R>& other) - : span(other.data(), other.size()) {} - - span& operator=(const span& other) noexcept { + // SAFETY: `size()` is the number of elements that can be safely accessed + // at `data()`. + : UNSAFE_BUFFERS(span(other.data(), other.size())) {} diff --git a/core/fxcrt/numerics/safe_conversions_impl.h b/core/fxcrt/numerics/safe_conversions_impl.h index 44c921a14..0152a89b7 100644 --- a/core/fxcrt/numerics/safe_conversions_impl.h diff --git a/external/pdfium/buildfix-7.patch.1 b/external/pdfium/buildfix-7.patch.1 index a5540617fd9e..adacf0f30df1 100644 --- a/external/pdfium/buildfix-7.patch.1 +++ b/external/pdfium/buildfix-7.patch.1 @@ -180,14 +180,14 @@ pdfium/core/fpdfdoc/cpdf_formcontrol.cpp:134: undefined reference to `fxcrt::Str +++ pdfium/core/fpdfdoc/cpdf_pagelabel.cpp 2025-11-12 11:26:09.615649063 +0100 @@ -20,9 +20,9 @@ WideString MakeRoman(int num) { - constexpr auto kArabic = fxcrt::ToArray<const int>( + static constexpr auto kArabic = fxcrt::ToArray<const int>( {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}); - const auto kRoman = fxcrt::ToArray<const WideStringView>( + std::array<const WideStringView, 13> kRoman = {L"m", L"cm", L"d", L"cd", L"c", L"xc", L"l", L"xl", L"x", L"ix", L"v", - L"iv", L"i"}); + L"iv", L"i"}; - constexpr int kMaxNum = 1000000; + static constexpr int kMaxNum = 1000000; num %= kMaxNum; --- pdfium/core/fpdfdoc/cpvt_variabletext.cpp.orig 2025-11-12 11:28:21.534664730 +0100 @@ -204,3 +204,18 @@ pdfium/core/fpdfdoc/cpdf_formcontrol.cpp:134: undefined reference to `fxcrt::Str } // namespace +--- pdfium/core/fpdfdoc/cpdf_generateap.cpp.orig 2025-11-12 12:02:45.057324704 +0100 ++++ pdfium/core/fpdfdoc/cpdf_generateap.cpp 2025-11-12 12:03:45.923858903 +0100 +@@ -824,8 +824,10 @@ + body_stream << "q " << button; + WriteRect(body_stream, button_rect) << " re f "; + body_stream << "Q "; +- static const BorderStyleInfo kButtonBorderStyleInfo{ +- .width = 2, .style = BorderStyle::kBeveled, .dash_pattern{3, 0, 0}}; ++ BorderStyleInfo kButtonBorderStyleInfo; ++ kButtonBorderStyleInfo.width = 2; ++ kButtonBorderStyleInfo.style = BorderStyle::kBeveled; ++ kButtonBorderStyleInfo.dash_pattern = {3, 0, 0}; + ByteString button_border = + GenerateBorderAP(button_rect, kButtonBorderStyleInfo, + CFX_Color(CFX_Color::Type::kGray, 0)); diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index b03d216545af..be581129aa12 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -51,7 +51,6 @@ #include <ostream> #include <queue> #include <set> -#include <setjmp.h> #include <sstream> #include <stack> #include <stddef.h> commit 61ab20ca0813cf0020a7ec5eae492a571bf36548 Author: Miklos Vajna <[email protected]> AuthorDate: Tue Dec 10 15:23:17 2024 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 20:35:42 2026 +0100 pdfium: mark part of build.patch.1 as upstreamed So it'll be easier to drop it the next time pdfium is updated. (cherry picked from commit 904b956622b1581517c938ed8dacac70f7c6242c) Conflicts: external/pdfium/UnpackedTarball_pdfium.mk Change-Id: Iebeb892f62ee8002460142adf28f75666c92c2e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182866 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 60dec074779488c7efe7461ea195b4468f6574d4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193767 (cherry picked from commit 3e97144aea7b6fd81ec56820eaac67edf7af5ab1) diff --git a/external/pdfium/CPWL_Dash-switch-to-universal-init.patch.1 b/external/pdfium/CPWL_Dash-switch-to-universal-init.patch.1 new file mode 100644 index 000000000000..9a82052c5013 --- /dev/null +++ b/external/pdfium/CPWL_Dash-switch-to-universal-init.patch.1 @@ -0,0 +1,150 @@ +From 4467963f67102181c41a1579e627a9748b954d74 Mon Sep 17 00:00:00 2001 +From: Miklos Vajna <[email protected]> +Date: Fri, 18 Oct 2024 22:08:25 +0000 +Subject: [PATCH] CPWL_Dash: switch to universal init + +E.g. clang-15 in -std=c++20 mode fails without this with the following +error message: + +pdfium/fpdfsdk/pwl/cpwl_wnd.cpp:43:7: error: no matching constructor for initialization of 'CPWL_Dash' + sDash(3, 0, 0) {} + ^ ~~~~~~~ +pdfium/fpdfsdk/pwl/cpwl_wnd.h:61:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 3 were provided +struct CPWL_Dash { + ^ +pdfium/fpdfsdk/pwl/cpwl_wnd.h:61:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 3 were provided +pdfium/fpdfsdk/pwl/cpwl_wnd.h:61:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 3 were provided +1 error generated. + +Switching to universal init restores the ability to build with this +compiler, as it was working in the past. + +Change-Id: I48b2079b87cce9bc4e2ec7b813e21ea5bcb786d3 +Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/125170 +Reviewed-by: Tom Sepez <[email protected]> +Commit-Queue: Tom Sepez <[email protected]> +Reviewed-by: Lei Zhang <[email protected]> +Reviewed-by: Tom Sepez <[email protected]> +--- + fpdfsdk/cpdfsdk_appstream.cpp | 20 ++++++++++---------- + fpdfsdk/formfiller/cffl_formfield.cpp | 2 +- + fpdfsdk/pwl/cpwl_wnd.cpp | 2 +- + 3 files changed, 12 insertions(+), 12 deletions(-) + +diff --git a/fpdfsdk/cpdfsdk_appstream.cpp b/fpdfsdk/cpdfsdk_appstream.cpp +index 3a9bfabef..b7b06cae8 100644 +--- a/fpdfsdk/cpdfsdk_appstream.cpp ++++ b/fpdfsdk/cpdfsdk_appstream.cpp +@@ -1055,7 +1055,7 @@ ByteString GetDropButtonAppStream(const CFX_FloatRect& rcBBox) { + rcBBox, 2, CFX_Color(CFX_Color::Type::kGray, 0), + CFX_Color(CFX_Color::Type::kGray, 1), + CFX_Color(CFX_Color::Type::kGray, 0.5), BorderStyle::kBeveled, +- CPWL_Dash(3, 0, 0)); ++ CPWL_Dash{3, 0, 0}); + } + + CFX_PointF ptCenter = CFX_PointF((rcBBox.left + rcBBox.right) / 2, +@@ -1162,14 +1162,14 @@ void CPDFSDK_AppStream::SetAsPushButton() { + CFX_Color crBorder = pControl->GetOriginalBorderColor(); + + float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); +- CPWL_Dash dsBorder(3, 0, 0); ++ CPWL_Dash dsBorder{3, 0, 0}; + CFX_Color crLeftTop; + CFX_Color crRightBottom; + + BorderStyle nBorderStyle = widget_->GetBorderStyle(); + switch (nBorderStyle) { + case BorderStyle::kDash: +- dsBorder = CPWL_Dash(3, 3, 0); ++ dsBorder = CPWL_Dash{3, 3, 0}; + break; + case BorderStyle::kBeveled: + fBorderWidth *= 2; +@@ -1313,14 +1313,14 @@ void CPDFSDK_AppStream::SetAsCheckBox() { + CFX_Color crBackground = pControl->GetOriginalBackgroundColor(); + CFX_Color crBorder = pControl->GetOriginalBorderColor(); + float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); +- CPWL_Dash dsBorder(3, 0, 0); ++ CPWL_Dash dsBorder{3, 0, 0}; + CFX_Color crLeftTop; + CFX_Color crRightBottom; + + BorderStyle nBorderStyle = widget_->GetBorderStyle(); + switch (nBorderStyle) { + case BorderStyle::kDash: +- dsBorder = CPWL_Dash(3, 3, 0); ++ dsBorder = CPWL_Dash{3, 3, 0}; + break; + case BorderStyle::kBeveled: + fBorderWidth *= 2; +@@ -1392,14 +1392,14 @@ void CPDFSDK_AppStream::SetAsRadioButton() { + CFX_Color crBackground = pControl->GetOriginalBackgroundColor(); + CFX_Color crBorder = pControl->GetOriginalBorderColor(); + float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); +- CPWL_Dash dsBorder(3, 0, 0); ++ CPWL_Dash dsBorder{3, 0, 0}; + CFX_Color crLeftTop; + CFX_Color crRightBottom; + + BorderStyle nBorderStyle = widget_->GetBorderStyle(); + switch (nBorderStyle) { + case BorderStyle::kDash: +- dsBorder = CPWL_Dash(3, 3, 0); ++ dsBorder = CPWL_Dash{3, 3, 0}; + break; + case BorderStyle::kBeveled: + fBorderWidth *= 2; +@@ -1769,7 +1769,7 @@ void CPDFSDK_AppStream::SetAsTextField(std::optional<WideString> sValue) { + ByteString sColor = + GetStrokeColorAppStream(widget_->GetBorderPWLColor()); + if (sColor.GetLength() > 0) { +- CPWL_Dash dsBorder = CPWL_Dash(3, 3, 0); ++ CPWL_Dash dsBorder = CPWL_Dash{3, 3, 0}; + AutoClosedQCommand q(&sLines); + sLines << widget_->GetBorderWidth() << " " << kSetLineWidthOperator + << " " +@@ -1876,12 +1876,12 @@ ByteString CPDFSDK_AppStream::GetBorderAppStream() const { + CFX_Color crRightBottom; + + float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); +- CPWL_Dash dsBorder(3, 0, 0); ++ CPWL_Dash dsBorder{3, 0, 0}; + + BorderStyle nBorderStyle = widget_->GetBorderStyle(); + switch (nBorderStyle) { + case BorderStyle::kDash: +- dsBorder = CPWL_Dash(3, 3, 0); ++ dsBorder = CPWL_Dash{3, 3, 0}; + break; + case BorderStyle::kBeveled: + fBorderWidth *= 2; +diff --git a/fpdfsdk/formfiller/cffl_formfield.cpp b/fpdfsdk/formfiller/cffl_formfield.cpp +index 49edfdaed..bba78eda6 100644 +--- a/fpdfsdk/formfiller/cffl_formfield.cpp ++++ b/fpdfsdk/formfiller/cffl_formfield.cpp +@@ -336,7 +336,7 @@ CPWL_Wnd::CreateParams CFFL_FormField::GetCreateParam() { + cp.nBorderStyle = m_pWidget->GetBorderStyle(); + switch (cp.nBorderStyle) { + case BorderStyle::kDash: +- cp.sDash = CPWL_Dash(3, 3, 0); ++ cp.sDash = CPWL_Dash{3, 3, 0}; + break; + case BorderStyle::kBeveled: + case BorderStyle::kInset: +diff --git a/fpdfsdk/pwl/cpwl_wnd.cpp b/fpdfsdk/pwl/cpwl_wnd.cpp +index 502568709..88b0cf03e 100644 +--- a/fpdfsdk/pwl/cpwl_wnd.cpp ++++ b/fpdfsdk/pwl/cpwl_wnd.cpp +@@ -40,7 +40,7 @@ CPWL_Wnd::CreateParams::CreateParams(CFX_Timer::HandlerIface* timer_handler, + pFillerNotify(filler_notify), + pProvider(provider), + fFontSize(kDefaultFontSize), +- sDash(3, 0, 0) {} ++ sDash{3, 0, 0} {} + + CPWL_Wnd::CreateParams::CreateParams(const CreateParams& other) = default; + +-- +2.43.0 + diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 9214b9616f5b..85791bc2c57c 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -15,6 +15,8 @@ pdfium_patches += fa84e52-revert.patch.1 pdfium_patches += build.patch.1 # Avoids Windows 8 build dependency. pdfium_patches += windows7.patch.1 +# https://pdfium-review.googlesource.com/c/pdfium/+/125170 +pdfium_patches += CPWL_Dash-switch-to-universal-init.patch.1 pdfium_patches += c++20-comparison.patch pdfium_patches += constexpr-template.patch diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 9a6564d15ec4..f40a830ae6dd 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -130,117 +130,3 @@ index 8026a75d5..34c20d62f 100644 static_assert(kModeKeyForMode.size() == FPDF_ANNOT_APPEARANCEMODE_COUNT, "length of kModeKeyForMode should be equal to " "FPDF_ANNOT_APPEARANCEMODE_COUNT"); -diff --git a/fpdfsdk/cpdfsdk_appstream.cpp b/fpdfsdk/cpdfsdk_appstream.cpp -index 3a9bfabef..b7b06cae8 100644 ---- a/fpdfsdk/cpdfsdk_appstream.cpp -+++ b/fpdfsdk/cpdfsdk_appstream.cpp -@@ -1055,7 +1055,7 @@ ByteString GetDropButtonAppStream(const CFX_FloatRect& rcBBox) { - rcBBox, 2, CFX_Color(CFX_Color::Type::kGray, 0), - CFX_Color(CFX_Color::Type::kGray, 1), - CFX_Color(CFX_Color::Type::kGray, 0.5), BorderStyle::kBeveled, -- CPWL_Dash(3, 0, 0)); -+ CPWL_Dash{3, 0, 0}); - } - - CFX_PointF ptCenter = CFX_PointF((rcBBox.left + rcBBox.right) / 2, -@@ -1162,14 +1162,14 @@ void CPDFSDK_AppStream::SetAsPushButton() { - CFX_Color crBorder = pControl->GetOriginalBorderColor(); - - float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); -- CPWL_Dash dsBorder(3, 0, 0); -+ CPWL_Dash dsBorder{3, 0, 0}; - CFX_Color crLeftTop; - CFX_Color crRightBottom; - - BorderStyle nBorderStyle = widget_->GetBorderStyle(); - switch (nBorderStyle) { - case BorderStyle::kDash: -- dsBorder = CPWL_Dash(3, 3, 0); -+ dsBorder = CPWL_Dash{3, 3, 0}; - break; - case BorderStyle::kBeveled: - fBorderWidth *= 2; -@@ -1313,14 +1313,14 @@ void CPDFSDK_AppStream::SetAsCheckBox() { - CFX_Color crBackground = pControl->GetOriginalBackgroundColor(); - CFX_Color crBorder = pControl->GetOriginalBorderColor(); - float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); -- CPWL_Dash dsBorder(3, 0, 0); -+ CPWL_Dash dsBorder{3, 0, 0}; - CFX_Color crLeftTop; - CFX_Color crRightBottom; - - BorderStyle nBorderStyle = widget_->GetBorderStyle(); - switch (nBorderStyle) { - case BorderStyle::kDash: -- dsBorder = CPWL_Dash(3, 3, 0); -+ dsBorder = CPWL_Dash{3, 3, 0}; - break; - case BorderStyle::kBeveled: - fBorderWidth *= 2; -@@ -1392,14 +1392,14 @@ void CPDFSDK_AppStream::SetAsRadioButton() { - CFX_Color crBackground = pControl->GetOriginalBackgroundColor(); - CFX_Color crBorder = pControl->GetOriginalBorderColor(); - float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); -- CPWL_Dash dsBorder(3, 0, 0); -+ CPWL_Dash dsBorder{3, 0, 0}; - CFX_Color crLeftTop; - CFX_Color crRightBottom; - - BorderStyle nBorderStyle = widget_->GetBorderStyle(); - switch (nBorderStyle) { - case BorderStyle::kDash: -- dsBorder = CPWL_Dash(3, 3, 0); -+ dsBorder = CPWL_Dash{3, 3, 0}; - break; - case BorderStyle::kBeveled: - fBorderWidth *= 2; -@@ -1769,7 +1769,7 @@ void CPDFSDK_AppStream::SetAsTextField(std::optional<WideString> sValue) { - ByteString sColor = - GetStrokeColorAppStream(widget_->GetBorderPWLColor()); - if (sColor.GetLength() > 0) { -- CPWL_Dash dsBorder = CPWL_Dash(3, 3, 0); -+ CPWL_Dash dsBorder = CPWL_Dash{3, 3, 0}; - AutoClosedQCommand q(&sLines); - sLines << widget_->GetBorderWidth() << " " << kSetLineWidthOperator - << " " -@@ -1876,12 +1876,12 @@ ByteString CPDFSDK_AppStream::GetBorderAppStream() const { - CFX_Color crRightBottom; - - float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); -- CPWL_Dash dsBorder(3, 0, 0); -+ CPWL_Dash dsBorder{3, 0, 0}; - - BorderStyle nBorderStyle = widget_->GetBorderStyle(); - switch (nBorderStyle) { - case BorderStyle::kDash: -- dsBorder = CPWL_Dash(3, 3, 0); -+ dsBorder = CPWL_Dash{3, 3, 0}; - break; - case BorderStyle::kBeveled: - fBorderWidth *= 2; -diff --git a/fpdfsdk/formfiller/cffl_formfield.cpp b/fpdfsdk/formfiller/cffl_formfield.cpp -index 49edfdaed..bba78eda6 100644 ---- a/fpdfsdk/formfiller/cffl_formfield.cpp -+++ b/fpdfsdk/formfiller/cffl_formfield.cpp -@@ -336,7 +336,7 @@ CPWL_Wnd::CreateParams CFFL_FormField::GetCreateParam() { - cp.nBorderStyle = m_pWidget->GetBorderStyle(); - switch (cp.nBorderStyle) { - case BorderStyle::kDash: -- cp.sDash = CPWL_Dash(3, 3, 0); -+ cp.sDash = CPWL_Dash{3, 3, 0}; - break; - case BorderStyle::kBeveled: - case BorderStyle::kInset: -diff --git a/fpdfsdk/pwl/cpwl_wnd.cpp b/fpdfsdk/pwl/cpwl_wnd.cpp -index 502568709..88b0cf03e 100644 ---- a/fpdfsdk/pwl/cpwl_wnd.cpp -+++ b/fpdfsdk/pwl/cpwl_wnd.cpp -@@ -40,7 +40,7 @@ CPWL_Wnd::CreateParams::CreateParams(CFX_Timer::HandlerIface* timer_handler, - pFillerNotify(filler_notify), - pProvider(provider), - fFontSize(kDefaultFontSize), -- sDash(3, 0, 0) {} -+ sDash{3, 0, 0} {} - - CPWL_Wnd::CreateParams::CreateParams(const CreateParams& other) = default; - commit 217c151e9c4046540ab52973d2e51362fdd961d4 Author: Miklos Vajna <[email protected]> AuthorDate: Fri Oct 11 16:51:50 2024 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 20:32:27 2026 +0100 Update pdfium to 6764 New fast_float header-only inner dependency. CppunitTest_vcl_pdfexport's testTdf154549 and CppunitTest_vcl_pdfexport2's testTdf71956 started to fail after this. Assuming that the code covered by these tests still works (since this commit doesn't change vcl/ or sw/ code), just update those tests to match the new PDFium API call results for now. Change-Id: I07b2f97fbbc9bd609e2f94593474393adcb5a839 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174814 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 59c5a7d5c7502770896491a59c73de3c627afcc5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193766 Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 86753d8d443ada27093665c43149fc4bebf05c18) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193884 Tested-by: allotropia jenkins <[email protected]> Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit 9f8cff81a59ae3f2f7a5bfb3fbf6995d3d6d65c2) diff --git a/download.lst b/download.lst index f68d692e2d67..ae1662e141f5 100644 --- a/download.lst +++ b/download.lst @@ -502,8 +502,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := ea2d59946fbd0c72a8b07d19bd58bb99cf66add27f5388b02d99bd7f37c13388 -PDFIUM_TARBALL := pdfium-6656.tar.bz2 +PDFIUM_SHA256SUM := 59d5df3b38312b069d96a8de9d4f8d7f44a29835c9dc82bd792ea02be86c4e49 +PDFIUM_TARBALL := pdfium-6764.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 a74a084ec6d7..e2813f425935 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -475,7 +475,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/agg/cfx_agg_bitmapcomposer \ UnpackedTarball/pdfium/core/fxge/agg/cfx_agg_devicedriver \ UnpackedTarball/pdfium/core/fxge/agg/cfx_agg_imagerenderer \ - UnpackedTarball/pdfium/core/fxge/cfx_cliprgn \ + UnpackedTarball/pdfium/core/fxge/agg/cfx_agg_cliprgn \ UnpackedTarball/pdfium/core/fxge/cfx_color \ UnpackedTarball/pdfium/core/fxge/cfx_glyphcache \ UnpackedTarball/pdfium/core/fxge/cfx_folderfontinfo \ diff --git a/external/pdfium/README b/external/pdfium/README index 2be9e8f11b26..92d76c216ca3 100644 --- a/external/pdfium/README +++ b/external/pdfium/README @@ -14,4 +14,5 @@ git archive --prefix=pdfium/ --format=tar origin/chromium/${version} > pdfium-${ (cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/freetype/src/include/ pdfium/third_party/freetype/src/src/) (cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/abseil-cpp/absl/) (cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/build/build_config.h pdfium/build/buildflag.h) +(cd ..; tar --append --file pdfium/pdfium-${version}.tar pdfium/third_party/fast_float/src/) bzip2 pdfium-${version}.tar diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index f40a830ae6dd..9a6564d15ec4 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -130,3 +130,117 @@ index 8026a75d5..34c20d62f 100644 static_assert(kModeKeyForMode.size() == FPDF_ANNOT_APPEARANCEMODE_COUNT, "length of kModeKeyForMode should be equal to " "FPDF_ANNOT_APPEARANCEMODE_COUNT"); +diff --git a/fpdfsdk/cpdfsdk_appstream.cpp b/fpdfsdk/cpdfsdk_appstream.cpp +index 3a9bfabef..b7b06cae8 100644 +--- a/fpdfsdk/cpdfsdk_appstream.cpp ++++ b/fpdfsdk/cpdfsdk_appstream.cpp +@@ -1055,7 +1055,7 @@ ByteString GetDropButtonAppStream(const CFX_FloatRect& rcBBox) { + rcBBox, 2, CFX_Color(CFX_Color::Type::kGray, 0), + CFX_Color(CFX_Color::Type::kGray, 1), + CFX_Color(CFX_Color::Type::kGray, 0.5), BorderStyle::kBeveled, +- CPWL_Dash(3, 0, 0)); ++ CPWL_Dash{3, 0, 0}); + } + + CFX_PointF ptCenter = CFX_PointF((rcBBox.left + rcBBox.right) / 2, +@@ -1162,14 +1162,14 @@ void CPDFSDK_AppStream::SetAsPushButton() { + CFX_Color crBorder = pControl->GetOriginalBorderColor(); + + float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); +- CPWL_Dash dsBorder(3, 0, 0); ++ CPWL_Dash dsBorder{3, 0, 0}; + CFX_Color crLeftTop; + CFX_Color crRightBottom; + + BorderStyle nBorderStyle = widget_->GetBorderStyle(); + switch (nBorderStyle) { + case BorderStyle::kDash: +- dsBorder = CPWL_Dash(3, 3, 0); ++ dsBorder = CPWL_Dash{3, 3, 0}; + break; + case BorderStyle::kBeveled: + fBorderWidth *= 2; +@@ -1313,14 +1313,14 @@ void CPDFSDK_AppStream::SetAsCheckBox() { + CFX_Color crBackground = pControl->GetOriginalBackgroundColor(); + CFX_Color crBorder = pControl->GetOriginalBorderColor(); + float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); +- CPWL_Dash dsBorder(3, 0, 0); ++ CPWL_Dash dsBorder{3, 0, 0}; + CFX_Color crLeftTop; + CFX_Color crRightBottom; + + BorderStyle nBorderStyle = widget_->GetBorderStyle(); + switch (nBorderStyle) { + case BorderStyle::kDash: +- dsBorder = CPWL_Dash(3, 3, 0); ++ dsBorder = CPWL_Dash{3, 3, 0}; + break; + case BorderStyle::kBeveled: + fBorderWidth *= 2; +@@ -1392,14 +1392,14 @@ void CPDFSDK_AppStream::SetAsRadioButton() { + CFX_Color crBackground = pControl->GetOriginalBackgroundColor(); + CFX_Color crBorder = pControl->GetOriginalBorderColor(); + float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); +- CPWL_Dash dsBorder(3, 0, 0); ++ CPWL_Dash dsBorder{3, 0, 0}; + CFX_Color crLeftTop; + CFX_Color crRightBottom; + + BorderStyle nBorderStyle = widget_->GetBorderStyle(); + switch (nBorderStyle) { + case BorderStyle::kDash: +- dsBorder = CPWL_Dash(3, 3, 0); ++ dsBorder = CPWL_Dash{3, 3, 0}; + break; + case BorderStyle::kBeveled: + fBorderWidth *= 2; +@@ -1769,7 +1769,7 @@ void CPDFSDK_AppStream::SetAsTextField(std::optional<WideString> sValue) { + ByteString sColor = + GetStrokeColorAppStream(widget_->GetBorderPWLColor()); + if (sColor.GetLength() > 0) { +- CPWL_Dash dsBorder = CPWL_Dash(3, 3, 0); ++ CPWL_Dash dsBorder = CPWL_Dash{3, 3, 0}; + AutoClosedQCommand q(&sLines); + sLines << widget_->GetBorderWidth() << " " << kSetLineWidthOperator + << " " +@@ -1876,12 +1876,12 @@ ByteString CPDFSDK_AppStream::GetBorderAppStream() const { + CFX_Color crRightBottom; + + float fBorderWidth = static_cast<float>(widget_->GetBorderWidth()); +- CPWL_Dash dsBorder(3, 0, 0); ++ CPWL_Dash dsBorder{3, 0, 0}; + + BorderStyle nBorderStyle = widget_->GetBorderStyle(); + switch (nBorderStyle) { + case BorderStyle::kDash: +- dsBorder = CPWL_Dash(3, 3, 0); ++ dsBorder = CPWL_Dash{3, 3, 0}; + break; + case BorderStyle::kBeveled: + fBorderWidth *= 2; +diff --git a/fpdfsdk/formfiller/cffl_formfield.cpp b/fpdfsdk/formfiller/cffl_formfield.cpp +index 49edfdaed..bba78eda6 100644 +--- a/fpdfsdk/formfiller/cffl_formfield.cpp ++++ b/fpdfsdk/formfiller/cffl_formfield.cpp +@@ -336,7 +336,7 @@ CPWL_Wnd::CreateParams CFFL_FormField::GetCreateParam() { + cp.nBorderStyle = m_pWidget->GetBorderStyle(); + switch (cp.nBorderStyle) { + case BorderStyle::kDash: +- cp.sDash = CPWL_Dash(3, 3, 0); ++ cp.sDash = CPWL_Dash{3, 3, 0}; + break; + case BorderStyle::kBeveled: + case BorderStyle::kInset: +diff --git a/fpdfsdk/pwl/cpwl_wnd.cpp b/fpdfsdk/pwl/cpwl_wnd.cpp +index 502568709..88b0cf03e 100644 +--- a/fpdfsdk/pwl/cpwl_wnd.cpp ++++ b/fpdfsdk/pwl/cpwl_wnd.cpp +@@ -40,7 +40,7 @@ CPWL_Wnd::CreateParams::CreateParams(CFX_Timer::HandlerIface* timer_handler, + pFillerNotify(filler_notify), + pProvider(provider), + fFontSize(kDefaultFontSize), +- sDash(3, 0, 0) {} ++ sDash{3, 0, 0} {} + + CPWL_Wnd::CreateParams::CreateParams(const CreateParams& other) = default; + diff --git a/external/pdfium/fa84e52-revert.patch.1 b/external/pdfium/fa84e52-revert.patch.1 index 43159d36654f..2ffd1217ad3f 100644 --- a/external/pdfium/fa84e52-revert.patch.1 +++ b/external/pdfium/fa84e52-revert.patch.1 @@ -58,8 +58,9 @@ index a2a44df..8b5f4fc 100644 +FXFTMMVarDeleter::FXFTMMVarDeleter(FXFT_FaceRec* face) : m_pFace(face) {} ScopedFXFTMMVar::ScopedFXFTMMVar(FXFT_FaceRec* face) -- : variation_desc_(GetVariationDescriptor(face)) {} -+ : variation_desc_(GetVariationDescriptor(face), FXFTMMVarDeleter(face)) {} +- : variation_desc_(GetVariationDescriptor(face)), ++ : variation_desc_(GetVariationDescriptor(face), FXFTMMVarDeleter(face)), + axis_(GetVariationAxis(variation_desc_.get())) {} ScopedFXFTMMVar::~ScopedFXFTMMVar() = default; diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index ef0860bee248..b03d216545af 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -358,7 +358,6 @@ #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> #include <core/fxcrt/utf16.h> @@ -373,10 +372,10 @@ #include <core/fxcrt/xml/cfx_xmltext.h> #include <core/fxcrt/zip.h> #include <core/fxge/agg/cfx_agg_bitmapcomposer.h> +#include <core/fxge/agg/cfx_agg_cliprgn.h> #include <core/fxge/agg/cfx_agg_devicedriver.h> #include <core/fxge/agg/cfx_agg_imagerenderer.h> #include <core/fxge/calculate_pitch.h> -#include <core/fxge/cfx_cliprgn.h> #include <core/fxge/cfx_color.h> #include <core/fxge/cfx_defaultrenderdevice.h> #include <core/fxge/cfx_drawutils.h> @@ -490,6 +489,7 @@ #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/fast_float/src/include/fast_float/fast_float.h> #endif // PCH_LEVEL >= 3 #if PCH_LEVEL >= 4 #endif // PCH_LEVEL >= 4 commit a17da662baf7c538f9f48b8a79060913128d95b6 Author: Miklos Vajna <[email protected]> AuthorDate: Wed Oct 9 15:11:18 2024 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 20:32:26 2026 +0100 CppunitTest_vcl_pdfexport2: relax testPdfImageHyperlink a bit This will start to fail on pdfium-6764 with: pdfexport2.cxx:4186:Assertion Test name: (anonymous namespace)::testPdfImageHyperlink::TestBody equality assertion failed - Expected: 0.0012626264 - Actual : 0.0012626261 But the original problem was that the repriprocal was just 0.00126. If we require one less digit, 1/0.001262626 is 792.0001647360343 and 1/0.0012626264 is 791.9999138304095, so the original problem that the rounded result is 794 points (and not 792) is still tested. Change-Id: Ia4489625fd25eca971261b14005b10bbf34343eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174724 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins (cherry picked from commit fe9dab32a3083059f46aba1ba5eab5840c2d07b5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193765 Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit dbf67b08b0d4bf09375e756447fad775f8de6267) diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 8e8d720694ef..14146a328c20 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -4432,7 +4432,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testPdfImageHyperlink) // - Expected: 0.0012626264 // - Actual : 0.00126 // i.e. the rounded reciprocal was 794 points, not the original 792. - CPPUNIT_ASSERT_EQUAL(0.0012626264, rtl::math::round(aScale.getY(), 10)); + CPPUNIT_ASSERT_EQUAL(0.001262626, rtl::math::round(aScale.getY(), 9)); } CPPUNIT_TEST_FIXTURE(PdfExportTest, testURIs) commit 4f4b1eca5ee3eadc79c89c4e802eb7f5dd38b724 Author: Miklos Vajna <[email protected]> AuthorDate: Thu Aug 15 10:09:52 2024 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 20:13:18 2026 +0100 Update pdfium to 6656 Drop external/pdfium/annot.patch.1, it has been upstreamed as <https://pdfium-review.googlesource.com/c/pdfium/+/120750>. Update PDFiumPageObjectImpl::getFontName() to match <https://pdfium-review.googlesource.com/c/pdfium/+/121911> "Rename FPDFFont_GetFontName() to FPDFFont_GetFamilyName()". Extend external/pdfium/build.patch.1 to work around: > C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/workdir/UnpackedTarball/pdfium/fpdfsdk/fpdf_annot.cpp(1083): fatal error C1001: Internal compiler error. Change-Id: I94ed21265a79d484759f240f3baeb51c92365c78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171884 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 0cde8913d8cb183224d03d5cbb37072e63e745d1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193764 Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 70cbe79e3343285812c809736641ce4625a53e82) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193881 Reviewed-by: Michael Stahl <[email protected]> Tested-by: allotropia jenkins <[email protected]> (cherry picked from commit 5e9b02bbac8cf476d419cd363a91b96464a87813) diff --git a/download.lst b/download.lst index 6e2e810fa7ae..f68d692e2d67 100644 --- a/download.lst +++ b/download.lst @@ -502,8 +502,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := 9c2db89e9ea96f632108170bce7d901dbfc773bb09d03b7cd0ac68ebe26b9092 -PDFIUM_TARBALL := pdfium-6536.tar.bz2 +PDFIUM_SHA256SUM := ea2d59946fbd0c72a8b07d19bd58bb99cf66add27f5388b02d99bd7f37c13388 +PDFIUM_TARBALL := pdfium-6656.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 846f7cdde63b..a74a084ec6d7 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -184,6 +184,9 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfapi/cmaps/Korea1/cmaps_korea1 \ UnpackedTarball/pdfium/core/fpdfapi/cmaps/fpdf_cmaps \ UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_pagecontentgenerator \ + UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_npagetooneexporter \ + UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_pageexporter \ + UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_pageorganizer \ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_cidfont \ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_font \ UnpackedTarball/pdfium/core/fpdfapi/font/cpdf_fontencoding \ @@ -442,11 +445,9 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ # fxge $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ - UnpackedTarball/pdfium/core/fxge/dib/cfx_bitmapcomposer \ UnpackedTarball/pdfium/core/fxge/dib/cfx_bitmapstorer \ UnpackedTarball/pdfium/core/fxge/dib/cfx_dibitmap \ UnpackedTarball/pdfium/core/fxge/cfx_drawutils \ - UnpackedTarball/pdfium/core/fxge/dib/cfx_imagerenderer \ UnpackedTarball/pdfium/core/fxge/dib/cfx_imagestretcher \ UnpackedTarball/pdfium/core/fxge/dib/cfx_imagetransformer \ UnpackedTarball/pdfium/core/fxge/dib/cfx_scanlinecompositor \ @@ -471,7 +472,9 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitSymbol \ UnpackedTarball/pdfium/core/fxge/freetype/fx_freetype \ UnpackedTarball/pdfium/core/fxge/renderdevicedriver_iface \ - UnpackedTarball/pdfium/core/fxge/agg/fx_agg_driver \ + UnpackedTarball/pdfium/core/fxge/agg/cfx_agg_bitmapcomposer \ + UnpackedTarball/pdfium/core/fxge/agg/cfx_agg_devicedriver \ + UnpackedTarball/pdfium/core/fxge/agg/cfx_agg_imagerenderer \ UnpackedTarball/pdfium/core/fxge/cfx_cliprgn \ UnpackedTarball/pdfium/core/fxge/cfx_color \ UnpackedTarball/pdfium/core/fxge/cfx_glyphcache \ diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 2e8bbfc907f3..f40a830ae6dd 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -117,3 +117,16 @@ index 8026a75d5..34c20d62f 100644 } // namespace +--- pdfium/fpdfsdk/fpdf_annot.cpp.orig 2024-08-15 10:01:30.443712200 +0200 ++++ pdfium/fpdfsdk/fpdf_annot.cpp 2024-08-15 10:04:41.161274500 +0200 +@@ -1079,8 +1079,8 @@ + if (appearanceMode < 0 || appearanceMode >= FPDF_ANNOT_APPEARANCEMODE_COUNT) + return false; + +- static constexpr auto kModeKeyForMode = +- fxcrt::ToArray<const char*>({"N", "R", "D"}); ++ static constexpr std::array<const char*, 3UL> kModeKeyForMode ++ ({"N", "R", "D"}); + static_assert(kModeKeyForMode.size() == FPDF_ANNOT_APPEARANCEMODE_COUNT, + "length of kModeKeyForMode should be equal to " + "FPDF_ANNOT_APPEARANCEMODE_COUNT"); diff --git a/external/pdfium/buildfix-7.patch.1 b/external/pdfium/buildfix-7.patch.1 index e36e95b43d20..a5540617fd9e 100644 --- a/external/pdfium/buildfix-7.patch.1 +++ b/external/pdfium/buildfix-7.patch.1 @@ -144,3 +144,63 @@ pdfium/core/fpdfdoc/cpdf_formcontrol.cpp:134: undefined reference to `fxcrt::Str // Returns negative values on failure. int GetWeightLevel(FX_Charset charset, size_t index) { +--- pdfium/core/fpdfapi/page/cpdf_colorspace.cpp.orig 2025-11-12 11:17:00.123332719 +0100 ++++ pdfium/core/fpdfapi/page/cpdf_colorspace.cpp 2025-11-12 11:22:19.902936971 +0100 +@@ -51,7 +51,7 @@ + + namespace { + +-constexpr auto kSRGBSamples1 = fxcrt::ToArray<const uint8_t>({ ++std::array<const uint8_t, 192> kSRGBSamples1 = { + 0, 3, 6, 10, 13, 15, 18, 20, 22, 23, 25, 27, 28, 30, 31, + 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 49, 50, 51, 52, 53, 53, 54, 55, 56, 56, 57, 58, 58, +@@ -65,9 +65,9 @@ + 107, 107, 108, 108, 108, 109, 109, 109, 110, 110, 110, 110, 111, 111, 111, + 112, 112, 112, 113, 113, 113, 114, 114, 114, 115, 115, 115, 115, 116, 116, + 116, 117, 117, 117, 118, 118, 118, 118, 119, 119, 119, 120, +-}); ++}; + +-constexpr auto kSRGBSamples2 = fxcrt::ToArray<const uint8_t>({ ++std::array<const uint8_t, 208> kSRGBSamples2 = { + 120, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 148, 149, + 150, 151, 152, 153, 154, 155, 155, 156, 157, 158, 159, 159, 160, 161, 162, +@@ -82,7 +82,7 @@ + 236, 236, 237, 237, 238, 238, 238, 239, 239, 240, 240, 241, 241, 242, 242, + 243, 243, 244, 244, 245, 245, 246, 246, 246, 247, 247, 248, 248, 249, 249, + 250, 250, 251, 251, 251, 252, 252, 253, 253, 254, 254, 255, 255, +-}); ++}; + + constexpr size_t kBlackWhitePointCount = 3; + +--- pdfium/core/fpdfdoc/cpdf_pagelabel.cpp.orig 2025-11-12 11:24:55.120659410 +0100 ++++ pdfium/core/fpdfdoc/cpdf_pagelabel.cpp 2025-11-12 11:26:09.615649063 +0100 +@@ -20,9 +20,9 @@ + WideString MakeRoman(int num) { + constexpr auto kArabic = fxcrt::ToArray<const int>( + {1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1}); +- const auto kRoman = fxcrt::ToArray<const WideStringView>( ++ std::array<const WideStringView, 13> kRoman = + {L"m", L"cm", L"d", L"cd", L"c", L"xc", L"l", L"xl", L"x", L"ix", L"v", +- L"iv", L"i"}); ++ L"iv", L"i"}; + constexpr int kMaxNum = 1000000; + + num %= kMaxNum; +--- pdfium/core/fpdfdoc/cpvt_variabletext.cpp.orig 2025-11-12 11:28:21.534664730 +0100 ++++ pdfium/core/fpdfdoc/cpvt_variabletext.cpp 2025-11-12 11:27:51.960710697 +0100 +@@ -26,9 +26,9 @@ + constexpr float kFontScale = 0.001f; + constexpr uint8_t kReturnLength = 1; + +-constexpr auto kFontSizeSteps = fxcrt::ToArray<const uint8_t>( ++std::array<const uint8_t, 25> kFontSizeSteps = + {4, 6, 8, 9, 10, 12, 14, 18, 20, 25, 30, 35, 40, +- 45, 50, 55, 60, 70, 80, 90, 100, 110, 120, 130, 144}); ++ 45, 50, 55, 60, 70, 80, 90, 100, 110, 120, 130, 144}; + + } // namespace + diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index 5b94cea8372d..ef0860bee248 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -37,6 +37,7 @@ #include <cmath> #include <ctype.h> #include <functional> +#include <initializer_list> #include <iterator> #include <limits.h> #include <limits> @@ -53,7 +54,6 @@ #include <setjmp.h> #include <sstream> #include <stack> -#include <stdarg.h> #include <stddef.h> #include <stdint.h> #include <stdlib.h> @@ -91,8 +91,11 @@ #include <core/fpdfapi/cmaps/fpdf_cmaps.h> #include <core/fpdfapi/edit/cpdf_contentstream_write_utils.h> #include <core/fpdfapi/edit/cpdf_creator.h> +#include <core/fpdfapi/edit/cpdf_npagetooneexporter.h> #include <core/fpdfapi/edit/cpdf_pagecontentgenerator.h> #include <core/fpdfapi/edit/cpdf_pagecontentmanager.h> +#include <core/fpdfapi/edit/cpdf_pageexporter.h> +#include <core/fpdfapi/edit/cpdf_pageorganizer.h> #include <core/fpdfapi/edit/cpdf_stringarchivestream.h> #include <core/fpdfapi/font/cfx_cttgsubtable.h> #include <core/fpdfapi/font/cfx_stockfontarray.h> @@ -368,7 +371,10 @@ #include <core/fxcrt/xml/cfx_xmlnode.h> #include <core/fxcrt/xml/cfx_xmlparser.h> #include <core/fxcrt/xml/cfx_xmltext.h> -#include <core/fxge/agg/fx_agg_driver.h> +#include <core/fxcrt/zip.h> +#include <core/fxge/agg/cfx_agg_bitmapcomposer.h> +#include <core/fxge/agg/cfx_agg_devicedriver.h> +#include <core/fxge/agg/cfx_agg_imagerenderer.h> #include <core/fxge/calculate_pitch.h> #include <core/fxge/cfx_cliprgn.h> #include <core/fxge/cfx_color.h> @@ -392,12 +398,10 @@ #include <core/fxge/cfx_textrenderoptions.h> #include <core/fxge/cfx_unicodeencoding.h> #include <core/fxge/dib/blend.h> -#include <core/fxge/dib/cfx_bitmapcomposer.h> #include <core/fxge/dib/cfx_bitmapstorer.h> #include <core/fxge/dib/cfx_cmyk_to_srgb.h> #include <core/fxge/dib/cfx_dibbase.h> #include <core/fxge/dib/cfx_dibitmap.h> -#include <core/fxge/dib/cfx_imagerenderer.h> #include <core/fxge/dib/cfx_imagestretcher.h> #include <core/fxge/dib/cfx_imagetransformer.h> #include <core/fxge/dib/cfx_scanlinecompositor.h> diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx index c445e5e5ad98..153a38e18ac6 100644 --- a/vcl/source/pdf/PDFiumLibrary.cxx +++ b/vcl/source/pdf/PDFiumLibrary.cxx @@ -891,16 +891,16 @@ double PDFiumPageObjectImpl::getFontSize() OUString PDFiumPageObjectImpl::getFontName() { - OUString sFontName; - const int nFontName = 80 + 1; - std::unique_ptr<char[]> pFontName(new char[nFontName]); // + terminating null + OUString sFamilyName; + const int nFamilyName = 80 + 1; + std::unique_ptr<char[]> pFamilyName(new char[nFamilyName]); // + terminating null FPDF_FONT pFontObject = FPDFTextObj_GetFont(mpPageObject); - int nFontNameChars = FPDFFont_GetFontName(pFontObject, pFontName.get(), nFontName); - if (nFontName >= nFontNameChars) + int nFamilyNameChars = FPDFFont_GetFamilyName(pFontObject, pFamilyName.get(), nFamilyName); + if (nFamilyName >= nFamilyNameChars) { - sFontName = OUString::createFromAscii(pFontName.get()); + sFamilyName = OUString::createFromAscii(pFamilyName.get()); } - return sFontName; + return sFamilyName; } PDFTextRenderMode PDFiumPageObjectImpl::getTextRenderMode() commit 12886a3511b5eabe3a465d5a6e6a3cd11cd94dc6 Author: Miklos Vajna <[email protected]> AuthorDate: Fri Jun 14 08:23:58 2024 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 20:07:00 2026 +0100 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 <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> (cherry picked from commit 6d91efc9c90cd4354af17cb1cb6f40d992d98799) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193823 Tested-by: allotropia jenkins <[email protected]> Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit a9d6fa79078c0aa85e69c25a9f9265dc2610cb20) diff --git a/download.lst b/download.lst index 6b5acc82f0e5..6e2e810fa7ae 100644 --- a/download.lst +++ b/download.lst @@ -502,8 +502,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 f291d01e0f21..846f7cdde63b 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -379,6 +379,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 2b02e37f3c22..2e8bbfc907f3 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -60,19 +60,6 @@ index 44c921a14..0152a89b7 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 -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 @@ -86,3 +73,47 @@ 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,12 +21,12 @@ 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}); ++std::array<const uint8_t, 9> kZoomModeMaxParamCount = ++ {0, 3, 0, 1, 1, 4, 0, 1, 1}; + + } // namespace + diff --git a/external/pdfium/buildfix-7.patch.1 b/external/pdfium/buildfix-7.patch.1 index b34f417ea0dd..e36e95b43d20 100644 --- a/external/pdfium/buildfix-7.patch.1 +++ b/external/pdfium/buildfix-7.patch.1 @@ -31,3 +31,116 @@ pdfium/core/fpdfdoc/cpdf_formcontrol.cpp:134: undefined reference to `fxcrt::Str return fxge::FontEncoding::kGB2312; case FT_ENCODING_JOHAB: return fxge::FontEncoding::kJohab; +--- pdfium/core/fdrm/fx_crypt_sha.cpp.orig 2025-11-11 17:53:34.095920155 +0100 ++++ pdfium/core/fdrm/fx_crypt_sha.cpp 2025-11-11 17:55:25.689875991 +0100 +@@ -271,7 +271,16 @@ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + }; + ++#ifdef __GNUC__ ++template <size_t N> ++constexpr std::array<uint64_t, N> ToArrayULL(const unsigned long long (&data)[N]) { ++ return fxcrt::ToArrayImpl<uint64_t>(data, std::make_index_sequence<N>()); ++} ++ ++constexpr auto constants = ToArrayULL({ ++#else + constexpr auto constants = fxcrt::ToArray<const uint64_t>({ ++#endif + 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, + 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, + 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, 0xd807aa98a3030242ULL, +--- pdfium/core/fpdfapi/parser/fpdf_parser_decode.cpp.orig 2025-11-11 18:07:41.549916141 +0100 ++++ pdfium/core/fpdfapi/parser/fpdf_parser_decode.cpp 2025-11-11 18:08:01.711043241 +0100 +@@ -449,7 +449,7 @@ + if (bImageAcc && i == nSize - 1) { + result.image_encoding = "FlateDecode"; + result.image_params = std::move(pParam); +- return result; ++ std::optional<PDFDataDecodeResult> ret; ret = std::move(result); return ret; + } + DataAndBytesConsumed decode_result = FlateOrLZWDecode( + /*use_lzw=*/false, last_span, pParam, estimated_size); +@@ -472,7 +472,7 @@ + if (bImageAcc && i == nSize - 1) { + result.image_encoding = "RunLengthDecode"; + result.image_params = std::move(pParam); +- return result; ++ std::optional<PDFDataDecodeResult> ret; ret = std::move(result); return ret; + } + DataAndBytesConsumed decode_result = RunLengthDecode(last_span); + new_buf = std::move(decode_result.data); +@@ -486,7 +486,7 @@ + } + result.image_encoding = std::move(decoder); + result.image_params = std::move(pParam); +- return result; ++ std::optional<PDFDataDecodeResult> ret; ret = std::move(result); return ret; + } + if (bytes_consumed == FX_INVALID_OFFSET) { + return std::nullopt; +@@ -498,7 +498,7 @@ + + result.image_encoding.clear(); + result.image_params = nullptr; +- return result; ++ std::optional<PDFDataDecodeResult> ret; ret = std::move(result); return ret; + } + + static size_t StripLanguageCodes(pdfium::span<wchar_t> s, size_t n) { +--- pdfium/core/fxge/cfx_face.cpp.orig2 2025-11-11 18:44:37.469693380 +0100 ++++ pdfium/core/fxge/cfx_face.cpp 2025-11-11 18:53:20.076562115 +0100 +@@ -51,7 +51,7 @@ + // Boundary value to avoid integer overflow when adding 1/64th of the value. + constexpr int kMaxRectTop = 2114445437; + +-constexpr auto kWeightPow = fxcrt::ToArray<const uint8_t>({ ++std::array<const uint8_t, 100> kWeightPow = { + 0, 6, 12, 14, 16, 18, 22, 24, 28, 30, 32, 34, 36, 38, 40, + 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, + 70, 72, 72, 74, 74, 74, 76, 76, 76, 78, 78, 78, 80, 80, 80, +@@ -59,18 +59,18 @@ + 90, 90, 90, 92, 92, 92, 92, 94, 94, 94, 94, 96, 96, 96, 96, + 96, 98, 98, 98, 98, 100, 100, 100, 100, 100, 102, 102, 102, 102, 102, + 104, 104, 104, 104, 104, 106, 106, 106, 106, 106, +-}); ++}; + +-constexpr auto kWeightPow11 = fxcrt::ToArray<const uint8_t>({ ++std::array<const uint8_t, 100> kWeightPow11 = { + 0, 4, 7, 8, 9, 10, 12, 13, 15, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 39, 39, 40, 40, 41, + 41, 41, 42, 42, 42, 43, 43, 43, 44, 44, 44, 45, 45, 45, 46, 46, 46, + 46, 43, 47, 47, 48, 48, 48, 48, 45, 50, 50, 50, 46, 51, 51, 51, 52, + 52, 52, 52, 53, 53, 53, 53, 53, 54, 54, 54, 54, 55, 55, 55, 55, 55, + 56, 56, 56, 56, 56, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, +-}); ++}; + +-constexpr auto kWeightPowShiftJis = fxcrt::ToArray<const uint8_t>({ ++std::array<const uint8_t, 100> kWeightPowShiftJis = { + 0, 0, 2, 4, 6, 8, 10, 14, 16, 20, 22, 26, 28, 32, 34, + 38, 42, 44, 48, 52, 56, 60, 64, 66, 70, 74, 78, 82, 86, 90, + 96, 96, 96, 96, 98, 98, 98, 100, 100, 100, 100, 102, 102, 102, 102, +@@ -78,7 +78,7 @@ + 110, 110, 110, 110, 110, 112, 112, 112, 112, 112, 112, 114, 114, 114, 114, + 114, 114, 114, 116, 116, 116, 116, 116, 116, 116, 118, 118, 118, 118, 118, + 118, 118, 120, 120, 120, 120, 120, 120, 120, 120, +-}); ++}; + + constexpr size_t kWeightPowArraySize = 100; + static_assert(kWeightPowArraySize == std::size(kWeightPow), "Wrong size"); +@@ -86,10 +86,10 @@ + static_assert(kWeightPowArraySize == std::size(kWeightPowShiftJis), + "Wrong size"); + +-constexpr auto kAngleSkew = fxcrt::ToArray<const int8_t>({ ++std::array<const int8_t, 30> kAngleSkew = { + -0, -2, -3, -5, -7, -9, -11, -12, -14, -16, -18, -19, -21, -23, -25, + -27, -29, -31, -32, -34, -36, -38, -40, -42, -45, -47, -49, -51, -53, -55, +-}); ++}; + + // Returns negative values on failure. + int GetWeightLevel(FX_Charset charset, size_t index) { 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 b1433f5be49c936cc54711716ec751a86e77cf7b Author: Miklos Vajna <[email protected]> AuthorDate: Mon Apr 22 08:17:09 2024 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 20:04:35 2026 +0100 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 <[email protected]> Reviewed-by: Mike Kaganski <[email protected]> (cherry picked from commit d1f29087cca44a4b7ba36fce4d759f72b57082b6) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193822 Reviewed-by: Michael Stahl <[email protected]> Tested-by: allotropia jenkins <[email protected]> (cherry picked from commit 2b6cd39d7630c3850a6ecab895c07953dc02a553) diff --git a/download.lst b/download.lst index d45123910a87..6b5acc82f0e5 100644 --- a/download.lst +++ b/download.lst @@ -502,8 +502,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 500c23171612..f291d01e0f21 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -435,6 +435,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 @@ -570,12 +572,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 \ @@ -667,7 +663,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 03f45667247f..9214b9616f5b 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -34,9 +34,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 0c71f4d8c2b5..2b02e37f3c22 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -25,10 +25,10 @@ index 2e7a72aa1..65fb3deaa 100644 } void sycc_to_rgb(int offset, -diff --git a/third_party/base/containers/span.h b/third_party/base/containers/span.h +diff --git a/core/fxcrt/span.h b/core/fxcrt/span.h index 435fafa85..d8e8bfbc4 100644 ---- a/third_party/base/containers/span.h -+++ b/third_party/base/containers/span.h +--- a/core/fxcrt/span.h ++++ b/core/fxcrt/span.h @@ -211,7 +211,7 @@ class TRIVIAL_ABI GSL_POINTER span { #else template <typename Container, @@ -39,18 +39,18 @@ index 435fafa85..d8e8bfbc4 100644 #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()) {} + size_t M, + typename R, + typename = internal::EnableIfLegalSpanConversion<U, T>> +- constexpr span(const span<U, M, R>& other) ++ span(const span<U, M, R>& 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 +diff --git a/core/fxcrt/numerics/safe_conversions_impl.h b/core/fxcrt/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 +--- a/core/fxcrt/numerics/safe_conversions_impl.h ++++ b/core/fxcrt/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. diff --git a/external/pdfium/buildfix-7.patch.1 b/external/pdfium/buildfix-7.patch.1 index 8285d4a147fa..b34f417ea0dd 100644 --- a/external/pdfium/buildfix-7.patch.1 +++ b/external/pdfium/buildfix-7.patch.1 @@ -8,9 +8,9 @@ pdfium/core/fpdfdoc/cpdf_formcontrol.cpp:134: undefined reference to `fxcrt::Str // NOLINTNEXTLINE(runtime/explicit) - constexpr StringViewTemplate(const CharType& ch) noexcept + StringViewTemplate(const CharType& ch) noexcept - : m_Span(reinterpret_cast<const UnsignedType*>(&ch), 1u) {} + : m_Span( + reinterpret_span<const UnsignedType>(pdfium::span_from_ref(ch))) {} - 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 @@ 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 8683a2ecabe8af084f8bc2cc8d76a32b03104186 Author: Michael Stahl <[email protected]> AuthorDate: Wed Nov 12 09:17:51 2025 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 19:59:59 2026 +0100 pdfium: try to use -std:c++20 with MSVC Change-Id: I1f1eb83093181b947bcb5c4b78242a9b00d6c60a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193840 Tested-by: allotropia jenkins <[email protected]> Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit d8101a2f76899e1f7dfd4ec24baafdae843b7fd1) diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index f8d075b8db08..500c23171612 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -15,6 +15,13 @@ $(eval $(call gb_Library_set_warnings_disabled,pdfium)) $(eval $(call gb_Library_set_precompiled_header,pdfium,external/pdfium/inc/pch/precompiled_pdfium)) +# force C++20 with MSVC +ifneq ($(filter -std:c++17,$(CXXFLAGS_CXX11)),) +$(eval $(call gb_Library_add_cxxflags,pdfium, \ + -std:c++20 \ +)) +endif + $(eval $(call gb_Library_set_include,pdfium,\ -I$(call gb_UnpackedTarball_get_dir,pdfium) \ -I$(call gb_UnpackedTarball_get_dir,pdfium)/third_party \ commit 662ac89b8d6f0ba37f1ae73a2c192dd7c4bfad7a Author: Miklos Vajna <[email protected]> AuthorDate: Wed Feb 14 08:22:37 2024 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 19:57:59 2026 +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]> (cherry picked from commit d1a04abb835889dad327d1275426a3f9dc62884e) diff --git a/download.lst b/download.lst index 5e6c4064abed..d45123910a87 100644 --- a/download.lst +++ b/download.lst @@ -502,8 +502,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..0c71f4d8c2b5 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 @@ -75,7 +18,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); @@ -130,3 +73,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> commit 437bcb9486b009833fb135f3b40846078bb0fedc Author: Miklos Vajna <[email protected]> AuthorDate: Tue Dec 12 20:16:40 2023 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 19:55:45 2026 +0100 Update pdfium to 6179 - Remove ubsan.patch, upstream switched to FXSYS_memset() in this function, which does a similar length check as our patch did. Change-Id: Ib418cd8e642d2be9f448c92f25f85bec25e34598 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160627 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit 918515d6fc6e2eaa000c4a997d604b7b00b492e3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160644 (cherry picked from commit ba39aecc5e885f6bac30d4ba079913d0227a30c1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193820 Tested-by: allotropia jenkins <[email protected]> Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit bfeb19d86f9bcd7c97e64eae0172442120828c75) diff --git a/download.lst b/download.lst index af6208f69932..5e6c4064abed 100644 --- a/download.lst +++ b/download.lst @@ -502,8 +502,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := 021456a0ddfa473855651496e277b6e1493dbf9572fce4e3204f7580964b42c7 -PDFIUM_TARBALL := pdfium-6060.tar.bz2 +PDFIUM_SHA256SUM := 4d3f08fe0e2fda86246832085426616826dcca0912202874428bfbc24d13d95c +PDFIUM_TARBALL := pdfium-6179.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 cc6cbb148913..f8d075b8db08 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -442,6 +442,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/dib/cfx_scanlinecompositor \ UnpackedTarball/pdfium/core/fxge/dib/cstretchengine \ UnpackedTarball/pdfium/core/fxge/dib/fx_dib \ + UnpackedTarball/pdfium/core/fxge/dib/blend \ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitDingbats \ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixed \ UnpackedTarball/pdfium/core/fxge/fontdata/chromefontdata/FoxitFixedBold \ diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index de2517a01fc0..03f45667247f 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -9,8 +9,8 @@ pdfium_patches := pdfium_patches += buildfix.patch.1 +pdfium_patches += buildfix-7.patch.1 pdfium_patches += fa84e52-revert.patch.1 -pdfium_patches += ubsan.patch # Fixes build on our baseline. pdfium_patches += build.patch.1 # Avoids Windows 8 build dependency. diff --git a/external/pdfium/buildfix-7.patch.1 b/external/pdfium/buildfix-7.patch.1 new file mode 100644 index 000000000000..96e1c594eb95 --- /dev/null +++ b/external/pdfium/buildfix-7.patch.1 @@ -0,0 +1,13 @@ +fix weird link failures on centos7: +pdfium/core/fpdfdoc/cpdf_formcontrol.cpp:134: undefined reference to `fxcrt::StringViewTemplate<char>::StringViewTemplate(char const&)' +--- pdfium/core/fxcrt/string_view_template.h.orig 2025-11-11 13:26:05.268265314 +0100 ++++ pdfium/core/fxcrt/string_view_template.h 2025-11-11 13:26:36.836918076 +0100 +@@ -73,7 +73,7 @@ + // Deliberately implicit to avoid calling on every char literal. + // |ch| must be an lvalue that outlives the StringViewTemplate. + // NOLINTNEXTLINE(runtime/explicit) +- constexpr StringViewTemplate(const CharType& ch) noexcept ++ StringViewTemplate(const CharType& ch) noexcept + : m_Span(reinterpret_cast<const UnsignedType*>(&ch), 1u) {} + + StringViewTemplate& operator=(const CharType* src) { diff --git a/external/pdfium/buildfix.patch.1 b/external/pdfium/buildfix.patch.1 index 60d65558fe6f..da40ca393efe 100644 --- a/external/pdfium/buildfix.patch.1 +++ b/external/pdfium/buildfix.patch.1 @@ -9,13 +9,3 @@ GCC 15 fix class CJBig2_SymbolDict; ---- pdfium/third_party/base/containers/span.h.orig 2025-11-11 11:46:46.901027677 +0100 -+++ pdfium/third_party/base/containers/span.h 2025-11-11 11:46:48.815049574 +0100 -@@ -6,6 +6,7 @@ - #define THIRD_PARTY_BASE_CONTAINERS_SPAN_H_ - - #include <stddef.h> -+#include <stdint.h> - - #include <algorithm> - #include <array> diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index 64795df4054d..c58757bc605d 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -334,7 +334,6 @@ #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> @@ -375,6 +374,7 @@ #include <core/fxge/cfx_substfont.h> #include <core/fxge/cfx_textrenderoptions.h> #include <core/fxge/cfx_unicodeencoding.h> +#include <core/fxge/dib/blend.h> #include <core/fxge/dib/cfx_bitmapcomposer.h> #include <core/fxge/dib/cfx_bitmapstorer.h> #include <core/fxge/dib/cfx_cmyk_to_srgb.h> @@ -458,6 +458,7 @@ #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> @@ -478,8 +479,8 @@ #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/no_destructor.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 diff --git a/external/pdfium/ubsan.patch b/external/pdfium/ubsan.patch deleted file mode 100644 index 039505eda9cf..000000000000 --- a/external/pdfium/ubsan.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- core/fxge/cfx_glyphcache.cpp -+++ core/fxge/cfx_glyphcache.cpp -@@ -183,7 +183,8 @@ std::unique_ptr<CFX_GlyphBitmap> CFX_GlyphCache::RenderGlyph( - } - } - } else { -- memset(pDestBuf, 0, dest_pitch * bmheight); -+ if (dest_pitch != 0 && bmheight != 0) -+ memset(pDestBuf, 0, dest_pitch * bmheight); - int rowbytes = std::min(abs(src_pitch), dest_pitch); - for (int row = 0; row < bmheight; row++) - memcpy(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch, rowbytes); commit c700d9db07158b22ff803ad95d15085876bd2d28 Author: Miklos Vajna <[email protected]> AuthorDate: Wed Oct 11 20:06:04 2023 +0200 Commit: Michael Stahl <[email protected]> CommitDate: Wed Jan 28 19:53:51 2026 +0100 Update to pdfium 6060 - external/pdfium/build.patch.1: re-generate with 'patch -p1' + 'git diff' Change-Id: I9258d6d0130620523d64fcd0854c4d96fc98a4bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157846 Tested-by: Jenkins Reviewed-by: Miklos Vajna <[email protected]> (cherry picked from commit faa590cf41a08169306ec369948b31d0401518a3) diff --git a/download.lst b/download.lst index 17368f9ef5c5..af6208f69932 100644 --- a/download.lst +++ b/download.lst @@ -502,8 +502,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := 9a9ce3f62de525cdfd8373a155ac549579c2c8067c6050716ca4b5cd5c11f655 -PDFIUM_TARBALL := pdfium-5941.tar.bz2 +PDFIUM_SHA256SUM := 021456a0ddfa473855651496e277b6e1493dbf9572fce4e3204f7580964b42c7 +PDFIUM_TARBALL := pdfium-6060.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 4853e4f90a45..3dbd9427c037 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -1,9 +1,9 @@ -*- Mode: diff -*- diff --git a/core/fpdfapi/font/cpdf_cidfont.cpp b/core/fpdfapi/font/cpdf_cidfont.cpp -index f5a51b24e..8b308d0a6 100644 +index 7d2d549b8..c4864060a 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) { +@@ -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) @@ -13,10 +13,10 @@ index f5a51b24e..8b308d0a6 100644 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 +index f19ace9d0..562b015f0 100644 --- a/core/fpdfapi/font/cpdf_truetypefont.cpp +++ b/core/fpdfapi/font/cpdf_truetypefont.cpp -@@ -91,7 +91,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { +@@ -90,7 +90,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { FT_ENCODING_APPLE_ROMAN, m_Encoding.UnicodeFromCharCode(charcode)); if (!maccode) { @@ -25,7 +25,7 @@ index 0a59b54eb..a96e11759 100644 } else { m_GlyphIndex[charcode] = FT_Get_Char_Index(face, maccode); } -@@ -105,7 +105,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { +@@ -104,7 +104,7 @@ void CPDF_TrueTypeFont::LoadGlyphMap() { m_GlyphIndex[charcode] = FT_Get_Char_Index(face, 32); continue; } @@ -57,7 +57,7 @@ index 55510e7d7..2f13f00b8 100644 continue; diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp -index 228a0c137..bf512beb3 100644 +index 31564f45f..5858549ef 100644 --- a/core/fpdfdoc/cpdf_metadata.cpp +++ b/core/fpdfdoc/cpdf_metadata.cpp @@ -87,7 +87,7 @@ std::vector<UnsupportedFeature> CPDF_Metadata::CheckForSharedForm() const { @@ -70,10 +70,10 @@ index 228a0c137..bf512beb3 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 9391d61ab..490ce2230 100644 +index 2e7a72aa1..65fb3deaa 100644 --- a/core/fxcodec/jpx/cjpx_decoder.cpp -e ... etc. - the rest is truncated
