[Libreoffice-commits] core.git: download.lst external/pdfium

Miklos Vajna vmiklos at collabora.co.uk
Wed Jan 10 13:35:44 UTC 2018


 download.lst                              |    4 ++--
 external/pdfium/Library_pdfium.mk         |   10 +++++++---
 external/pdfium/UnpackedTarball_pdfium.mk |    2 ++
 external/pdfium/build.patch.1             |   21 +++++++++++++++++++++
 external/pdfium/ubsan.patch               |    8 ++++----
 5 files changed, 36 insertions(+), 9 deletions(-)

New commits:
commit e1026e267b4b1b0b0bd645c6bc212d6fa71544f8
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jan 10 09:17:28 2018 +0100

    pdfium: update to 3312
    
    Change-Id: I3e81c097870264bfcdd8c14407dcb95f5b153793
    Reviewed-on: https://gerrit.libreoffice.org/47689
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/download.lst b/download.lst
index 988c601ece06..f574617147c9 100644
--- a/download.lst
+++ b/download.lst
@@ -196,8 +196,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 := 7dc0d33fc24b1612865f5e173d48800ba3f2db891c57e3f92b9d2ce56ffeb72f
-export PDFIUM_TARBALL := pdfium-3235.tar.bz2
+export PDFIUM_SHA256SUM := baa103ab9b72cf3be5ae80106e7ca56110a150fc60a9a3d897e5b26631355b0f
+export PDFIUM_TARBALL := pdfium-3312.tar.bz2
 export PIXMAN_SHA256SUM := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e
 export PIXMAN_TARBALL := e80ebae4da01e77f68744319f01d52a3-pixman-0.34.0.tar.gz
 export LIBPNG_SHA256SUM := 2f1e960d92ce3b3abd03d06dfec9637dfbd22febf107a536b44f7a47c60659f6
diff --git a/external/pdfium/Library_pdfium.mk b/external/pdfium/Library_pdfium.mk
index 9bc2d67b400f..a508d83be107 100644
--- a/external/pdfium/Library_pdfium.mk
+++ b/external/pdfium/Library_pdfium.mk
@@ -76,6 +76,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/fpdfsdk/fsdk_filewriteadapter \
     UnpackedTarball/pdfium/fpdfsdk/fpdfannot \
     UnpackedTarball/pdfium/fpdfsdk/fpdfattachment \
+    UnpackedTarball/pdfium/fpdfsdk/fpdfcatalog \
 ))
 
 # fdrm
@@ -272,6 +273,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fpdfapi/page/cpdf_stitchfunc \
     UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_object_avail \
     UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_page_object_avail \
+    UnpackedTarball/pdfium/core/fpdfapi/parser/cpdf_cross_ref_avail \
 ))
 
 # fpdfdoc
@@ -302,7 +304,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fpdfdoc/cpdf_pagelabel \
     UnpackedTarball/pdfium/core/fpdfdoc/cpdf_variabletext \
     UnpackedTarball/pdfium/core/fpdfdoc/cpdf_viewerpreferences \
-    UnpackedTarball/pdfium/core/fpdfdoc/cpvt_color \
     UnpackedTarball/pdfium/core/fpdfdoc/cpvt_fontmap \
     UnpackedTarball/pdfium/core/fpdfdoc/cpvt_generateap \
     UnpackedTarball/pdfium/core/fpdfdoc/cpvt_wordinfo \
@@ -367,7 +368,6 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fxcrt/fx_ucddata \
     UnpackedTarball/pdfium/core/fxcrt/fx_unicode \
     UnpackedTarball/pdfium/core/fxcrt/xml/cxml_attritem \
-    UnpackedTarball/pdfium/core/fxcrt/xml/cxml_attrmap \
     UnpackedTarball/pdfium/core/fxcrt/xml/cxml_databufacc \
     UnpackedTarball/pdfium/core/fxcrt/xml/cxml_element \
     UnpackedTarball/pdfium/core/fxcrt/xml/cxml_parser \
@@ -405,6 +405,7 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
     UnpackedTarball/pdfium/core/fxcrt/fx_random \
     UnpackedTarball/pdfium/core/fxcrt/fx_string \
     UnpackedTarball/pdfium/core/fxcrt/widestring \
