texlive[42513] Build/source/libs/poppler: poppler 0.49.0

commits+kakuto at tug.org commits+kakuto at tug.org
Tue Nov 15 09:21:52 CET 2016


Revision: 42513
          http://tug.org/svn/texlive?view=revision&revision=42513
Author:   kakuto
Date:     2016-11-15 09:21:51 +0100 (Tue, 15 Nov 2016)
Log Message:
-----------
poppler 0.49.0

Modified Paths:
--------------
    trunk/Build/source/libs/poppler/ChangeLog
    trunk/Build/source/libs/poppler/configure
    trunk/Build/source/libs/poppler/poppler-PATCHES/ChangeLog
    trunk/Build/source/libs/poppler/poppler-PATCHES/TL-Changes
    trunk/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX
    trunk/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions
    trunk/Build/source/libs/poppler/poppler-src/CMakeLists.txt
    trunk/Build/source/libs/poppler/poppler-src/ChangeLog
    trunk/Build/source/libs/poppler/poppler-src/NEWS
    trunk/Build/source/libs/poppler/poppler-src/configure.ac
    trunk/Build/source/libs/poppler/poppler-src/goo/GooString.cc
    trunk/Build/source/libs/poppler/poppler-src/goo/GooString.h
    trunk/Build/source/libs/poppler/poppler-src/poppler/Form.cc
    trunk/Build/source/libs/poppler/poppler-src/poppler/Form.h
    trunk/Build/source/libs/poppler/poppler-src/poppler/Gfx.cc
    trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am
    trunk/Build/source/libs/poppler/poppler-src/poppler/Object.h
    trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc
    trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h
    trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc
    trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc
    trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.h
    trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.cc
    trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.h
    trunk/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.cmake
    trunk/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.in
    trunk/Build/source/libs/poppler/poppler-src/splash/Splash.cc
    trunk/Build/source/libs/poppler/version.ac

Modified: trunk/Build/source/libs/poppler/ChangeLog
===================================================================
--- trunk/Build/source/libs/poppler/ChangeLog	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/ChangeLog	2016-11-15 08:21:51 UTC (rev 42513)
@@ -1,3 +1,8 @@
+2016-11-15  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Import poppler-0.49.0.
+	* version.ac: Adjust.
+
 2016-10-08  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Import poppler-0.48.0.

Modified: trunk/Build/source/libs/poppler/configure
===================================================================
--- trunk/Build/source/libs/poppler/configure	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/configure	2016-11-15 08:21:51 UTC (rev 42513)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for poppler (TeX Live) 0.48.0.
+# Generated by GNU Autoconf 2.69 for poppler (TeX Live) 0.49.0.
 #
 # Report bugs to <tex-k at tug.org>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='poppler (TeX Live)'
 PACKAGE_TARNAME='poppler--tex-live-'
-PACKAGE_VERSION='0.48.0'
-PACKAGE_STRING='poppler (TeX Live) 0.48.0'
+PACKAGE_VERSION='0.49.0'
+PACKAGE_STRING='poppler (TeX Live) 0.49.0'
 PACKAGE_BUGREPORT='tex-k at tug.org'
 PACKAGE_URL=''
 
