[Libreoffice-commits] core.git: download.lst external/pdfium solenv/flatpak-manifest.in vcl/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 23 06:12:31 UTC 2021


 download.lst                                   |    4 
 external/pdfium/Library_pdfium.mk              |   11 +
 external/pdfium/build.patch.1                  |  168 +++++++++----------------
 external/pdfium/cg-instead-of-carbon.patch.1   |    2 
 external/pdfium/inc/pch/precompiled_pdfium.hxx |   16 +-
 solenv/flatpak-manifest.in                     |    6 
 vcl/source/pdf/PDFiumLibrary.cxx               |    4 
 7 files changed, 89 insertions(+), 122 deletions(-)

New commits:
commit 8cecaa622700cecb5b5776bd3e5360ac6cc3dd63
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Sep 22 20:09:04 2021 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Sep 23 08:11:55 2021 +0200

    external: update pdfium to 4643
    
    Change-Id: I4e86b163a9abef88f26c6c0ae91ae0a4008658f1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122485
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>

diff --git a/download.lst b/download.lst
index da331797a1f4..f816e785f176 100644
--- a/download.lst
+++ b/download.lst
@@ -208,8 +208,8 @@ export ORCUS_SHA256SUM := c700d1325f744104d9fca0d5a019434901e9d51a16eedfb05792f9
 export ORCUS_TARBALL := liborcus-0.16.1.tar.bz2
 export PAGEMAKER_SHA256SUM := 66adacd705a7d19895e08eac46d1e851332adf2e736c566bef1164e7a442519d
 export PAGEMAKER_TARBALL := libpagemaker-0.0.4.tar.xz
-export PDFIUM_SHA256SUM := b0c5725e1cdcef7f52f068fd33adf9e8d833a271c28ba5b6a5a576ef8f2bbbf4
-export PDFIUM_TARBALL := pdfium-4568.tar.bz2
+export PDFIUM_SHA256SUM := eb98a77eaaab9e9e8de541cfd18b9438dd3c538bd5ef163820353179727f5dc9
+export PDFIUM_TARBALL := pdfium-4643.tar.bz2
 export PIXMAN_SHA256SUM := 6d200dec3740d9ec4ec8d1180e25779c00bc749f94278c8b9021f5534db223fc
 export PIXMAN_TARBALL := pixman-0.40.0.tar.gz
 export LIBPNG_SHA256SUM := 505e70834d35383537b6491e7ae8641f1a4bed1876dbfe361201fc80868d88ca
diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk
index 1cec5c19573d..8b55628fd30f 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -58,7 +58,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_actionhandler \
     UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_annotiterator \
     UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_customaccess \
-    UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_fieldaction \
     UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_filewriteadapter \
     UnpackedTarball/pdfium/fpdfsdk/cpdfsdk_helpers \
     UnpackedTarball/pdfium/fpdfsdk/fpdf_annot \
@@ -104,7 +103,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_textfield \
     UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_button \
     UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_textobject \
-    UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_privatedata \
+    UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_fieldaction \
+    UnpackedTarball/pdfium/fpdfsdk/formfiller/cffl_perwindowdata \
 ))
 
 # fpdfapi
@@ -288,6 +288,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fpdfapi/render/cpdf_pagerendercontext \
     UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfuncdib \
     UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_transferfunc \
+    UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_basedcs \
 ))
 
 # fpdfdoc
@@ -363,7 +364,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fxcodec/jbig2/JBig2_DocumentContext \
     UnpackedTarball/pdfium/core/fxcodec/basic/basicmodule \
     UnpackedTarball/pdfium/core/fxcodec/flate/flatemodule \
-    UnpackedTarball/pdfium/core/fxcodec/icc/iccmodule \
+    UnpackedTarball/pdfium/core/fxcodec/icc/icc_transform \
     UnpackedTarball/pdfium/core/fxcodec/jbig2/jbig2_decoder \
     UnpackedTarball/pdfium/core/fxcodec/jpeg/jpeg_common \
 ))
