[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - download.lst external/pdfium RepositoryExternal.mk solenv/flatpak-manifest.in svx/source vcl/qa vcl/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Fri Sep 11 08:02:33 UTC 2020


 RepositoryExternal.mk                          |    1 +
 download.lst                                   |    4 ++--
 external/pdfium/Library_pdfium.mk              |   19 +++++++++++--------
 external/pdfium/UnpackedTarball_pdfium.mk      |    3 ++-
 external/pdfium/build.patch.1                  |   21 ---------------------
 external/pdfium/c++20-comparison.patch         |   13 +++++++++++++
 external/pdfium/inc/pch/precompiled_pdfium.hxx |   22 ++++++++++++++--------
 external/pdfium/ubsan.patch                    |   20 ++++++++++----------
 external/pdfium/visibility.patch.1             |   22 ----------------------
 solenv/flatpak-manifest.in                     |    6 +++---
 svx/source/svdraw/svdpdf.cxx                   |    1 +
 vcl/qa/cppunit/pdfexport/pdfexport.cxx         |   11 +++--------
 vcl/source/pdf/PDFiumLibrary.cxx               |    7 ++++---
 13 files changed, 64 insertions(+), 86 deletions(-)

New commits:
commit 2cd3ddad396043c8c1af2e03bd1c53db084ccbf0
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Tue Jan 14 21:34:52 2020 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Sep 11 10:02:00 2020 +0200

    external: update pdfium from 3963 to 4137
    
    This is a combination of 6 commits, which brings pdfium to the same
    version as libreoffice-7-0.
    
    This is the 1st commit message:
    
    external: update pdfium to 4021
    
    (cherry picked from commit 1cb70721ba00dd6c6958f0a10e39aa5c1866ec96)
    
    This is the commit message #2:
    
    external/pdfium: C++20 comparison operator fix
    
    Missing const leads to overload resolution ambiguity when a synthesized
    candidate of operator == for a reversed-argument rewrite conflicts with the
    actual operator ==, due to the asymmetric const-ness of the implicit object
    parameter and the RHS parameter:
    
    > In file included from workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.cpp:7:
    > In file included from workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.h:11:
    > llvm/inst/include/c++/v1/vector:1369:27: error: use of overloaded operator '!=' is ambiguous (with operand types 'std::__1::__vector_base<unsigned char, FxAllocAllocator<unsigned char> >::allocator_type' (aka 'FxAllocAllocator<unsigned char>') and 'std::__1::__vector_base<unsigned char, FxAllocAllocator<unsigned char> >::allocator_type')
    >     if (__base::__alloc() != __c.__alloc())
    >         ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~
    > llvm/inst/include/c++/v1/vector:1359:5: note: in instantiation of member function 'std::__1::vector<unsigned char, FxAllocAllocator<unsigned char> >::__move_assign' requested here
    >     __move_assign(__x, integral_constant<bool,
    >     ^
    > workdir/UnpackedTarball/pdfium/core/fxge/cfx_font.cpp:384:24: note: in instantiation of member function 'std::__1::vector<unsigned char, FxAllocAllocator<unsigned char> >::operator=' requested here
    >   m_FontDataAllocation = std::vector<uint8_t, FxAllocAllocator<uint8_t>>(
    >                        ^
    > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:74:8: note: candidate function
    >   bool operator!=(const FxAllocAllocator& that) { return false; }
    >        ^
    > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:73:8: note: candidate function
    >   bool operator==(const FxAllocAllocator& that) { return true; }
    >        ^
    > workdir/UnpackedTarball/pdfium/core/fxcrt/fx_memory_wrappers.h:73:8: note: candidate function (with reversed parameter order)
    
    (cherry picked from commit 6e0461d576d9f386e458f98f3c57f0ba385aacb4)
    
    This is the commit message #3:
    
    pdfium: don't patch out the COMPONENT_BUILD check, define it
    
    So next time we update, no need to adapt a failing patch.
    
    (cherry picked from commit 9b4ab9bda41a818832c721933986c9c6e07a6e6c)
    
    This is the commit message #4:
    
    make update_pch also consider files in <module>/src/**/inc
    
    With --enable-pch=full there's not much difference between a "public"
    header in <module>/inc and a private one in <module>/src/somewhere/inc .
    And since the script searches recursively, this apparently helps to
    find even more headers for lower pch levels.
    
    [ Just the pdfium part. ]
    
    (cherry picked from commit 69e0d871ec1de2260f9213d3113464155eac173c)
    
    This is the commit message #5:
    
    external: update pdfium to 4083
    
    (cherry picked from commit 9054c36d4ea3bee25fb9a47a96a0ea2cd07148c3)
    
    This is the commit message #6:
    
    external: update pdfium to 4137
    
    Conflicts:
            svx/source/svdraw/svdpdf.cxx
    
    (cherry picked from commit 1ffe59ef31186e36ad0aa7bbcdd32e407ee8d26c)
    
    Change-Id: Ib7c12461e04fa97bf55ee967e8d6c9bcf92fdf4a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102439
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 92dca6d4d04e..9c97d3af05f9 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4137,6 +4137,7 @@ define gb_LinkTarget__use_pdfium
 $(call gb_LinkTarget_set_include,$(1),\
        -I$(call gb_UnpackedTarball_get_dir,pdfium) \
        -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 50bd9fff7c2c..c30df0fb02d7 100644
--- a/download.lst
+++ b/download.lst
@@ -224,8 +224,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 f98a2d11269b..25bbfa195af1 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -31,6 +31,7 @@ $(eval $(call gb_Library_add_defs,pdfium,\
     -DMEMORY_TOOL_REPLACES_ALLOCATOR \
     -DUNICODE \
     -DWIN32_LEAN_AND_MEAN \
+    -DCOMPONENT_BUILD \
 ))
 
 $(eval $(call gb_Library_set_generated_cxx_suffix,pdfium,cpp))
@@ -74,6 +75,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
@@ -226,7 +228,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 \
@@ -267,7 +269,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 \
@@ -275,7 +277,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 \
 ))
 
@@ -284,7 +286,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 \
@@ -292,7 +293,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 \
@@ -315,6 +315,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
@@ -413,6 +414,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
@@ -421,7 +423,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 \
@@ -552,6 +554,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
@@ -646,7 +649,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 \
 ))
 