@@ -1306,7 +1306,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures poppler (TeX Live) 0.48.0 to adapt to many kinds of systems.
+\`configure' configures poppler (TeX Live) 0.49.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1373,7 +1373,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of poppler (TeX Live) 0.48.0:";;
+     short | recursive ) echo "Configuration of poppler (TeX Live) 0.49.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1486,7 +1486,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-poppler (TeX Live) configure 0.48.0
+poppler (TeX Live) configure 0.49.0
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2076,7 +2076,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by poppler (TeX Live) $as_me 0.48.0, which was
+It was created by poppler (TeX Live) $as_me 0.49.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -3999,7 +3999,7 @@
 
 # Define the identity of the package.
  PACKAGE='poppler--tex-live-'
- VERSION='0.48.0'
+ VERSION='0.49.0'
 
 
 # Some tools Automake needs.
@@ -6578,7 +6578,7 @@
 
 
 cat >>confdefs.h <<_ACEOF
-#define POPPLER_VERSION "0.48.0"
+#define POPPLER_VERSION "0.49.0"
 _ACEOF
 
 
@@ -7272,7 +7272,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by poppler (TeX Live) $as_me 0.48.0, which was
+This file was extended by poppler (TeX Live) $as_me 0.49.0, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7338,7 +7338,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-poppler (TeX Live) config.status 0.48.0
+poppler (TeX Live) config.status 0.49.0
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 

Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/ChangeLog
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/ChangeLog	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/ChangeLog	2016-11-15 08:21:51 UTC (rev 42513)
@@ -1,3 +1,9 @@
+2016-11-15  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
+
+	Imported poppler-0.49.0 source tree from:
+	  http://poppler.freedesktop.org/
+	* patch-02-LLONG_MAX, patch-03-Object-functions: Adapted.
+
 2016-10-08  Akira Kakuto  <kakuto at fuk.kindai.ac.jp>
 
 	Imported poppler-0.48.0 source tree from:

Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/TL-Changes
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/TL-Changes	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/TL-Changes	2016-11-15 08:21:51 UTC (rev 42513)
@@ -1,4 +1,4 @@
-Changes applied to the poppler-0.48.0 tree as obtained from:
+Changes applied to the poppler-0.49.0 tree as obtained from:
 	http://poppler.freedesktop.org/
 
 Removed:

Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/patch-02-LLONG_MAX	2016-11-15 08:21:51 UTC (rev 42513)
@@ -1,6 +1,6 @@
-diff -ur poppler-0.48.0.orig/goo/GooString.h poppler-0.48.0/goo/GooString.h
---- poppler-0.48.0.orig/goo/GooString.h	Wed Sep 07 06:14:07 2016
-+++ poppler-0.48.0/goo/GooString.h	Sun Oct 09 07:51:17 2016
+diff -ur poppler-0.49.0.orig/goo/GooString.h poppler-0.49.0/goo/GooString.h
+--- poppler-0.49.0.orig/goo/GooString.h	Mon Oct 24 06:01:46 2016
++++ poppler-0.49.0/goo/GooString.h	Tue Nov 15 17:03:25 2016
 @@ -36,6 +36,21 @@
  #endif
  

Modified: trunk/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions
===================================================================
--- trunk/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-PATCHES/patch-03-Object-functions	2016-11-15 08:21:51 UTC (rev 42513)
@@ -1,6 +1,6 @@
-diff -ur poppler-0.48.0.orig/poppler/Object.h poppler-0.48.0/poppler/Object.h
---- poppler-0.48.0.orig/poppler/Object.h	Wed Jul 06 06:37:01 2016
-+++ poppler-0.48.0/poppler/Object.h	Sun Oct 09 07:54:18 2016
+diff -ur poppler-0.49.0.orig/poppler/Object.h poppler-0.49.0/poppler/Object.h
+--- poppler-0.49.0.orig/poppler/Object.h	Mon Oct 24 02:08:37 2016
++++ poppler-0.49.0/poppler/Object.h	Tue Nov 15 17:06:39 2016
 @@ -148,7 +148,7 @@
    Object *initStream(Stream *streamA);
    Object *initRef(int numA, int genA)

Modified: trunk/Build/source/libs/poppler/poppler-src/CMakeLists.txt
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/CMakeLists.txt	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/CMakeLists.txt	2016-11-15 08:21:51 UTC (rev 42513)
@@ -22,7 +22,7 @@
 endif()
 
 set(POPPLER_MAJOR_VERSION "0")
-set(POPPLER_MINOR_VERSION "48")
+set(POPPLER_MINOR_VERSION "49")
 set(POPPLER_MICRO_VERSION "0")
 set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
 
@@ -502,7 +502,7 @@
 else(MSVC)
 add_library(poppler SHARED ${poppler_SRCS})
 endif(MSVC)
-set_target_properties(poppler PROPERTIES VERSION 64.0.0 SOVERSION 64)
+set_target_properties(poppler PROPERTIES VERSION 65.0.0 SOVERSION 65)
 target_link_libraries(poppler LINK_PRIVATE ${poppler_LIBS})
 install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
 

Modified: trunk/Build/source/libs/poppler/poppler-src/ChangeLog
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/ChangeLog	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/ChangeLog	2016-11-15 08:21:51 UTC (rev 42513)
@@ -1,3 +1,186 @@
+commit 02e2d8e2c3004c36d1f8f798e5a7a30166f48f37
+Author: Albert Astals Cid <aacid at kde.org>
+Date:   Tue Nov 15 00:10:43 2016 +0100
+
+    0.49
+
+ CMakeLists.txt      | 4 ++--
+ NEWS                | 5 ++++-
+ configure.ac        | 2 +-
+ cpp/Doxyfile        | 2 +-
+ poppler/Makefile.am | 2 +-
+ qt4/src/Doxyfile    | 2 +-
+ qt5/src/Doxyfile    | 2 +-
+ 7 files changed, 11 insertions(+), 8 deletions(-)
+
+commit f7f0f14e095425d171456a697804f2f34ed26426
+Author: Tor Lillqvist <tml at collabora.com>
+Date:   Tue Nov 15 00:06:26 2016 +0100
+
+    VS 2013 has fmin() and fmax()
+
+ NEWS                           | 13 +++++++++++++
+ poppler/poppler-config.h.cmake |  3 ++-
+ 2 files changed, 15 insertions(+), 1 deletion(-)
+
+commit 07ac68603552b36a2a6b8ea5982f22f24f5835b1
+Author: Albert Astals Cid <aacid at kde.org>
+Date:   Tue Nov 15 00:03:24 2016 +0100
+
+    Update (C)
+
+ poppler/PSOutputDev.cc      | 1 +
+ poppler/poppler-config.h.in | 1 +
+ utils/pdfseparate.cc        | 2 +-
+ 3 files changed, 3 insertions(+), 1 deletion(-)
+
+commit b837ae3bc69c5c76f1a4e3abaeb22d0574d6b2c8
+Author: Thomas Freitag <Thomas.Freitag at alfa.de>
+Date:   Thu Nov 10 00:33:17 2016 +0100
+
+    Continue rendering in case of 'Singular matrix in shading pattern
+    fill'
+
+    Bug #98623
+
+ poppler/Gfx.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 6c01a48458a8b4896d606ef9bcc4af5e03393b72
+Author: Thomas Freitag <Thomas.Freitag at alfa.de>
+Date:   Wed Nov 2 23:10:01 2016 +0100
+
+    merge type3 glyph handling from xpdf 3.04
+
+    Fixes bug #96667
+
+ poppler/SplashOutputDev.cc | 28 +++++++++++++++++++++++-----
+ poppler/SplashOutputDev.h  |  1 -
+ 2 files changed, 23 insertions(+), 6 deletions(-)
+
+commit f43cb73939f85952d83afc87a6dc638dc1ae311b
+Author: Albert Astals Cid <aacid at kde.org>
+Date:   Wed Nov 2 00:13:26 2016 +0100
+
+    Avoid UBSan warning about undefined downcast
+
+    ...of this-ptr of in-construction FormFieldSignature while still in
+    the base
+    FormField ctor by simply casting the parent-class field member
+    when needed
+
+ poppler/Form.cc | 83
+ ++++++++++++++++++++++++++++++++-------------------------
+ poppler/Form.h  |  9 +++----
+ 2 files changed, 50 insertions(+), 42 deletions(-)
+
+commit 4539d0b002efbd19393fd55a6fb87b013acdb8f1
+Author: Caolán McNamara <caolanm at redhat.com>
+Date:   Thu Oct 27 14:31:20 2016 +0200
+
+    PSOutputDev.cc: std::max requires <algorithm>
+
+ poppler/PSOutputDev.cc | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 4619957cbab81ab0b25f3fdd3ed872f0ad93f074
+Author: Tor Lillqvist <tml at collabora.com>
+Date:   Thu Oct 27 14:27:32 2016 +0200
+
+    VS 2013 has fmin() and fmax()
+
+ poppler/poppler-config.h.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit be073d39f72f625bf3d8482ead76881150695bf4
+Author: Albert Astals Cid <aacid at kde.org>
+Date:   Mon Oct 31 10:11:56 2016 +0100
+
+    Fix typo in disable nss help string
+
+    Bug #98514
+
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 2a09ec47aef8870dba345f4045e691ffb5a59f4d
+Author: Albert Astals Cid <aacid at kde.org>
+Date:   Mon Oct 24 20:04:22 2016 +0200
+
+    Fix memory leak in parametrized gouraudTriangleShadedFill
+
+ poppler/SplashOutputDev.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit 169889b8e196cfcd288e6555fb048fbbf95ba3f6
+Author: Albert Astals Cid <aacid at kde.org>
+Date:   Mon Oct 24 20:04:00 2016 +0200
+
+    Fix crash on broken files
+
+ splash/Splash.cc | 38 ++++++++++++++++++++------------------
+ 1 file changed, 20 insertions(+), 18 deletions(-)
+
+commit 269a91e3b03a19acc06fd0f72356f2e48a6368a7
+Author: Jakub Alba <jakubalba at gmail.com>
+Date:   Tue Aug 23 13:20:44 2016 +0200
+
+    PDFDoc::setDocInfoStringEntry(): treat value consisting of just the
+    unicode marker as an empty string
+
+ poppler/PDFDoc.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 43cfdf9de45e6833a2815b173f8cc945f1c5f9d6
+Author: Jakub Alba <jakubalba at gmail.com>
+Date:   Tue Aug 23 13:19:07 2016 +0200
+
+    goo: add GooString::hasJustUnicodeMarker(void)
+
+ goo/GooString.cc | 2 +-
+ goo/GooString.h  | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+commit e3c5bdf4fcd29c5d180046d1c279d3f99c1027a7
+Author: Jakub Alba <jakubalba at gmail.com>
+Date:   Fri Oct 21 23:06:23 2016 +0200
+
+    update copyrights
+
+ cpp/poppler-document.cpp      | 2 +-
+ cpp/poppler-document.h        | 2 +-
+ cpp/poppler-embedded-file.cpp | 2 +-
+ cpp/poppler-global.cpp        | 2 +-
+ cpp/poppler-private.cpp       | 2 +-
+ cpp/poppler-private.h         | 2 +-
+ glib/poppler-document.cc      | 2 +-
+ glib/poppler-document.h       | 2 +-
+ goo/GooString.cc              | 2 +-
+ goo/GooString.h               | 2 +-
+ poppler/Object.h              | 2 +-
+ poppler/PDFDoc.cc             | 2 +-
+ poppler/PDFDoc.h              | 2 +-
+ poppler/XRef.cc               | 2 +-
+ poppler/XRef.h                | 2 +-
+ qt4/src/poppler-document.cc   | 2 +-
+ qt4/src/poppler-private.cc    | 2 +-
+ qt4/src/poppler-private.h     | 2 +-
+ qt4/src/poppler-qt4.h         | 2 +-
+ qt5/src/poppler-document.cc   | 2 +-
+ qt5/src/poppler-private.cc    | 2 +-
+ qt5/src/poppler-private.h     | 2 +-
+ qt5/src/poppler-qt5.h         | 2 +-
+ 23 files changed, 23 insertions(+), 23 deletions(-)
+
+commit 5d15a52aade68c618c356fe403ca500e74917ef7
+Author: Pino Toscano <pino at kde.org>
+Date:   Sun Oct 9 13:04:46 2016 +0200
+
+    pdfseparate: remove extra '%' in error message
+
+ utils/pdfseparate.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
 commit 036bcee237c814197af3324cd3697ea88d9ac6d3
 Author: Albert Astals Cid <aacid at kde.org>
 Date:   Sat Oct 8 17:55:31 2016 +0200

Modified: trunk/Build/source/libs/poppler/poppler-src/NEWS
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/NEWS	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/NEWS	2016-11-15 08:21:51 UTC (rev 42513)
@@ -1,3 +1,19 @@
+Release 0.49.0
+        core:
+         * Merge type3 glyph handling from xpdf 3.04. Bug #96667
+         * Continue rendering in case of 'Singular matrix in shading pattern fill. Bug #98623
+         * Fix memory leak in parametrized gouraudTriangleShadedFill
+         * Fix crash on broken files
+         * PDFDoc::setDocInfoStringEntry(): treat value consisting of just the unicode marker as an empty string
+         * Fix UBSAN warning
+         * Misc compile fixes
+
+        utils:
+         * pdfseparate: remove extra '%' in error message
+        
+        build system:
+         * configure: Fix typo in disable nss help string
+
 Release 0.48.0
         core:
          * Fix crashes and memory leaks in invalid files.

Modified: trunk/Build/source/libs/poppler/poppler-src/configure.ac
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/configure.ac	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/configure.ac	2016-11-15 08:21:51 UTC (rev 42513)
@@ -1,5 +1,5 @@
 m4_define([poppler_version_major],[0])
-m4_define([poppler_version_minor],[48])
+m4_define([poppler_version_minor],[49])
 m4_define([poppler_version_micro],[0])
 m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro])
 
@@ -262,7 +262,7 @@
 
 dnl Test for NSS
 AC_ARG_ENABLE(libnss,
-        AC_HELP_STRING([--disable-nss],
+        AC_HELP_STRING([--disable-libnss],
                        [Do not build against libnss3.]),
               enable_libnss=$enableval,
               enable_libnss="try")

Modified: trunk/Build/source/libs/poppler/poppler-src/goo/GooString.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/goo/GooString.cc	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/goo/GooString.cc	2016-11-15 08:21:51 UTC (rev 42513)
@@ -25,7 +25,7 @@
 // Copyright (C) 2012 Pino Toscano <pino at kde.org>
 // Copyright (C) 2013 Jason Crain <jason at aquaticape.us>
 // Copyright (C) 2015 William Bader <williambader at hotmail.com>
-// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at gmail.com>
+// Copyright (C) 2016 Jakub Alba <jakubalba at gmail.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -912,7 +912,7 @@
   return strcmp(s + length - suffixLen, suffix) == 0;
 }
 
-GBool GooString::hasUnicodeMarker(void)
+GBool GooString::hasUnicodeMarker(void) const
 {
   return length > 1 && (s[0] & 0xff) == 0xfe && (s[1] & 0xff) == 0xff;
 }

Modified: trunk/Build/source/libs/poppler/poppler-src/goo/GooString.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/goo/GooString.h	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/goo/GooString.h	2016-11-15 08:21:51 UTC (rev 42513)
@@ -21,7 +21,7 @@
 // Copyright (C) 2012-2014 Fabio D'Urso <fabiodurso at hotmail.it>
 // Copyright (C) 2013 Jason Crain <jason at aquaticape.us>
 // Copyright (C) 2015 Adam Reichold <adam.reichold at t-online.de>
-// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at gmail.com>
+// Copyright (C) 2016 Jakub Alba <jakubalba at gmail.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -175,7 +175,8 @@
   // Return true if string ends with suffix
   GBool endsWith(const char *suffix) const;
 
-  GBool hasUnicodeMarker(void);
+  GBool hasUnicodeMarker(void) const;
+  GBool hasJustUnicodeMarker(void) const { return length == 2 && hasUnicodeMarker(); }
 
   // Sanitizes the string so that it does
   // not contain any ( ) < > [ ] { } / %

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Form.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Form.cc	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Form.cc	2016-11-15 08:21:51 UTC (rev 42513)
@@ -171,7 +171,6 @@
 	FormWidget(docA, aobj, num, ref, p)
 {
   type = formButton;
-  parent = static_cast<FormFieldButton*>(field);
   onStr = NULL;
 
   Object obj1, obj2;
@@ -200,7 +199,7 @@
 
   // 12.7.4.2.3 Check Boxes
   //  Yes should be used as the name for the on state
-  return parent->getButtonType() == formButtonCheck ? (char *)"Yes" : NULL;
+  return parent()->getButtonType() == formButtonCheck ? (char *)"Yes" : NULL;
 }
 
 FormWidgetButton::~FormWidgetButton ()
@@ -210,7 +209,7 @@
 
 FormButtonType FormWidgetButton::getButtonType () const
 {
-  return parent->getButtonType ();
+  return parent()->getButtonType ();
 }
 
 void FormWidgetButton::setAppearanceState(const char *state) {
@@ -227,7 +226,7 @@
 void FormWidgetButton::setState (GBool astate)
 {
   //pushButtons don't have state
-  if (parent->getButtonType() == formButtonPush)
+  if (parent()->getButtonType() == formButtonPush)
     return;
 
   // Silently return if can't set ON state
@@ -234,31 +233,35 @@
   if (astate && !onStr)
     return;
 
-  parent->setState(astate ? onStr->getCString() : (char *)"Off");
+  parent()->setState(astate ? onStr->getCString() : (char *)"Off");
   // Parent will call setAppearanceState()
 }
 
 GBool FormWidgetButton::getState ()
 {
-  return onStr ? parent->getState(onStr->getCString()) : gFalse;
+  return onStr ? parent()->getState(onStr->getCString()) : gFalse;
 }
 
+FormFieldButton *FormWidgetButton::parent() const
+{
+  return static_cast<FormFieldButton*>(field);
+}
 
+
 FormWidgetText::FormWidgetText (PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) :
 	FormWidget(docA, aobj, num, ref, p)
 {
   type = formText;
-  parent = static_cast<FormFieldText*>(field);
 }
 
 GooString* FormWidgetText::getContent ()
 {
-  return parent->getContent(); 
+  return parent()->getContent();
 }
 
 GooString* FormWidgetText::getContentCopy ()
 {
-  return parent->getContentCopy();
+  return parent()->getContentCopy();
 }
 
 void FormWidgetText::updateWidgetAppearance()
@@ -269,42 +272,42 @@
 
 bool FormWidgetText::isMultiline () const 
 { 
-  return parent->isMultiline(); 
+  return parent()->isMultiline();
 }
 
 bool FormWidgetText::isPassword () const 
 { 
-  return parent->isPassword(); 
+  return parent()->isPassword();
 }
 
 bool FormWidgetText::isFileSelect () const 
 { 
-  return parent->isFileSelect(); 
+  return parent()->isFileSelect();
 }
 
 bool FormWidgetText::noSpellCheck () const 
 { 
-  return parent->noSpellCheck(); 
+  return parent()->noSpellCheck();
 }
 
 bool FormWidgetText::noScroll () const 
 { 
-  return parent->noScroll(); 
+  return parent()->noScroll();
 }
 
 bool FormWidgetText::isComb () const 
 { 
-  return parent->isComb(); 
+  return parent()->isComb();
 }
 
 bool FormWidgetText::isRichText () const 
 { 
-  return parent->isRichText(); 
+  return parent()->isRichText();
 }
 
 int FormWidgetText::getMaxLen () const
 {
-  return parent->getMaxLen ();
+  return parent()->getMaxLen ();
 }
 
 void FormWidgetText::setContent(GooString* new_content)
@@ -314,14 +317,18 @@
     return;
   }
 
-  parent->setContentCopy(new_content);
+  parent()->setContentCopy(new_content);
 }
 
+FormFieldText *FormWidgetText::parent() const
+{
+  return static_cast<FormFieldText*>(field);
+}
+
 FormWidgetChoice::FormWidgetChoice(PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) :
 	FormWidget(docA, aobj, num, ref, p)
 {
   type = formChoice;
-  parent = static_cast<FormFieldChoice*>(field);
 }
 
 FormWidgetChoice::~FormWidgetChoice()
@@ -330,7 +337,7 @@
 
 bool FormWidgetChoice::_checkRange (int i)
 {
-  if (i < 0 || i >= parent->getNumChoices()) {
+  if (i < 0 || i >= parent()->getNumChoices()) {
     error(errInternal, -1, "FormWidgetChoice::_checkRange i out of range : {0:d}", i);
     return false;
   } 
@@ -344,7 +351,7 @@
     return;
   }
   if (!_checkRange(i)) return;
-  parent->select(i);
+  parent()->select(i);
 }
 
 void FormWidgetChoice::toggle (int i)
@@ -354,7 +361,7 @@
     return;
   }
   if (!_checkRange(i)) return;
-  parent->toggle(i);
+  parent()->toggle(i);
 }
 
 void FormWidgetChoice::deselectAll ()
@@ -363,7 +370,7 @@
     error(errInternal, -1, "FormWidgetChoice::deselectAll called on a read only field\n");
     return;
   }
-  parent->deselectAll();
+  parent()->deselectAll();
 }
 
 GooString* FormWidgetChoice::getEditChoice ()
@@ -372,7 +379,7 @@
     error(errInternal, -1, "FormFieldChoice::getEditChoice called on a non-editable choice\n");
     return NULL;
   }
-  return parent->getEditChoice();
+  return parent()->getEditChoice();
 }
 
 void FormWidgetChoice::updateWidgetAppearance()
@@ -384,7 +391,7 @@
 bool FormWidgetChoice::isSelected (int i)
 {
   if (!_checkRange(i)) return false;
-  return parent->isSelected(i);
+  return parent()->isSelected(i);
 }
 
 void FormWidgetChoice::setEditChoice (GooString* new_content)
@@ -398,59 +405,63 @@
     return;
   }
 
-  parent->setEditChoice(new_content);
+  parent()->setEditChoice(new_content);
 }
 
 int FormWidgetChoice::getNumChoices() 
 { 
-  return parent->getNumChoices(); 
+  return parent()->getNumChoices();
 }
 
 GooString* FormWidgetChoice::getChoice(int i) 
 { 
-  return parent->getChoice(i); 
+  return parent()->getChoice(i);
 }
 
 bool FormWidgetChoice::isCombo () const 
 { 
-  return parent->isCombo(); 
+  return parent()->isCombo();
 }
 
 bool FormWidgetChoice::hasEdit () const 
 { 
-  return parent->hasEdit(); 
+  return parent()->hasEdit();
 }
 
 bool FormWidgetChoice::isMultiSelect () const 
 { 
-  return parent->isMultiSelect(); 
+  return parent()->isMultiSelect();
 }
 
 bool FormWidgetChoice::noSpellCheck () const 
 { 
-  return parent->noSpellCheck(); 
+  return parent()->noSpellCheck();
 }
 
 bool FormWidgetChoice::commitOnSelChange () const 
 { 
-  return parent->commitOnSelChange(); 
+  return parent()->commitOnSelChange();
 }
 
 bool FormWidgetChoice::isListBox () const
 {
-  return parent->isListBox();
+  return parent()->isListBox();
 }
 
+FormFieldChoice *FormWidgetChoice::parent() const
+{
+  return static_cast<FormFieldChoice*>(field);
+}
+
 FormWidgetSignature::FormWidgetSignature(PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) :
 	FormWidget(docA, aobj, num, ref, p)
 {
   type = formSignature;
-  parent = static_cast<FormFieldSignature*>(field);
 }
 
 SignatureInfo *FormWidgetSignature::validateSignature(bool doVerifyCert, bool forceRevalidation)
 {
-  return parent->validateSignature(doVerifyCert, forceRevalidation);
+  return static_cast<FormFieldSignature*>(field)->validateSignature(doVerifyCert, forceRevalidation);
 }
 
 void FormWidgetSignature::updateWidgetAppearance()

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Form.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Form.h	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Form.h	2016-11-15 08:21:51 UTC (rev 42513)
@@ -167,8 +167,8 @@
   void updateWidgetAppearance();
 
 protected:
+  FormFieldButton *parent() const;
   GooString *onStr;
-  FormFieldButton *parent;
 };
 
 //------------------------------------------------------------------------
@@ -197,7 +197,7 @@
   bool isRichText () const;
   int getMaxLen () const;
 protected:
-  FormFieldText *parent;
+  FormFieldText *parent() const;
 };
 
 //------------------------------------------------------------------------
@@ -238,7 +238,7 @@
   bool isListBox () const;
 protected:
   bool _checkRange (int i);
-  FormFieldChoice *parent;
+  FormFieldChoice *parent() const;
 };
 
 //------------------------------------------------------------------------
@@ -251,9 +251,6 @@
   void updateWidgetAppearance();
 
   SignatureInfo *validateSignature(bool doVerifyCert, bool forceRevalidation);
-
-protected:
-  FormFieldSignature *parent;
 };
 
 //------------------------------------------------------------------------

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Gfx.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Gfx.cc	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Gfx.cc	2016-11-15 08:21:51 UTC (rev 42513)
@@ -2348,6 +2348,7 @@
   det = ctm[0] * ctm[3] - ctm[1] * ctm[2];
   if (fabs(det) < 0.000001) {
     error(errSyntaxError, getPos(), "Singular matrix in shading pattern fill");
+    restoreStateStack(savedState);
     return;
   }
   det = 1 / det;

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Makefile.am	2016-11-15 08:21:51 UTC (rev 42513)
@@ -327,7 +327,7 @@
 	$(win32_libs)
 
 libpoppler_la_LDFLAGS =				\
-	-version-info 64:0:0			\
+	-version-info 65:0:0			\
 	@create_shared_lib@			\
 	@auto_import_flags@
 

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/Object.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/Object.h	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/Object.h	2016-11-15 08:21:51 UTC (rev 42513)
@@ -21,7 +21,7 @@
 // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2013 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2013 Adrian Perez de Castro <aperez at igalia.com>
-// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at gmail.com>
+// Copyright (C) 2016 Jakub Alba <jakubalba at gmail.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.cc	2016-11-15 08:21:51 UTC (rev 42513)
@@ -34,7 +34,7 @@
 // Copyright (C) 2015 Li Junling <lijunling at sina.com>
 // Copyright (C) 2015 André Guerreiro <aguerreiro1985 at gmail.com>
 // Copyright (C) 2015 André Esser <bepandre at hotmail.com>
-// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at gmail.com>
+// Copyright (C) 2016 Jakub Alba <jakubalba at gmail.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -615,7 +615,7 @@
 
 void PDFDoc::setDocInfoStringEntry(const char *key, GooString *value)
 {
-  GBool removeEntry = !value || value->getLength() == 0;
+  GBool removeEntry = !value || value->getLength() == 0 || value->hasJustUnicodeMarker();
   if (removeEntry) {
     delete value;
   }

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/PDFDoc.h	2016-11-15 08:21:51 UTC (rev 42513)
@@ -29,7 +29,7 @@
 // Copyright (C) 2013 Adrian Perez de Castro <aperez at igalia.com>
 // Copyright (C) 2015 André Guerreiro <aguerreiro1985 at gmail.com>
 // Copyright (C) 2015 André Esser <bepandre at hotmail.com>
-// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at gmail.com>
+// Copyright (C) 2016 Jakub Alba <jakubalba at gmail.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc	2016-11-15 08:21:51 UTC (rev 42513)
@@ -30,6 +30,7 @@
 // Copyright (C) 2012 Lu Wang <coolwanglu at gmail.com>
 // Copyright (C) 2014 Till Kamppeter <till.kamppeter at gmail.com>
 // Copyright (C) 2015 Marek Kasik <mkasik at redhat.com>
+// Copyright (C) 2016 Caolán McNamara <caolanm at redhat.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -48,6 +49,7 @@
 #include <signal.h>
 #include <math.h>
 #include <limits.h>
+#include <algorithm>
 #include "goo/GooString.h"
 #include "goo/GooList.h"
 #include "goo/GooHash.h"

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc	2016-11-15 08:21:51 UTC (rev 42513)
@@ -1323,6 +1323,10 @@
 struct T3GlyphStack {
   Gushort code;			// character code
 
+  GBool haveDx;			// set after seeing a d0/d1 operator
+  GBool doNotCache;		// set if we see a gsave/grestore before
+				//   the d0/d1
+
   //----- cache info
   T3FontCache *cache;		// font cache for the current font
   T3FontCacheTag *cacheTag;	// pointer to cache tag for the glyph
@@ -1600,11 +1604,21 @@
 
 void SplashOutputDev::saveState(GfxState *state) {
   splash->saveState();
+  if (t3GlyphStack && !t3GlyphStack->haveDx) {
+    t3GlyphStack->doNotCache = gTrue;
+    error(errSyntaxWarning, -1,
+	  "Save (q) operator before d0/d1 in Type 3 glyph");
+  }
 }
 
 void SplashOutputDev::restoreState(GfxState *state) {
   splash->restoreState();
   needFontUpdate = gTrue;
+  if (t3GlyphStack && !t3GlyphStack->haveDx) {
+    t3GlyphStack->doNotCache = gTrue;
+    error(errSyntaxWarning, -1,
+	  "Restore (Q) operator before d0/d1 in Type 3 glyph");
+  }
 }
 
 void SplashOutputDev::updateAll(GfxState *state) {
@@ -2668,9 +2682,9 @@
   t3GlyphStack->cache = t3Font;
   t3GlyphStack->cacheTag = NULL;
   t3GlyphStack->cacheData = NULL;
+  t3GlyphStack->haveDx = gFalse;
+  t3GlyphStack->doNotCache = gFalse;
 
-  haveT3Dx = gFalse;
-
   return gFalse;
 }
 
@@ -2699,7 +2713,7 @@
 }
 
 void SplashOutputDev::type3D0(GfxState *state, double wx, double wy) {
-  haveT3Dx = gTrue;
+  t3GlyphStack->haveDx = gTrue;
 }
 
 void SplashOutputDev::type3D1(GfxState *state, double wx, double wy,
@@ -2711,10 +2725,14 @@
   int i, j;
 
   // ignore multiple d0/d1 operators
-  if (haveT3Dx) {
+  if (t3GlyphStack->haveDx) {
     return;
   }
-  haveT3Dx = gTrue;
+  t3GlyphStack->haveDx = gTrue;
+  // don't cache if we got a gsave/grestore before the d1
+  if (t3GlyphStack->doNotCache) {
+    return;
+  }
 
   if (unlikely(t3GlyphStack == NULL)) {
     error(errSyntaxWarning, -1, "t3GlyphStack was null in SplashOutputDev::type3D1");
@@ -4762,17 +4780,17 @@
     default:
     break;
   }
-  SplashGouraudColor *splashShading = new SplashGouraudPattern(bDirectColorTranslation, state, shading, colorMode);
   // restore vector antialias because we support it here
   if (shading->isParameterized()) {
+    SplashGouraudColor *splashShading = new SplashGouraudPattern(bDirectColorTranslation, state, shading, colorMode);
     GBool vaa = getVectorAntialias();
     GBool retVal = gFalse;
     setVectorAntialias(gTrue);
     retVal = splash->gouraudTriangleShadedFill(splashShading);
     setVectorAntialias(vaa);
+    delete splashShading;
     return retVal;
   }
-  delete splashShading;
   return gFalse;
 }
 

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.h	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.h	2016-11-15 08:21:51 UTC (rev 42513)
@@ -459,7 +459,6 @@
     t3FontCache[splashOutT3FontCacheSize];
   int nT3Fonts;			// number of valid entries in t3FontCache
   T3GlyphStack *t3GlyphStack;	// Type 3 glyph context stack
-  GBool haveT3Dx;		// set after seeing a d0/d1 operator
 
   SplashFont *font;		// current font
   GBool needFontUpdate;		// set when the font needs to be updated

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.cc	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.cc	2016-11-15 08:21:51 UTC (rev 42513)
@@ -24,7 +24,7 @@
 // Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso at hotmail.it>
 // Copyright (C) 2013, 2014 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2013 Pino Toscano <pino at kde.org>
-// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at gmail.com>
+// Copyright (C) 2016 Jakub Alba <jakubalba at gmail.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.h
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.h	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/XRef.h	2016-11-15 08:21:51 UTC (rev 42513)
@@ -22,7 +22,7 @@
 // Copyright (C) 2012, 2013, 2016 Thomas Freitag <Thomas.Freitag at kabelmail.de>
 // Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso at hotmail.it>
 // Copyright (C) 2013 Adrian Johnson <ajohnson at redneon.com>
-// Copyright (C) 2016 Jakub Kucharski <jakubkucharski97 at gmail.com>
+// Copyright (C) 2016 Jakub Alba <jakubalba at gmail.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.cmake
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.cmake	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.cmake	2016-11-15 08:21:51 UTC (rev 42513)
@@ -15,6 +15,7 @@
 //
 // Copyright (C) 2014 Bogdan Cristea <cristeab at gmail.com>
 // Copyright (C) 2014 Hib Eris <hib at hiberis.nl>
+// Copyright (C) 2016 Tor Lillqvist <tml at collabora.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -186,7 +187,7 @@
 #define GCC_PRINTF_FORMAT(fmt_index, va_index)
 #endif
 
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && _MSC_VER < 1800
 #define fmax(a, b) std::max(a, b)
 #define fmin(a, b) std::min(a, b)
 #endif

Modified: trunk/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.in
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.in	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/poppler/poppler-config.h.in	2016-11-15 08:21:51 UTC (rev 42513)
@@ -15,6 +15,7 @@
 //
 // Copyright (C) 2014 Bogdan Cristea <cristeab at gmail.com>
 // Copyright (C) 2014 Hib Eris <hib at hiberis.nl>
+// Copyright (C) 2016 Tor Lillqvist <tml at collabora.com>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -186,7 +187,7 @@
 #define GCC_PRINTF_FORMAT(fmt_index, va_index)
 #endif
 
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && _MSC_VER < 1800
 #define fmax(a, b) std::max(a, b)
 #define fmin(a, b) std::min(a, b)
 #endif

Modified: trunk/Build/source/libs/poppler/poppler-src/splash/Splash.cc
===================================================================
--- trunk/Build/source/libs/poppler/poppler-src/splash/Splash.cc	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/poppler-src/splash/Splash.cc	2016-11-15 08:21:51 UTC (rev 42513)
@@ -5745,24 +5745,26 @@
         colorinterp = scanColorMap[0] * scanLimitL + scanColorMap[1];
 
         bitmapOff = scanLineOff + scanLimitL * colorComps;
-        for (int X = scanLimitL; X <= scanLimitR && bitmapOff + colorComps <= bitmapOffLimit; ++X, colorinterp += scanColorMap[0], bitmapOff += colorComps) {
-          // FIXME : standard rectangular clipping can be done for a
-          // complete scanline which is faster
-          // --> see SplashClip and its methods
-          if (!clip->test(X, Y))
-            continue;
+        if (likely(bitmapOff >= 0)) {
+	  for (int X = scanLimitL; X <= scanLimitR && bitmapOff + colorComps <= bitmapOffLimit; ++X, colorinterp += scanColorMap[0], bitmapOff += colorComps) {
+	    // FIXME : standard rectangular clipping can be done for a
+	    // complete scanline which is faster
+	    // --> see SplashClip and its methods
+	    if (!clip->test(X, Y))
+	      continue;
 
-          assert(fabs(colorinterp - (scanColorMap[0] * X + scanColorMap[1])) < 1e-10);
-          assert(bitmapOff == Y * rowSize + colorComps * X && scanLineOff == Y * rowSize);
+	    assert(fabs(colorinterp - (scanColorMap[0] * X + scanColorMap[1])) < 1e-10);
+	    assert(bitmapOff == Y * rowSize + colorComps * X && scanLineOff == Y * rowSize);
 
-          shading->getParameterizedColor(colorinterp, bitmapMode, &bitmapData[bitmapOff]);
+	    shading->getParameterizedColor(colorinterp, bitmapMode, &bitmapData[bitmapOff]);
 
-          // make the shading visible.
-          // Note that opacity is handled by the bDirectBlit stuff, see
-          // above for comments and below for implementation.
-          if (hasAlpha)
-            bitmapAlpha[Y * bitmapWidth + X] = 255;
-        }
+	    // make the shading visible.
+	    // Note that opacity is handled by the bDirectBlit stuff, see
+	    // above for comments and below for implementation.
+	    if (hasAlpha)
+	      bitmapAlpha[Y * bitmapWidth + X] = 255;
+	  }
+	}
       }
     }
   } else {

Modified: trunk/Build/source/libs/poppler/version.ac
===================================================================
--- trunk/Build/source/libs/poppler/version.ac	2016-11-15 02:11:03 UTC (rev 42512)
+++ trunk/Build/source/libs/poppler/version.ac	2016-11-15 08:21:51 UTC (rev 42513)
@@ -8,4 +8,4 @@
 dnl --------------------------------------------------------
 dnl
 dnl  m4-include this file to define the current poppler version
-m4_define([poppler_version], [0.48.0])
+m4_define([poppler_version], [0.49.0])



More information about the tex-live-commits mailing list