@@ -615,12 +616,14 @@ $(eval $(call gb_Library_add_generated_cobjects,pdfium,\
     UnpackedTarball/pdfium/third_party/freetype/src/src/truetype/truetype \
     UnpackedTarball/pdfium/third_party/freetype/src/src/type1/type1 \
     UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftdebug \
+    UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftfstype \
 ))
 endif
 
 ifneq ($(OS),WNT)
 $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fxcrt/cfx_fileaccess_posix \
+    UnpackedTarball/pdfium/core/fxcrt/fx_folder_posix \
 ))
 endif
 
@@ -636,8 +639,10 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fxge/win32/cps_printer_driver \
     UnpackedTarball/pdfium/core/fxge/win32/ctext_only_printer_driver \
     UnpackedTarball/pdfium/core/fxge/win32/cwin32_platform \
+    UnpackedTarball/pdfium/core/fxge/win32/cfx_psfonttracker \
     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/fpdfapi/render/cpdf_windowsrenderdevice \
 ))
diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1
index b4c69ba00f84..fce8874af8bd 100644
--- a/external/pdfium/build.patch.1
+++ b/external/pdfium/build.patch.1
@@ -38,109 +38,6 @@ index 0fb627ba8..dda1fc8bc 100644
    template <
        typename Container,
 diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp
-index c66985a7f..9c1122b75 100644
---- a/core/fxcodec/jpx/cjpx_decoder.cpp
-+++ b/core/fxcodec/jpx/cjpx_decoder.cpp
-@@ -6,6 +6,8 @@
- 
- #include "core/fxcodec/jpx/cjpx_decoder.h"
- 
-+#include <string.h>
-+
- #include <algorithm>
- #include <limits>
- #include <utility>
-diff --git a/core/fxcodec/jpeg/jpegmodule.cpp b/core/fxcodec/jpeg/jpegmodule.cpp
-index cea0679aa..036f25003 100644
---- a/core/fxcodec/jpeg/jpegmodule.cpp
-+++ b/core/fxcodec/jpeg/jpegmodule.cpp
-@@ -7,6 +7,7 @@
- #include "core/fxcodec/jpeg/jpegmodule.h"
- 
- #include <setjmp.h>
-+#include <string.h>
- 
- #include <memory>
- #include <utility>
-diff --git a/core/fxge/dib/cfx_bitmapcomposer.cpp b/core/fxge/dib/cfx_bitmapcomposer.cpp
-index 6f9b42013..0f1ffae2c 100644
---- a/core/fxge/dib/cfx_bitmapcomposer.cpp
-+++ b/core/fxge/dib/cfx_bitmapcomposer.cpp
-@@ -6,6 +6,8 @@
- 
- #include "core/fxge/dib/cfx_bitmapcomposer.h"
- 
-+#include <string.h>
-+
- #include "core/fxge/cfx_cliprgn.h"
- #include "core/fxge/dib/cfx_dibitmap.h"
- 
-diff --git a/core/fxge/dib/cfx_dibitmap.cpp b/core/fxge/dib/cfx_dibitmap.cpp
-index d7ccf6cfa..94e8accdd 100644
---- a/core/fxge/dib/cfx_dibitmap.cpp
-+++ b/core/fxge/dib/cfx_dibitmap.cpp
-@@ -6,6 +6,8 @@
- 
- #include "core/fxge/dib/cfx_dibitmap.h"
- 
-+#include <string.h>
-+
- #include <limits>
- #include <memory>
- #include <utility>
-diff --git a/core/fxge/dib/cfx_bitmapstorer.cpp b/core/fxge/dib/cfx_bitmapstorer.cpp
-index f57c00eaa..45a0a180c 100644
---- a/core/fxge/dib/cfx_bitmapstorer.cpp
-+++ b/core/fxge/dib/cfx_bitmapstorer.cpp
-@@ -6,6 +6,8 @@
- 
- #include "core/fxge/dib/cfx_bitmapstorer.h"
- 
-+#include <string.h>
-+
- #include <utility>
- 
- #include "core/fxge/dib/cfx_dibitmap.h"
-diff --git a/core/fxge/cfx_cliprgn.cpp b/core/fxge/cfx_cliprgn.cpp
-index 5369d522c..d198852e3 100644
---- a/core/fxge/cfx_cliprgn.cpp
-+++ b/core/fxge/cfx_cliprgn.cpp
-@@ -6,6 +6,8 @@
- 
- #include "core/fxge/cfx_cliprgn.h"
- 
-+#include <string.h>
-+
- #include <utility>
- 
- #include "core/fxge/dib/cfx_dibitmap.h"
-diff --git a/core/fxge/dib/cfx_scanlinecompositor.cpp b/core/fxge/dib/cfx_scanlinecompositor.cpp
-index e8362d708..c04c6dcab 100644
---- a/core/fxge/dib/cfx_scanlinecompositor.cpp
-+++ b/core/fxge/dib/cfx_scanlinecompositor.cpp
-@@ -6,6 +6,8 @@
- 
- #include "core/fxge/dib/cfx_scanlinecompositor.h"
- 
-+#include <string.h>
-+
- #include <algorithm>
- 
- #include "core/fxge/dib/fx_dib.h"
-diff --git a/core/fxge/dib/cfx_dibbase.cpp b/core/fxge/dib/cfx_dibbase.cpp
-index 4ec0ddbf9..a1de2fbec 100644
---- a/core/fxge/dib/cfx_dibbase.cpp
-+++ b/core/fxge/dib/cfx_dibbase.cpp
-@@ -6,6 +6,8 @@
- 
- #include "core/fxge/dib/cfx_dibbase.h"
- 
-+#include <string.h>
-+
- #include <algorithm>
- #include <memory>
- #include <utility>
-diff --git a/core/fxcodec/jpx/cjpx_decoder.cpp b/core/fxcodec/jpx/cjpx_decoder.cpp
 index c66985a7f..817f81dfa 100644
 --- a/core/fxcodec/jpx/cjpx_decoder.cpp
 +++ b/core/fxcodec/jpx/cjpx_decoder.cpp