@@ -663,7 +666,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/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx
index d4d3b2f462a3..f1bb32ea8331 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 2019-05-21 17:15:06 using:
+ Generated on 2020-05-06 11:57:12 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:
@@ -65,6 +65,7 @@
 #endif // PCH_LEVEL >= 2
 #if PCH_LEVEL >= 3
 #include <build/build_config.h>
+#include <constants/access_permissions.h>
 #include <constants/annotation_common.h>
 #include <constants/annotation_flags.h>
 #include <constants/form_fields.h>
@@ -77,7 +78,7 @@
 #include <core/fpdfapi/cmaps/GB1/cmaps_gb1.h>
 #include <core/fpdfapi/cmaps/Japan1/cmaps_japan1.h>
 #include <core/fpdfapi/cmaps/Korea1/cmaps_korea1.h>
-#include <core/fpdfapi/cmaps/cmap_int.h>
+#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_pagecontentgenerator.h>
@@ -109,8 +110,7 @@
 #include <core/fpdfapi/page/cpdf_contentmarks.h>
 #include <core/fpdfapi/page/cpdf_contentparser.h>
 #include <core/fpdfapi/page/cpdf_devicecs.h>
-#include <core/fpdfapi/page/cpdf_dibbase.h>
-#include <core/fpdfapi/page/cpdf_dibtransferfunc.h>
+#include <core/fpdfapi/page/cpdf_dib.h>
 #include <core/fpdfapi/page/cpdf_docpagedata.h>
 #include <core/fpdfapi/page/cpdf_expintfunc.h>
 #include <core/fpdfapi/page/cpdf_form.h>
@@ -143,6 +143,7 @@
 #include <core/fpdfapi/page/cpdf_textstate.h>
 #include <core/fpdfapi/page/cpdf_tilingpattern.h>
 #include <core/fpdfapi/page/cpdf_transferfunc.h>
+#include <core/fpdfapi/page/cpdf_transferfuncdib.h>
 #include <core/fpdfapi/page/cpdf_transparency.h>
 #include <core/fpdfapi/parser/cfdf_document.h>
 #include <core/fpdfapi/parser/cpdf_array.h>
@@ -177,7 +178,7 @@
 #include <core/fpdfapi/parser/cpdf_syntax_parser.h>
 #include <core/fpdfapi/parser/fpdf_parser_decode.h>
 #include <core/fpdfapi/parser/fpdf_parser_utility.h>
