download.lst | 4 +-- external/pdfium/Library_pdfium.mk | 12 ++++++--- external/pdfium/build.patch.1 | 22 ----------------- external/pdfium/inc/pch/precompiled_pdfium.hxx | 15 +++++++---- sc/qa/extras/scpdfexport.cxx | 2 - sd/qa/unit/export-tests.cxx | 6 ++-- sw/qa/extras/uiwriter/uiwriter11.cxx | 14 +++++----- vcl/qa/cppunit/PDFiumLibraryTest.cxx | 2 - vcl/qa/cppunit/VectorGraphicSearchTest.cxx | 32 ++++++++++++------------- 9 files changed, 47 insertions(+), 62 deletions(-)
New commits: commit bb5a91ec17e12a8d9a7d3005ec1de673fc47e0eb Author: Miklos Vajna <[email protected]> AuthorDate: Wed Feb 18 10:56:28 2026 +0100 Commit: Miklos Vajna <[email protected]> CommitDate: Wed Feb 18 15:13:08 2026 +0100 pdfium: update to 7691 Drop the last hunk of build.patch.1, <https://pdfium-review.googlesource.com/c/pdfium/+/139690> now does the stream upstream. Adapt CppunitTest_vcl_pdfium_library_test & CppunitTest_sc_pdf_export: trailing whitespace is not part of the search match anymore, probably due to <https://pdfium-review.googlesource.com/c/pdfium/+/142110>. Adapt CppunitTest_vcl_graphic_test, the search match index is slightly different now, presumably again due to the whitespace changes. Adapt CppunitTest_sd_export_tests, the order of shapes on the page changed. Adapt CppunitTest_sw_uiwriter11, again trailing whitespace is now stripped away by pdfium. Change-Id: Iebc85465320aab2c187b577de304aff7425431b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199595 Reviewed-by: Miklos Vajna <[email protected]> Tested-by: Jenkins diff --git a/download.lst b/download.lst index 155ed4648d2e..87b95c930f82 100644 --- a/download.lst +++ b/download.lst @@ -564,8 +564,8 @@ PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -PDFIUM_SHA256SUM := 2d7124bf2481abfd24f9ff0c3544beeea4d46716b6de5aeb9191487785058d59 -PDFIUM_TARBALL := pdfium-7578.tar.bz2 +PDFIUM_SHA256SUM := a4ca01c0e58b5c6bf52c0d17584eaaa2a893dc0240fd47cf94dfb27f0b8c03f6 +PDFIUM_TARBALL := pdfium-7691.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 0e2c9bc8ca7a..694375fdb395 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -438,14 +438,20 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxcrt/string_data_template \ UnpackedTarball/pdfium/core/fxcrt/binary_buffer \ UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_span_stream \ - UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_string_stream \ - 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 \ + UnpackedTarball/pdfium/core/fxcrt/cfx_fileaccess_stream \ + UnpackedTarball/pdfium/core/fxcrt/cfx_read_only_container_stream \ )) +ifneq ($(OS),WNT) +$(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ + UnpackedTarball/pdfium/core/fxcrt/mapped_data_bytes \ +)) +endif + # fxge $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/dib/cfx_bitmapstorer \ @@ -483,7 +489,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/cfx_glyphcache \ UnpackedTarball/pdfium/core/fxge/cfx_folderfontinfo \ UnpackedTarball/pdfium/core/fxge/cfx_font \ - UnpackedTarball/pdfium/core/fxge/cfx_fontcache \ UnpackedTarball/pdfium/core/fxge/cfx_fontmapper \ UnpackedTarball/pdfium/core/fxge/cfx_fontmgr \ UnpackedTarball/pdfium/core/fxge/cfx_gemodule \ @@ -494,7 +499,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/cfx_substfont \ UnpackedTarball/pdfium/core/fxge/cfx_unicodeencoding \ UnpackedTarball/pdfium/core/fxge/cfx_glyphbitmap \ - UnpackedTarball/pdfium/core/fxge/scoped_font_transform \ UnpackedTarball/pdfium/core/fxge/text_glyph_pos \ UnpackedTarball/pdfium/core/fxge/fx_font \ UnpackedTarball/pdfium/core/fxge/dib/cfx_dibbase \ diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 49d00a99525d..82632ed04f34 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -155,25 +155,3 @@ index bad07b723..b960f90b4 100644 friend constexpr auto operator<=>( span lhs, span<OtherElementType, OtherExtent, OtherInternalPtrType> rhs) { -diff --git a/fpdfsdk/fpdf_editpage.cpp b/fpdfsdk/fpdf_editpage.cpp -index 76e3e2626..15287a263 100644 ---- a/fpdfsdk/fpdf_editpage.cpp -+++ b/fpdfsdk/fpdf_editpage.cpp -@@ -168,7 +168,7 @@ RetainPtr<const CPDF_Object> GetParamObject(void* out_value, - - struct ParamsAndObject { - RetainPtr<CPDF_Dictionary> params; -- raw_ptr<CPDF_PageObject> page_obj; -+ UnownedPtr<CPDF_PageObject> page_obj; - }; - - ParamsAndObject SetParamValueHelper(FPDF_DOCUMENT document, -@@ -179,7 +179,7 @@ ParamsAndObject SetParamValueHelper(FPDF_DOCUMENT document, - return {nullptr, nullptr}; - } - RetainPtr<CPDF_Dictionary> params = GetOrCreateMarkParamsDict(document, mark); -- return {params, page_obj}; -+ return {params, UnownedPtr<CPDF_PageObject>(page_obj)}; - } - - } // namespace diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx index 454de05d7f04..60715d59356d 100644 --- a/external/pdfium/inc/pch/precompiled_pdfium.hxx +++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx @@ -13,7 +13,7 @@ manual changes will be rewritten by the next run of update_pch.sh (which presumably also fixes all possible problems, so it's usually better to use it). - Generated on 2023-08-15 08:05:49 using: + Generated on 2026-02-18 10:54:25 using: ./bin/update_pch external/pdfium pdfium --cutoff=1 --exclude:system --include:module --include:local If after updating build fails, use the following command to locate conflicting headers: @@ -37,6 +37,7 @@ #include <climits> #include <cmath> #include <ctype.h> +#include <fcntl.h> #include <functional> #include <initializer_list> #include <iterator> @@ -62,6 +63,7 @@ #include <time.h> #include <tuple> #include <type_traits> +#include <unistd.h> #include <utility> #include <variant> #include <vector> @@ -289,10 +291,10 @@ #include <core/fxcrt/bytestring.h> #include <core/fxcrt/cfx_bitstream.h> #include <core/fxcrt/cfx_datetime.h> +#include <core/fxcrt/cfx_fileaccess_stream.h> #include <core/fxcrt/cfx_memorystream.h> +#include <core/fxcrt/cfx_read_only_container_stream.h> #include <core/fxcrt/cfx_read_only_span_stream.h> -#include <core/fxcrt/cfx_read_only_string_stream.h> -#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> @@ -325,7 +327,6 @@ #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> #include <core/fxcrt/fx_bidi.h> @@ -344,6 +345,8 @@ #include <core/fxcrt/fx_string_wrappers.h> #include <core/fxcrt/fx_system.h> #include <core/fxcrt/fx_unicode.h> +#include <core/fxcrt/mapped_data_bytes.h> +#include <core/fxcrt/mask.h> #include <core/fxcrt/maybe_owned.h> #include <core/fxcrt/notreached.h> #include <core/fxcrt/numerics/clamped_math.h> @@ -386,7 +389,6 @@ #include <core/fxge/cfx_fillrenderoptions.h> #include <core/fxge/cfx_folderfontinfo.h> #include <core/fxge/cfx_font.h> -#include <core/fxge/cfx_fontcache.h> #include <core/fxge/cfx_fontmapper.h> #include <core/fxge/cfx_fontmgr.h> #include <core/fxge/cfx_gemodule.h> @@ -415,7 +417,6 @@ #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> #include <core/fxge/text_char_pos.h> #include <core/fxge/text_glyph_pos.h> @@ -482,6 +483,8 @@ #include <public/fpdf_text.h> #include <public/fpdf_transformpage.h> #include <public/fpdfview.h> +#include <sys/mman.h> +#include <sys/stat.h> #include <third_party/agg23/agg_clip_liang_barsky.h> #include <third_party/agg23/agg_conv_dash.h> #include <third_party/agg23/agg_conv_stroke.h> diff --git a/sc/qa/extras/scpdfexport.cxx b/sc/qa/extras/scpdfexport.cxx index 5a35a95fe022..34931c1b15f6 100644 --- a/sc/qa/extras/scpdfexport.cxx +++ b/sc/qa/extras/scpdfexport.cxx @@ -903,7 +903,7 @@ void ScPDFExportTest::testTdf78897() // Without the fix in place, this test would have failed with // - Expected: 11.00 11.00 // - Actual : 11.00 ### - CPPUNIT_ASSERT_EQUAL(u" 11.00 11.00 "_ustr, aActualText); + CPPUNIT_ASSERT_EQUAL(u" 11.00 11.00"_ustr, aActualText); } // just needs to not crash on export to pdf diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 2e5a68f1d38f..386b42fcdf3f 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -1171,12 +1171,12 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testExplodedPdfHindi) // ensure the expected content assertXPathContent(pXmlDoc, - "/office:document/office:body/office:drawing/draw:page/draw:g/draw:frame[3]/" - "draw:text-box/text:p[@text:style-name='P4'][1]", + "/office:document/office:body/office:drawing/draw:page/draw:g/draw:frame[4]/" + "draw:text-box/text:p[@text:style-name='P6'][1]", u"FIRST-YEAR HINDI COURSE"); // ensure the expected font name - assertXPath(pXmlDoc, "/office:document/office:automatic-styles/style:style[@style:name='P4']/" + assertXPath(pXmlDoc, "/office:document/office:automatic-styles/style:style[@style:name='P6']/" "style:text-properties[@style:font-name='AcademyEngravedLetPlain']"); } diff --git a/sw/qa/extras/uiwriter/uiwriter11.cxx b/sw/qa/extras/uiwriter/uiwriter11.cxx index f444a763d94d..7c27d74729c1 100644 --- a/sw/qa/extras/uiwriter/uiwriter11.cxx +++ b/sw/qa/extras/uiwriter/uiwriter11.cxx @@ -534,16 +534,16 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest11, testTdf163194) // of the comments is stable and independent of the DPI. const OUString aLines[] = { // First annotation - u"A comment. One two three four "_ustr, - u"five six seven eight nine ten "_ustr, - u"eleven twelve thirteen fourteen "_ustr, - u"fifteen sixteen seventeen "_ustr, + u"A comment. One two three four"_ustr, + u"five six seven eight nine ten"_ustr, + u"eleven twelve thirteen fourteen"_ustr, + u"fifteen sixteen seventeen"_ustr, u"eighteen nineteen twenty."_ustr, // Second annotation - u"Another comment. Twenty-one "_ustr, - u"twenty-two twenty-three "_ustr, + u"Another comment. Twenty-one"_ustr, + u"twenty-two twenty-three"_ustr, u"twenty-four twenty-five twenty-"_ustr, - u"six twenty-seven twenty-eight "_ustr, + u"six twenty-seven twenty-eight"_ustr, u"twenty-nine thirty."_ustr, }; std::set<OUString> aFoundLines; diff --git a/vcl/qa/cppunit/PDFiumLibraryTest.cxx b/vcl/qa/cppunit/PDFiumLibraryTest.cxx index 1bd2d3b1cd8a..ba1b9c9a8d3f 100644 --- a/vcl/qa/cppunit/PDFiumLibraryTest.cxx +++ b/vcl/qa/cppunit/PDFiumLibraryTest.cxx @@ -125,7 +125,7 @@ CPPUNIT_TEST_FIXTURE(PDFiumLibraryTest, testPageObjects) CPPUNIT_ASSERT_EQUAL(vcl::pdf::PDFPageObjectType::Text, pPageObject->getType()); CPPUNIT_ASSERT_EQUAL(u"The quick, brown fox jumps over a lazy dog. DJs flock by when " - "MTV ax quiz prog. Junk MTV quiz "_ustr, + "MTV ax quiz prog. Junk MTV quiz"_ustr, pPageObject->getText(pTextPage)); CPPUNIT_ASSERT_EQUAL(12.0, pPageObject->getFontSize()); diff --git a/vcl/qa/cppunit/VectorGraphicSearchTest.cxx b/vcl/qa/cppunit/VectorGraphicSearchTest.cxx index 64ad37e95925..27d160f7af65 100644 --- a/vcl/qa/cppunit/VectorGraphicSearchTest.cxx +++ b/vcl/qa/cppunit/VectorGraphicSearchTest.cxx @@ -75,7 +75,7 @@ void VectorGraphicSearchTest::test() CPPUNIT_ASSERT_DOUBLES_EQUAL(2486.37, aRectangles[3].getMaxY(), 1E-2); CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(817, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(809, aSearch.index()); aRectangles = aSearch.getTextRectangles(); CPPUNIT_ASSERT_EQUAL(size_t(4), aRectangles.size()); @@ -116,11 +116,11 @@ void VectorGraphicSearchTest::testNextPrevious() // next - second position found CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(817, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(809, aSearch.index()); // next - not found, index unchanged CPPUNIT_ASSERT_EQUAL(false, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(817, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(809, aSearch.index()); // previous - first position CPPUNIT_ASSERT_EQUAL(true, aSearch.previous()); @@ -132,7 +132,7 @@ void VectorGraphicSearchTest::testNextPrevious() // next - second position found CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(817, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(809, aSearch.index()); } { // Start from the end of the page @@ -146,7 +146,7 @@ void VectorGraphicSearchTest::testNextPrevious() // previous - second position found CPPUNIT_ASSERT_EQUAL(true, aSearch.previous()); - CPPUNIT_ASSERT_EQUAL(817, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(809, aSearch.index()); // previous - first position found CPPUNIT_ASSERT_EQUAL(true, aSearch.previous()); @@ -158,11 +158,11 @@ void VectorGraphicSearchTest::testNextPrevious() // next - second position CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(817, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(809, aSearch.index()); // next - not found, index unchanged CPPUNIT_ASSERT_EQUAL(false, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(817, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(809, aSearch.index()); // previous - first match found CPPUNIT_ASSERT_EQUAL(true, aSearch.previous()); @@ -187,18 +187,18 @@ void VectorGraphicSearchTest::testSearchStringChange() CPPUNIT_ASSERT_EQUAL(34, aSearch.index()); CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(817, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(809, aSearch.index()); // Change search to "fox" CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"fox"_ustr)); CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(822, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(814, aSearch.index()); // Change search to "Quick" CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"Quick"_ustr)); CPPUNIT_ASSERT_EQUAL(true, aSearch.previous()); - CPPUNIT_ASSERT_EQUAL(784, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(777, aSearch.index()); } void VectorGraphicSearchTest::testSearchMatchWholeWord() @@ -214,14 +214,14 @@ void VectorGraphicSearchTest::testSearchMatchWholeWord() // Search, whole word disabled - "Flummoxed" - found CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"Flummoxed"_ustr)); CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(618, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(612, aSearch.index()); } { VectorGraphicSearch aSearch(aGraphic); // Search, whole word disabled - "Flummo" - found CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"Flummo"_ustr)); CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(618, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(612, aSearch.index()); } { VectorGraphicSearch aSearch(aGraphic); @@ -229,7 +229,7 @@ void VectorGraphicSearchTest::testSearchMatchWholeWord() CPPUNIT_ASSERT_EQUAL( true, aSearch.search(u"Flummoxed"_ustr, { SearchStartPosition::Begin, false, true })); CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(618, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(612, aSearch.index()); } { VectorGraphicSearch aSearch(aGraphic); @@ -253,7 +253,7 @@ void VectorGraphicSearchTest::testSearchMatchCase() // Search "Flummoxed" - case insensitive - found CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"Flummoxed"_ustr)); CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(618, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(612, aSearch.index()); } { @@ -261,7 +261,7 @@ void VectorGraphicSearchTest::testSearchMatchCase() // Search "FLUMMOXED" - case insensitive - found CPPUNIT_ASSERT_EQUAL(true, aSearch.search(u"FLUMMOXED"_ustr)); CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(618, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(612, aSearch.index()); } { @@ -270,7 +270,7 @@ void VectorGraphicSearchTest::testSearchMatchCase() CPPUNIT_ASSERT_EQUAL( true, aSearch.search(u"Flummoxed"_ustr, { SearchStartPosition::Begin, true, false })); CPPUNIT_ASSERT_EQUAL(true, aSearch.next()); - CPPUNIT_ASSERT_EQUAL(618, aSearch.index()); + CPPUNIT_ASSERT_EQUAL(612, aSearch.index()); } {