+    UnpackedTarball/pdfium/core/fxcrt/cfx_seekablemultistream \
 ))
 
 # fxge
@@ -463,7 +464,8 @@ $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
 
 # javascript, build with pdf_enable_v8 disabled.
 $(eval $(call gb_Library_add_generated_exception_objects,pdfium,\
-    UnpackedTarball/pdfium/fpdfsdk/javascript/JS_Runtime_Stub \
+    UnpackedTarball/pdfium/fxjs/cjs_event_context_stub \
+    UnpackedTarball/pdfium/fxjs/cjs_runtimestub \
 ))
 
 # pwl
@@ -524,6 +526,7 @@ $(eval $(call gb_Library_add_generated_cobjects,pdfium,\
     UnpackedTarball/pdfium/third_party/libopenjpeg20/t2 \
     UnpackedTarball/pdfium/third_party/libopenjpeg20/tcd \
     UnpackedTarball/pdfium/third_party/libopenjpeg20/tgt \
+    UnpackedTarball/pdfium/third_party/libopenjpeg20/sparse_array \
 ))
 
 # pdfium_base
@@ -574,6 +577,7 @@ $(eval $(call gb_Library_add_generated_cobjects,pdfium,\
     UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftlcdfil \
     UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftmm \
     UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftsystem \
+    UnpackedTarball/pdfium/third_party/freetype/src/src/base/ftfntfmt \
     UnpackedTarball/pdfium/third_party/freetype/src/src/cff/cff \
     UnpackedTarball/pdfium/third_party/freetype/src/src/cid/type1cid \
     UnpackedTarball/pdfium/third_party/freetype/src/src/psaux/psaux \
diff --git a/external/pdfium/UnpackedTarball_pdfium.mk b/external/pdfium/UnpackedTarball_pdfium.mk
index c3a48dce9583..47c38d70291c 100644
--- a/external/pdfium/UnpackedTarball_pdfium.mk
+++ b/external/pdfium/UnpackedTarball_pdfium.mk
@@ -11,6 +11,8 @@ pdfium_patches :=
 pdfium_patches += visibility.patch.1
 pdfium_patches += ubsan.patch
 pdfium_patches += freetype.patch.1
+# Fixes build on our baseline.
+pdfium_patches += build.patch.1
 
 $(eval $(call gb_UnpackedTarball_UnpackedTarball,pdfium))
 
diff --git a/external/pdfium/build.patch.1 b/external/pdfium/build.patch.1
new file mode 100644
index 000000000000..b852383ff84b
--- /dev/null
+++ b/external/pdfium/build.patch.1
@@ -0,0 +1,21 @@
+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/external/pdfium/ubsan.patch b/external/pdfium/ubsan.patch
index 7e4e2e9276a8..56f47840ae88 100644
--- a/external/pdfium/ubsan.patch
+++ b/external/pdfium/ubsan.patch
@@ -23,16 +23,16 @@
  
 --- core/fxge/cfx_facecache.cpp
 +++ core/fxge/cfx_facecache.cpp
-@@ -223,7 +223,8 @@ std::unique_ptr<CFX_GlyphBitmap> CFX_FaceCache::RenderGlyph(
+@@ -183,7 +183,8 @@ std::unique_ptr<CFX_GlyphBitmap> CFX_FaceCache::RenderGlyph(
        }
      }
    } else {
 -    memset(pDestBuf, 0, dest_pitch * bmheight);
 +    if (dest_pitch != 0 && bmheight != 0)
 +      memset(pDestBuf, 0, dest_pitch * bmheight);
-     if (anti_alias == FXFT_RENDER_MODE_MONO &&
-         FXFT_Get_Bitmap_PixelMode(FXFT_Get_Glyph_Bitmap(m_Face)) ==
-             FXFT_PIXEL_MODE_MONO) {
+     int rowbytes = std::min(abs(src_pitch), dest_pitch);
+     for (int row = 0; row < bmheight; row++)
+       memcpy(pDestBuf + row * dest_pitch, pSrcBuf + row * src_pitch, rowbytes);
 --- third_party/agg23/agg_rasterizer_scanline_aa.h
 +++ third_party/agg23/agg_rasterizer_scanline_aa.h
 @@ -349,14 +349,14 @@ public:


More information about the Libreoffice-commits mailing list