-#include <core/fpdfapi/render/cpdf_charposlist.h>
+#include <core/fpdfapi/render/charposlist.h>
 #include <core/fpdfapi/render/cpdf_devicebuffer.h>
 #include <core/fpdfapi/render/cpdf_docrenderdata.h>
 #include <core/fpdfapi/render/cpdf_imagecacheentry.h>
@@ -188,6 +189,7 @@
 #include <core/fpdfapi/render/cpdf_progressiverenderer.h>
 #include <core/fpdfapi/render/cpdf_rendercontext.h>
 #include <core/fpdfapi/render/cpdf_renderoptions.h>
+#include <core/fpdfapi/render/cpdf_rendershading.h>
 #include <core/fpdfapi/render/cpdf_renderstatus.h>
 #include <core/fpdfapi/render/cpdf_scaledrenderbuffer.h>
 #include <core/fpdfapi/render/cpdf_textrenderer.h>
@@ -197,7 +199,6 @@
 #include <core/fpdfdoc/cline.h>
 #include <core/fpdfdoc/cpdf_aaction.h>
 #include <core/fpdfdoc/cpdf_action.h>
-#include <core/fpdfdoc/cpdf_actionfields.h>
 #include <core/fpdfdoc/cpdf_annot.h>
 #include <core/fpdfdoc/cpdf_annotlist.h>
 #include <core/fpdfdoc/cpdf_apsettings.h>
@@ -206,10 +207,10 @@
 #include <core/fpdfdoc/cpdf_color_utils.h>
 #include <core/fpdfdoc/cpdf_defaultappearance.h>
 #include <core/fpdfdoc/cpdf_dest.h>
-#include <core/fpdfdoc/cpdf_docjsactions.h>
 #include <core/fpdfdoc/cpdf_filespec.h>
 #include <core/fpdfdoc/cpdf_formcontrol.h>
 #include <core/fpdfdoc/cpdf_formfield.h>
+#include <core/fpdfdoc/cpdf_icon.h>
 #include <core/fpdfdoc/cpdf_iconfit.h>
 #include <core/fpdfdoc/cpdf_interactiveform.h>
 #include <core/fpdfdoc/cpdf_link.h>
@@ -307,6 +308,7 @@
 #include <core/fxcrt/fx_coordinates.h>
 #include <core/fxcrt/fx_extension.h>
 #include <core/fxcrt/fx_memory.h>
+#include <core/fxcrt/fx_memory_wrappers.h>
 #include <core/fxcrt/fx_number.h>
 #include <core/fxcrt/fx_random.h>
 #include <core/fxcrt/fx_safe_types.h>
@@ -318,6 +320,7 @@
 #include <core/fxcrt/observed_ptr.h>
 #include <core/fxcrt/pauseindicator_iface.h>
 #include <core/fxcrt/retain_ptr.h>
+#include <core/fxcrt/string_data_template.h>
 #include <core/fxcrt/string_pool_template.h>
 #include <core/fxcrt/unowned_ptr.h>
 #include <core/fxcrt/widestring.h>
@@ -332,6 +335,7 @@
 #include <core/fxge/cfx_cliprgn.h>
 #include <core/fxge/cfx_color.h>
 #include <core/fxge/cfx_defaultrenderdevice.h>
+#include <core/fxge/cfx_drawutils.h>
 #include <core/fxge/cfx_face.h>
 #include <core/fxge/cfx_folderfontinfo.h>
 #include <core/fxge/cfx_font.h>
@@ -353,7 +357,6 @@
 #include <core/fxge/dib/cfx_dibbase.h>
 #include <core/fxge/dib/cfx_dibextractor.h>
 #include <core/fxge/dib/cfx_dibitmap.h>
-#include <core/fxge/dib/cfx_filtereddib.h>
 #include <core/fxge/dib/cfx_imagerenderer.h>
 #include <core/fxge/dib/cfx_imagestretcher.h>
 #include <core/fxge/dib/cfx_imagetransformer.h>
@@ -386,6 +389,7 @@
 #include <fpdfsdk/cpdfsdk_interactiveform.h>
 #include <fpdfsdk/cpdfsdk_pageview.h>
 #include <fpdfsdk/cpdfsdk_pauseadapter.h>
