diff options
-rw-r--r-- | RepositoryExternal.mk | 1 | ||||
-rw-r--r-- | download.lst | 4 | ||||
-rw-r--r-- | external/pdfium/Library_pdfium.mk | 19 | ||||
-rw-r--r-- | external/pdfium/UnpackedTarball_pdfium.mk | 3 | ||||
-rw-r--r-- | external/pdfium/build.patch.1 | 21 | ||||
-rw-r--r-- | external/pdfium/c++20-comparison.patch | 13 | ||||
-rw-r--r-- | external/pdfium/ubsan.patch | 20 | ||||
-rw-r--r-- | external/pdfium/visibility.patch.1 | 22 | ||||
-rw-r--r-- | solenv/flatpak-manifest.in | 6 |
9 files changed, 42 insertions, 67 deletions
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 7e629a89cb34..5adfeac29007 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -4210,6 +4210,7 @@ ifneq ($(ENABLE_PDFIUM),) define gb_LinkTarget__use_pdfium $(call gb_LinkTarget_set_include,$(1),\ -I$(call gb_UnpackedTarball_get_dir,pdfium)/public \ + -DCOMPONENT_BUILD \ $$(INCLUDE) \ ) $(call gb_LinkTarget_use_libraries,$(1),pdfium) diff --git a/download.lst b/download.lst index 342fe2c058a4..ef405de2e75b 100644 --- a/download.lst +++ b/download.lst @@ -200,8 +200,8 @@ export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b633 export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz -export PDFIUM_SHA256SUM := 80d4d6bd8faec226936fcde5521c6e92c0c645126ac3ae72dd2c160ca1749895 -export PDFIUM_TARBALL := pdfium-3963.tar.bz2 +export PDFIUM_SHA256SUM := 9a2f9bddca935a263f06c81003483473a525ccd0f4e517bc75fceb914d4c54b6 +export PDFIUM_TARBALL := pdfium-4137.tar.bz2 export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk index f1d1606c494b..4f2ab40a3baf 100644 --- a/external/pdfium/Library_pdfium.mk +++ b/external/pdfium/Library_pdfium.mk @@ -28,6 +28,7 @@ $(eval $(call gb_Library_add_defs,pdfium,\ -DMEMORY_TOOL_REPLACES_ALLOCATOR \ -DUNICODE \ -DWIN32_LEAN_AND_MEAN \ + -DCOMPONENT_BUILD \ )) # Don't show warnings upstream doesn't care about. @@ -79,6 +80,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/fpdfsdk/fpdf_view \ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_pauseadapter \ UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_interactiveform \ + UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_renderpage \ )) # fdrm @@ -231,7 +233,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfapi/parser/fpdf_parser_utility \ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_object_walker \ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_read_validator \ - UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_charposlist \ + UnpackedTarball/pdfium/core/fpdfapi/render/charposlist \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_devicebuffer \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_docrenderdata \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_imagecacheentry \ @@ -272,7 +274,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_cross_ref_avail \ UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_pagecontentmanager \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transparency \ - UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_dibbase \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_dib \ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_object_stream \ UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_cross_ref_table \ UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_stringarchivestream \ @@ -280,7 +282,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfapi/edit/cpdf_contentstream_write_utils \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_annotcontext \ UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_pagerendercontext \ - UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_dibtransferfunc \ + UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfuncdib \ UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfunc \ )) @@ -289,7 +291,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfdoc/cline \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_aaction \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_action \ - UnpackedTarball/pdfium/core/fpdfdoc/cpdf_actionfields \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_annot \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_annotlist \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_apsettings \ @@ -297,7 +298,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_bookmarktree \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_defaultappearance \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_dest \ - UnpackedTarball/pdfium/core/fpdfdoc/cpdf_docjsactions \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_filespec \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_formcontrol \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_formfield \ @@ -320,6 +320,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_structtree \ UnpackedTarball/pdfium/core/fpdfdoc/cba_fontmap \ UnpackedTarball/pdfium/core/fpdfdoc/cpdf_color_utils \ + UnpackedTarball/pdfium/core/fpdfdoc/cpdf_icon \ )) # fpdftext @@ -418,6 +419,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxcrt/cfx_utf8encoder \ UnpackedTarball/pdfium/core/fxcrt/cfx_readonlymemorystream \ UnpackedTarball/pdfium/core/fxcrt/observed_ptr \ + UnpackedTarball/pdfium/core/fxcrt/string_data_template \ )) # fxge @@ -426,7 +428,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/dib/cfx_bitmapstorer \ UnpackedTarball/pdfium/core/fxge/dib/cfx_dibextractor \ UnpackedTarball/pdfium/core/fxge/dib/cfx_dibitmap \ - UnpackedTarball/pdfium/core/fxge/dib/cfx_filtereddib \ + 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 \ @@ -557,6 +559,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_oom \ UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_page \ UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_root_base \ + UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/random \ )) # skia_shared @@ -651,7 +654,7 @@ ifeq ($(OS),MACOSX) # fxge $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/apple/fx_apple_platform \ - UnpackedTarball/pdfium/core/fxge/apple/fx_mac_imp \ + UnpackedTarball/pdfium/core/fxge/apple/fx_mac_impl \ UnpackedTarball/pdfium/core/fxge/apple/fx_quartz_device \ )) @@ -668,7 +671,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\ UnpackedTarball/pdfium/core/fxge/android/cfpf_skiafont \ UnpackedTarball/pdfium/core/fxge/android/cfpf_skiafontmgr \ UnpackedTarball/pdfium/core/fxge/android/cfx_androidfontinfo \ - UnpackedTarball/pdfium/core/fxge/android/fx_android_imp \ + UnpackedTarball/pdfium/core/fxge/android/fx_android_impl \ UnpackedTarball/pdfium/core/fxge/android/cfpf_skiapathfont \ )) endif diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk index 8f493ea3a0d6..93d3fede6e3c 100644 --- a/external/pdfium/UnpackedTarball_pdfium.mk +++ b/external/pdfium/UnpackedTarball_pdfium.mk @@ -8,12 +8,12 @@ # pdfium_patches := -pdfium_patches += visibility.patch.1 pdfium_patches += ubsan.patch # Fixes build on our baseline. pdfium_patches += build.patch.1 # Avoids Windows 8 build dependency. pdfium_patches += windows7.patch.1 +pdfium_patches += c++20-comparison.patch $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium)) @@ -44,6 +44,7 @@ $(eval $(call gb_UnpackedTarball_set_post_action,pdfium,\ mv third_party/base/allocator/partition_allocator/partition_oom.cc third_party/base/allocator/partition_allocator/partition_oom.cpp && \ mv third_party/base/allocator/partition_allocator/partition_page.cc third_party/base/allocator/partition_allocator/partition_page.cpp && \ mv third_party/base/allocator/partition_allocator/partition_root_base.cc third_party/base/allocator/partition_allocator/partition_root_base.cpp && \ + mv third_party/base/allocator/partition_allocator/random.cc third_party/base/allocator/partition_allocator/random.cpp && \ mv third_party/base/win/win_util.cc third_party/base/win/win_util.cpp \ )) diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1 index 47316fe235a1..16544f0c7c81 100644 --- a/external/pdfium/build.patch.1 +++ b/external/pdfium/build.patch.1 @@ -1,24 +1,3 @@ -diff --git a/core/fxge/dib/cfx_imagetransformer.cpp b/core/fxge/dib/cfx_imagetransformer.cpp -index 8e01127b0..f4ce4d915 100644 ---- a/core/fxge/dib/cfx_imagetransformer.cpp -+++ b/core/fxge/dib/cfx_imagetransformer.cpp -@@ -315,14 +315,14 @@ bool CFX_ImageTransformer::Continue(IFX_PauseIndicator* pPause) { - } else if (pDestMask) { - CalcData cdata = { - pDestMask.Get(), result2stretch, pSrcMaskBuf, -- m_Storer.GetBitmap()->m_pAlphaMask->GetPitch(), -+ static_cast<uint32_t>(m_Storer.GetBitmap()->m_pAlphaMask->GetPitch()), - }; - CalcMask(cdata); - } - - CalcData cdata = {pTransformed.Get(), result2stretch, - m_Storer.GetBitmap()->GetBuffer(), -- m_Storer.GetBitmap()->GetPitch()}; -+ static_cast<uint32_t>(m_Storer.GetBitmap()->GetPitch())}; - if (m_Storer.GetBitmap()->IsAlphaMask()) { - CalcAlpha(cdata); - } else { diff --git a/core/fpdfdoc/cpdf_metadata.cpp b/core/fpdfdoc/cpdf_metadata.cpp index 323de4ffc..f11a0b0ad 100644 --- a/core/fpdfdoc/cpdf_metadata.cpp diff --git a/external/pdfium/c++20-comparison.patch b/external/pdfium/c++20-comparison.patch new file mode 100644 index 000000000000..025f9ba010db --- /dev/null +++ b/external/pdfium/c++20-comparison.patch @@ -0,0 +1,13 @@ +--- core/fxcrt/fx_memory_wrappers.h ++++ core/fxcrt/fx_memory_wrappers.h +@@ -70,8 +70,8 @@ + } + + // There's no state, so they are all the same, +- bool operator==(const FxAllocAllocator& that) { return true; } +- bool operator!=(const FxAllocAllocator& that) { return false; } ++ bool operator==(const FxAllocAllocator& that) const { return true; } ++ bool operator!=(const FxAllocAllocator& that) const { return false; } + }; + + #endif // CORE_FXCRT_FX_MEMORY_WRAPPERS_H_ diff --git a/external/pdfium/ubsan.patch b/external/pdfium/ubsan.patch index 1d03c28a4d15..8610e24f2828 100644 --- a/external/pdfium/ubsan.patch +++ b/external/pdfium/ubsan.patch @@ -1,14 +1,14 @@ ---- core/fxcrt/string_data_template.h -+++ core/fxcrt/string_data_template.h -@@ -76,7 +76,8 @@ class StringDataTemplate { - ASSERT(nLen >= 0); - ASSERT(offset + nLen <= m_nAllocLength); +--- core/fxcrt/string_data_template.cpp ++++ core/fxcrt/string_data_template.cpp +@@ -82,7 +82,8 @@ void StringDataTemplate<CharType>::CopyContentsAt(size_t offset, + ASSERT(nLen >= 0); + ASSERT(offset + nLen <= m_nAllocLength); -- memcpy(m_String + offset, pStr, nLen * sizeof(CharType)); -+ if (nLen != 0) -+ memcpy(m_String + offset, pStr, nLen * sizeof(CharType)); - m_String[offset + nLen] = 0; - } +- memcpy(m_String + offset, pStr, nLen * sizeof(CharType)); ++ if (nLen != 0) ++ memcpy(m_String + offset, pStr, nLen * sizeof(CharType)); + m_String[offset + nLen] = 0; + } --- core/fxge/cfx_glyphcache.cpp +++ core/fxge/cfx_glyphcache.cpp diff --git a/external/pdfium/visibility.patch.1 b/external/pdfium/visibility.patch.1 deleted file mode 100644 index 835528794f4b..000000000000 --- a/external/pdfium/visibility.patch.1 +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/public/fpdfview.h b/public/fpdfview.h -index 2b84f07ba..b6c0a356b 100644 ---- a/public/fpdfview.h -+++ b/public/fpdfview.h -@@ -168,7 +168,6 @@ typedef int FPDF_OBJECT_TYPE; - // Text object enums. - typedef int FPDF_TEXT_RENDERMODE; - --#if defined(COMPONENT_BUILD) - // FPDF_EXPORT should be consistent with |export| in the pdfium_fuzzer - // template in testing/fuzzers/BUILD.gn. - #if defined(WIN32) -@@ -184,9 +183,6 @@ typedef int FPDF_TEXT_RENDERMODE; - #define FPDF_EXPORT - #endif // defined(FPDF_IMPLEMENTATION) - #endif // defined(WIN32) --#else --#define FPDF_EXPORT --#endif // defined(COMPONENT_BUILD) - - #if defined(WIN32) && defined(FPDFSDK_EXPORTS) - #define FPDF_CALLCONV __stdcall diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in index 34b8a5f90bf9..95d49fb6a85c 100644 --- a/solenv/flatpak-manifest.in +++ b/solenv/flatpak-manifest.in @@ -93,10 +93,10 @@ "type": "shell" }, { - "url": "https://dev-www.libreoffice.org/src/pdfium-3963.tar.bz2", - "sha256": "80d4d6bd8faec226936fcde5521c6e92c0c645126ac3ae72dd2c160ca1749895", + "url": "https://dev-www.libreoffice.org/src/pdfium-4137.tar.bz2", + "sha256": "9a2f9bddca935a263f06c81003483473a525ccd0f4e517bc75fceb914d4c54b6", "type": "file", - "dest-filename": "external/tarballs/pdfium-3963.tar.bz2" + "dest-filename": "external/tarballs/pdfium-4137.tar.bz2" }, { "url": "https://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz", |