download.lst | 4 ++-- external/pdfium/Library_pdfium.mk | 12 +++++++++++- external/pdfium/build.patch.1 | 12 ++++++++++++ vcl/qa/cppunit/pdfexport/pdfexport.cxx | 4 ++-- 4 files changed, 27 insertions(+), 5 deletions(-)
New commits: commit 96aed26163a408368a34d26f928698886aa787a8 Author: Miklos Vajna <[email protected]> AuthorDate: Thu Feb 13 13:45:38 2025 +0100 Commit: Miklos Vajna <[email protected]> CommitDate: Tue Nov 11 08:31:42 2025 +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 diff --git a/download.lst b/download.lst index 59241831561d..3a54f8267356 100644 --- a/download.lst +++ b/download.lst @@ -626,8 +626,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 9307d1d148d9..7283f4f0997a 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 $(eval $(call gb_Library_set_include,pdfium,\ -I$(call gb_UnpackedTarball_get_dir,pdfium) \ diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 6fe32f6b76ca..144d1748eae9 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -77,3 +77,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*; diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 53182e5b3950..23d331df230b 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -1227,7 +1227,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf154549) int nChars = pPdfTextPage->countChars(); - CPPUNIT_ASSERT_EQUAL(1, nChars); + CPPUNIT_ASSERT_EQUAL(3, nChars); std::vector<sal_uInt32> aChars(nChars); for (int i = 0; i < nChars; i++) @@ -1237,7 +1237,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf154549) // Without the fix in place, this test would have failed with // - Expected: ִبي // - Actual : بִي - CPPUNIT_ASSERT_EQUAL(u"\u064a"_ustr, aActualText); + CPPUNIT_ASSERT_EQUAL(u"\u05B4\u0628\u064A"_ustr, aActualText); #endif }