+#include <fpdfsdk/cpdfsdk_renderpage.h>
 #include <fpdfsdk/cpdfsdk_widget.h>
 #include <fpdfsdk/cpdfsdk_widgethandler.h>
 #include <fpdfsdk/formfiller/cffl_button.h>
@@ -454,11 +458,13 @@
 #include <third_party/base/allocator/partition_allocator/partition_oom.h>
 #include <third_party/base/allocator/partition_allocator/partition_page.h>
 #include <third_party/base/allocator/partition_allocator/partition_root_base.h>
+#include <third_party/base/allocator/partition_allocator/random.h>
 #include <third_party/base/allocator/partition_allocator/spin_lock.h>
 #include <third_party/base/bits.h>
 #include <third_party/base/compiler_specific.h>
 #include <third_party/base/debug/alias.h>
 #include <third_party/base/logging.h>
+#include <third_party/base/no_destructor.h>
 #include <third_party/base/numerics/safe_conversions.h>
 #include <third_party/base/numerics/safe_math.h>
 #include <third_party/base/optional.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 3f6c42e12f7f..cb1290461563 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -69,10 +69,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",
diff --git a/svx/source/svdraw/svdpdf.cxx b/svx/source/svdraw/svdpdf.cxx
index 62bebbf4ce3b..99db32ea8a8f 100644
--- a/svx/source/svdraw/svdpdf.cxx
+++ b/svx/source/svdraw/svdpdf.cxx
@@ -787,6 +787,7 @@ void ImpSdrPdfImport::ImportText(std::unique_ptr<vcl::pdf::PDFiumPageObject> con
             break;
         case FPDF_TEXTRENDERMODE_STROKE:
         case FPDF_TEXTRENDERMODE_STROKE_CLIP:
+        case FPDF_TEXTRENDERMODE_UNKNOWN:
             break;
         case FPDF_TEXTRENDERMODE_INVISIBLE:
         case FPDF_TEXTRENDERMODE_CLIP:
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index c3ced2741c6d..190e26cce19b 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -1982,14 +1982,9 @@ void PdfExportTest::testPdfImageResourceInlineXObjectRef()
     CPPUNIT_ASSERT_EQUAL(1, FPDFFormObj_CountObjects(pInnerFormObject));
     FPDF_PAGEOBJECT pImage = FPDFFormObj_GetObject(pInnerFormObject, 0);
     CPPUNIT_ASSERT_EQUAL(FPDF_PAGEOBJ_IMAGE, FPDFPageObj_GetType(pImage));
-    double fA = 0;
-    double fB = 0;
-    double fC = 0;
-    double fD = 0;
-    double fE = 0;
-    double fF = 0;
-    FPDFFormObj_GetMatrix(pInnerFormObject, &fA, &fB, &fC, &fD, &fE, &fF);
-    basegfx::B2DHomMatrix aMat{ fA, fC, fE, fB, fD, fF };
+    FS_MATRIX aMatrix;
+    FPDFFormObj_GetMatrix(pInnerFormObject, &aMatrix);
+    basegfx::B2DHomMatrix aMat{ aMatrix.a, aMatrix.c, aMatrix.e, aMatrix.b, aMatrix.d, aMatrix.f };
     basegfx::B2DTuple aScale;
     basegfx::B2DTuple aTranslate;
     double fRotate = 0;
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 33c8e41a8fd5..952a1e2803ca 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -259,9 +259,10 @@ std::unique_ptr<PDFiumPageObject> PDFiumPageObject::getFormObject(int nIndex)
 basegfx::B2DHomMatrix PDFiumPageObject::getMatrix()
 {
     basegfx::B2DHomMatrix aB2DMatrix;
-    double a, b, c, d, e, f;
-    if (FPDFTextObj_GetMatrix(mpPageObject, &a, &b, &c, &d, &e, &f))
-        aB2DMatrix = basegfx::B2DHomMatrix::abcdef(a, b, c, d, e, f);
+    FS_MATRIX matrix;
+    if (FPDFTextObj_GetMatrix(mpPageObject, &matrix))
+        aB2DMatrix = basegfx::B2DHomMatrix::abcdef(matrix.a, matrix.b, matrix.c, matrix.d, matrix.e,
+                                                   matrix.f);
     return aB2DMatrix;
 }
 


More information about the Libreoffice-commits mailing list