@@ -153,3 +50,68 @@ index c66985a7f..817f81dfa 100644
  }
  
  void sycc_to_rgb(int offset,
+diff --git a/core/fdrm/fx_crypt_aes.cpp b/core/fdrm/fx_crypt_aes.cpp
+index f2170220b..ede18f581 100644
+--- a/core/fdrm/fx_crypt_aes.cpp
++++ b/core/fdrm/fx_crypt_aes.cpp
+@@ -437,7 +437,7 @@ const unsigned int D3[256] = {
+   (block[0] ^= *keysched++, block[1] ^= *keysched++, block[2] ^= *keysched++, \
+    block[3] ^= *keysched++)
+ #define MOVEWORD(i) (block[i] = newstate[i])
+-#define MAKEWORD(i)                                         \
++#define FMAKEWORD(i)                                         \
+   (newstate[i] = (E0[(block[i] >> 24) & 0xFF] ^             \
+                   E1[(block[(i + C1) % Nb] >> 16) & 0xFF] ^ \
+                   E2[(block[(i + C2) % Nb] >> 8) & 0xFF] ^  \
+@@ -458,10 +458,10 @@ void aes_encrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
+   unsigned int newstate[4];
+   for (i = 0; i < ctx->Nr - 1; i++) {
+     ADD_ROUND_KEY_4();
+-    MAKEWORD(0);
+-    MAKEWORD(1);
+-    MAKEWORD(2);
+-    MAKEWORD(3);
++    FMAKEWORD(0);
++    FMAKEWORD(1);
++    FMAKEWORD(2);
++    FMAKEWORD(3);
+     MOVEWORD(0);
+     MOVEWORD(1);
+     MOVEWORD(2);
+@@ -478,10 +478,10 @@ void aes_encrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
+   MOVEWORD(3);
+   ADD_ROUND_KEY_4();
+ }
+-#undef MAKEWORD
++#undef FMAKEWORD
+ #undef LASTWORD
+ 
+-#define MAKEWORD(i)                                         \
++#define FMAKEWORD(i)                                         \
+   (newstate[i] = (D0[(block[i] >> 24) & 0xFF] ^             \
+                   D1[(block[(i + C1) % Nb] >> 16) & 0xFF] ^ \
+                   D2[(block[(i + C2) % Nb] >> 8) & 0xFF] ^  \
+@@ -502,10 +502,10 @@ void aes_decrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
+   unsigned int newstate[4];
+   for (i = 0; i < ctx->Nr - 1; i++) {
+     ADD_ROUND_KEY_4();
+-    MAKEWORD(0);
+-    MAKEWORD(1);
+-    MAKEWORD(2);
+-    MAKEWORD(3);
++    FMAKEWORD(0);
++    FMAKEWORD(1);
++    FMAKEWORD(2);
++    FMAKEWORD(3);
+     MOVEWORD(0);
+     MOVEWORD(1);
+     MOVEWORD(2);
+@@ -522,7 +522,7 @@ void aes_decrypt_nb_4(CRYPT_aes_context* ctx, unsigned int* block) {
+   MOVEWORD(3);
+   ADD_ROUND_KEY_4();
+ }
+-#undef MAKEWORD
++#undef FMAKEWORD
+ #undef LASTWORD
+ 
+ void aes_setup(CRYPT_aes_context* ctx, const unsigned char* key, int keylen) {
diff --git a/external/pdfium/cg-instead-of-carbon.patch.1 b/external/pdfium/cg-instead-of-carbon.patch.1
index 13f631533169..23a41a99f1da 100644
--- a/external/pdfium/cg-instead-of-carbon.patch.1
+++ b/external/pdfium/cg-instead-of-carbon.patch.1
@@ -7,8 +7,8 @@
  
 -#include <Carbon/Carbon.h>
 +#include <CoreGraphics/CoreGraphics.h>
+ #include <stdint.h>
  
- #include "core/fxcrt/fx_system.h"
  #include "core/fxcrt/retain_ptr.h"
 --- a/core/fpdfapi/font/cpdf_type1font.cpp
 +++ b/core/fpdfapi/font/cpdf_type1font.cpp
diff --git a/external/pdfium/inc/pch/precompiled_pdfium.hxx b/external/pdfium/inc/pch/precompiled_pdfium.hxx
index f01e704c7ee4..83e1ff915b2f 100644
--- a/external/pdfium/inc/pch/precompiled_pdfium.hxx
+++ b/external/pdfium/inc/pch/precompiled_pdfium.hxx
@@ -33,13 +33,10 @@
 #include <array>
 #include <atomic>
 #include <cassert>
-#include <cctype>
 #include <cfloat>
 #include <climits>
 #include <cmath>
-#include <cstring>
-#include <cwchar>
-#include <cwctype>
+#include <ctype.h>
 #include <functional>
 #include <iterator>
 #include <limits.h>
@@ -64,6 +61,7 @@
 #include <type_traits>
 #include <utility>
 #include <vector>
+#include <wchar.h>
 #endif // PCH_LEVEL >= 1
 #if PCH_LEVEL >= 2
 #endif // PCH_LEVEL >= 2
@@ -73,6 +71,7 @@
 #include <constants/annotation_common.h>
 #include <constants/annotation_flags.h>
 #include <constants/appearance.h>
+#include <constants/ascii.h>
 #include <constants/form_fields.h>
 #include <constants/form_flags.h>
 #include <constants/page_object.h>
@@ -107,6 +106,7 @@
 #include <core/fpdfapi/font/cpdf_type3font.h>
 #include <core/fpdfapi/page/cpdf_allstates.h>
 #include <core/fpdfapi/page/cpdf_annotcontext.h>
+#include <core/fpdfapi/page/cpdf_basedcs.h>
 #include <core/fpdfapi/page/cpdf_clippath.h>
 #include <core/fpdfapi/page/cpdf_color.h>
 #include <core/fpdfapi/page/cpdf_colorspace.h>
@@ -245,7 +245,7 @@
 #include <core/fxcodec/fx_codec.h>
 #include <core/fxcodec/gif/cfx_gif.h>
 #include <core/fxcodec/gif/lzw_decompressor.h>
-#include <core/fxcodec/icc/iccmodule.h>
+#include <core/fxcodec/icc/icc_transform.h>
 #include <core/fxcodec/jbig2/JBig2_ArithDecoder.h>
 #include <core/fxcodec/jbig2/JBig2_ArithIntDecoder.h>
 #include <core/fxcodec/jbig2/JBig2_BitStream.h>
@@ -310,6 +310,7 @@
 #include <core/fxcrt/fx_codepage.h>
 #include <core/fxcrt/fx_coordinates.h>
 #include <core/fxcrt/fx_extension.h>
+#include <core/fxcrt/fx_folder.h>
 #include <core/fxcrt/fx_memory.h>
 #include <core/fxcrt/fx_memory_wrappers.h>
 #include <core/fxcrt/fx_number.h>
@@ -389,7 +390,6 @@
 #include <fpdfsdk/cpdfsdk_baannot.h>
 #include <fpdfsdk/cpdfsdk_baannothandler.h>
 #include <fpdfsdk/cpdfsdk_customaccess.h>
-#include <fpdfsdk/cpdfsdk_fieldaction.h>
 #include <fpdfsdk/cpdfsdk_filewriteadapter.h>
 #include <fpdfsdk/cpdfsdk_formfillenvironment.h>
 #include <fpdfsdk/cpdfsdk_helpers.h>
@@ -402,10 +402,11 @@
 #include <fpdfsdk/formfiller/cffl_button.h>
 #include <fpdfsdk/formfiller/cffl_checkbox.h>
 #include <fpdfsdk/formfiller/cffl_combobox.h>
+#include <fpdfsdk/formfiller/cffl_fieldaction.h>
 #include <fpdfsdk/formfiller/cffl_formfield.h>
 #include <fpdfsdk/formfiller/cffl_interactiveformfiller.h>
 #include <fpdfsdk/formfiller/cffl_listbox.h>
-#include <fpdfsdk/formfiller/cffl_privatedata.h>
+#include <fpdfsdk/formfiller/cffl_perwindowdata.h>
 #include <fpdfsdk/formfiller/cffl_pushbutton.h>
 #include <fpdfsdk/formfiller/cffl_radiobutton.h>
 #include <fpdfsdk/formfiller/cffl_textfield.h>
@@ -484,7 +485,6 @@
 #include <third_party/base/memory/aligned_memory.h>
 #include <third_party/base/no_destructor.h>
 #include <third_party/base/notreached.h>
-#include <third_party/base/numerics/ranges.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/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 70eaa31627d1..7b6ce9f6c2b0 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -75,11 +75,11 @@
                     "type": "shell"
                 },
                 {
-                    "url": "https://dev-www.libreoffice.org/src/pdfium-4568.tar.bz2",
-                    "sha256": "b0c5725e1cdcef7f52f068fd33adf9e8d833a271c28ba5b6a5a576ef8f2bbbf4",
+                    "url": "https://dev-www.libreoffice.org/src/pdfium-4643.tar.bz2",
+                    "sha256": "eb98a77eaaab9e9e8de541cfd18b9438dd3c538bd5ef163820353179727f5dc9",
                     "type": "file",
                     "dest": "external/tarballs",
-                    "dest-filename": "pdfium-4568.tar.bz2"
+                    "dest-filename": "pdfium-4643.tar.bz2"
                 },
                 {
                     "url": "https://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz",
diff --git a/vcl/source/pdf/PDFiumLibrary.cxx b/vcl/source/pdf/PDFiumLibrary.cxx
index 28b8e8f3e309..3766330b9481 100644
--- a/vcl/source/pdf/PDFiumLibrary.cxx
+++ b/vcl/source/pdf/PDFiumLibrary.cxx
@@ -742,8 +742,8 @@ OUString PDFiumPageObjectImpl::getText(std::unique_ptr<PDFiumTextPage> const& rT
 
     std::unique_ptr<sal_Unicode[]> pText(new sal_Unicode[nBytes]);
 
-    int nActualBytes
-        = FPDFTextObj_GetText(mpPageObject, pTextPage->getPointer(), pText.get(), nBytes * 2);
+    int nActualBytes = FPDFTextObj_GetText(mpPageObject, pTextPage->getPointer(),
+                                           reinterpret_cast<FPDF_WCHAR*>(pText.get()), nBytes * 2);
     assert(nActualBytes % 2 == 0);
     nActualBytes /= 2;
     if (nActualBytes > 1)


More information about the Libreoffice-commits mailing list