Hello community, here is the log from the commit of package poppler for openSUSE:Factory checked in at 2016-05-25 21:22:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/poppler (Old) and /work/SRC/openSUSE:Factory/.poppler.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "poppler" Changes: -------- --- /work/SRC/openSUSE:Factory/poppler/poppler-qt.changes 2016-05-05 12:11:39.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.poppler.new/poppler-qt.changes 2016-05-25 21:22:11.000000000 +0200 @@ -1,0 +2,23 @@ +Mon May 23 10:44:52 UTC 2016 - [email protected] + +- Update to version 0.44.0: + + core: + - Fix Compile in 32bit linux (fdo#95492). + - Splash: type 3 chars. restore the current position also in + output device (fdo#95344). + - Splash: Improve rendering of some dotted lines (fdo#84693). + - Refactor GooString::Set() (fdo#94201). + - Fix typo in GfxPatchMeshShading::parse. + - Fix memory leak in PSOutputDev::filterPSLabel. + - Fix memory leak in + SignatureHandler::getDefaultFirefoxCertDB_Linux. + - Fix potential crash in SplashOutputDev::doUpdateFont. + - Fix potential crash in TextPage::coalesce. + - Remove call that does nothing. + + utils: pdftocairo: add -antialias option (fdo#94977). +- Bump soname following upstream changes. +- Add poppler-Fix-mem-leak-SplashgouraudTriangleShadedFill.patch: + Fix memory leak in Splash::gouraudTriangleShadedFill, patch from + upstream git. + +------------------------------------------------------------------- poppler-qt5.changes: same change poppler.changes: same change Old: ---- poppler-0.43.0.tar.xz New: ---- poppler-0.44.0.tar.xz poppler-Fix-mem-leak-SplashgouraudTriangleShadedFill.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ poppler-qt.spec ++++++ --- /var/tmp/diff_new_pack.GngtTq/_old 2016-05-25 21:22:12.000000000 +0200 +++ /var/tmp/diff_new_pack.GngtTq/_new 2016-05-25 21:22:12.000000000 +0200 @@ -21,11 +21,11 @@ Name: poppler-qt %define _name poppler -Version: 0.43.0 +Version: 0.44.0 Release: 0 # Actual version of poppler-data: %define poppler_data_version 0.4.6 -%define poppler_soname 60 +%define poppler_soname 61 %define poppler_cpp_soname 0 %define poppler_glib_soname 8 %define poppler_qt4_soname 4 @@ -38,6 +38,8 @@ Group: System/Libraries Source: http://poppler.freedesktop.org/%{_name}-%{version}.tar.xz Source99: baselibs.conf +# PATCH-FIX-UPSTREAM poppler-Fix-mem-leak-SplashgouraudTriangleShadedFill.patch [email protected] -- Fix memory leak in Splash::gouraudTriangleShadedFill +Patch0: poppler-Fix-mem-leak-SplashgouraudTriangleShadedFill.patch BuildRequires: gcc-c++ BuildRequires: gobject-introspection-devel BuildRequires: libjpeg-devel @@ -226,6 +228,7 @@ %prep %setup -q -n poppler-%{version} +%patch0 -p1 %build %if %build_qt5 poppler-qt5.spec: same change ++++++ poppler.spec ++++++ --- /var/tmp/diff_new_pack.GngtTq/_old 2016-05-25 21:22:12.000000000 +0200 +++ /var/tmp/diff_new_pack.GngtTq/_new 2016-05-25 21:22:12.000000000 +0200 @@ -21,11 +21,11 @@ Name: poppler %define _name poppler -Version: 0.43.0 +Version: 0.44.0 Release: 0 # Actual version of poppler-data: %define poppler_data_version 0.4.6 -%define poppler_soname 60 +%define poppler_soname 61 %define poppler_cpp_soname 0 %define poppler_glib_soname 8 %define poppler_qt4_soname 4 @@ -38,6 +38,8 @@ Group: System/Libraries Source: http://poppler.freedesktop.org/%{_name}-%{version}.tar.xz Source99: baselibs.conf +# PATCH-FIX-UPSTREAM poppler-Fix-mem-leak-SplashgouraudTriangleShadedFill.patch [email protected] -- Fix memory leak in Splash::gouraudTriangleShadedFill +Patch0: poppler-Fix-mem-leak-SplashgouraudTriangleShadedFill.patch BuildRequires: gcc-c++ BuildRequires: gobject-introspection-devel BuildRequires: libjpeg-devel @@ -226,6 +228,7 @@ %prep %setup -q -n poppler-%{version} +%patch0 -p1 %build %if %build_qt5 ++++++ poppler-0.43.0.tar.xz -> poppler-0.44.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/CMakeLists.txt new/poppler-0.44.0/CMakeLists.txt --- old/poppler-0.43.0/CMakeLists.txt 2016-04-29 00:13:57.000000000 +0200 +++ new/poppler-0.44.0/CMakeLists.txt 2016-05-21 18:56:26.000000000 +0200 @@ -22,7 +22,7 @@ endif() set(POPPLER_MAJOR_VERSION "0") -set(POPPLER_MINOR_VERSION "43") +set(POPPLER_MINOR_VERSION "44") set(POPPLER_MICRO_VERSION "0") set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}") @@ -501,7 +501,7 @@ else(MSVC) add_library(poppler SHARED ${poppler_SRCS}) endif(MSVC) -set_target_properties(poppler PROPERTIES VERSION 60.0.0 SOVERSION 60) +set_target_properties(poppler PROPERTIES VERSION 61.0.0 SOVERSION 61) target_link_libraries(poppler LINK_PRIVATE ${poppler_LIBS}) install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/ChangeLog new/poppler-0.44.0/ChangeLog --- old/poppler-0.43.0/ChangeLog 2016-04-29 00:39:47.000000000 +0200 +++ new/poppler-0.44.0/ChangeLog 2016-05-21 19:11:03.000000000 +0200 @@ -1,3 +1,136 @@ +commit 58f56a7af99b477f39e57aed74443b6851afe15f +Author: Thomas Freitag <[email protected]> +Date: Sat May 21 18:25:22 2016 +0200 + + Fix Compile in 32bit linux + + Bug #95492 + + poppler/Decrypt.cc | 65 + +++++++++++++++++++++++++++--------------------------- + 1 file changed, 33 insertions(+), 32 deletions(-) + +commit 853e94995255591b35d9bdbeb0174476838097c0 +Author: Adrian Johnson <[email protected]> +Date: Sun Apr 17 16:02:57 2016 +0930 + + pdftocairo: add -antialias option + + Bug 94977 + + poppler/CairoOutputDev.cc | 24 +++++++++++++++++ + poppler/CairoOutputDev.h | 4 ++- + utils/pdftocairo.1 | 26 +++++++++++++++++++ + utils/pdftocairo.cc | 66 + ++++++++++++++++++++++++++++++++++++++++++----- + 4 files changed, 112 insertions(+), 8 deletions(-) + +commit 8453966178de8535cdabac090e78ec17857f8975 +Author: Thomas Freitag <[email protected]> +Date: Tue May 17 01:00:37 2016 +0200 + + Improve rendering of some dotted lines + + Bug #84693 + + splash/Splash.cc | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +commit 182abe4ed5c0773073c6751a26a7c4e40e99e02e +Author: Thomas Freitag <[email protected]> +Date: Fri May 13 00:07:24 2016 +0200 + + Splash: type 3 chars. restore the current position also in output + device + + Bug #95344 + + poppler/Gfx.cc | 1 + + 1 file changed, 1 insertion(+) + +commit 9c35dc79ec777d9495796124ac7a42bf2b4cf83f +Author: Jakub Kucharski <[email protected]> +Date: Wed May 11 23:34:53 2016 +0200 + + goo: refactor GooString::Set() + + it is used only once to concatenate strings and it is in a GooString + constructor used specifically for that + so I think concatenation should take place in the constructor and + GooString::Set + should do exactly what it says which is setting the string. + + Bug #94201 + + goo/GooString.cc | 40 ++++++++++++++-------------------------- + goo/GooString.h | 10 +++++----- + 2 files changed, 19 insertions(+), 31 deletions(-) + +commit 0ecec576faf7e1ef644f5973f17e0b8244560912 +Author: Albert Astals Cid <[email protected]> +Date: Wed May 4 23:23:04 2016 +0200 + + Fix typo in GfxPatchMeshShading::parse + + poppler/GfxState.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 890178f9c946931ec34b8b227493ec9f1c6109aa +Author: Albert Astals Cid <[email protected]> +Date: Wed May 4 01:32:47 2016 +0200 + + Fix potential crash in SplashOutputDev::doUpdateFont + + If we delete fontLoc we need to set it to NULL since it's not set + to any value in all of the + branches of this code + + poppler/SplashOutputDev.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 86572d7d2835fdd77e82eeb428e3a56c2d0f271d +Author: Albert Astals Cid <[email protected]> +Date: Wed May 4 01:27:54 2016 +0200 + + Fix memory leak in SignatureHandler::getDefaultFirefoxCertDB_Linux + + poppler/SignatureHandler.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 3707f9d17c5f8a883ddb9614b11676ad49ade5b2 +Author: Albert Astals Cid <[email protected]> +Date: Wed May 4 00:59:01 2016 +0200 + + Fix potential crash in TextPage::coalesce + + When flows is not null flow was still pointing to an now deleted + flow that + may had made it crash in the for loop below + + poppler/TextOutputDev.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 6d26d02c39de6546f57b20c46922f8c56aad78a0 +Author: Albert Astals Cid <[email protected]> +Date: Wed May 4 00:58:12 2016 +0200 + + Remove call that does nothing + + We don't use dict after this call and streamGetDict is a pure getter, + i.e. it doesn't change the stream at all + + poppler/GfxState.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 56c71fcaae71c2b3cc91bb981715541518e05684 +Author: Albert Astals Cid <[email protected]> +Date: Wed May 4 00:55:06 2016 +0200 + + Fix memory leak in PSOutputDev::filterPSLabel + + poppler/PSOutputDev.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + commit a0c3fd3f18232c126815a129158e0c4cd3a819a9 Author: Albert Astals Cid <[email protected]> Date: Fri Apr 29 00:14:24 2016 +0200 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/NEWS new/poppler-0.44.0/NEWS --- old/poppler-0.43.0/NEWS 2016-04-29 00:11:20.000000000 +0200 +++ new/poppler-0.44.0/NEWS 2016-05-21 18:56:48.000000000 +0200 @@ -1,3 +1,19 @@ +Release 0.44.0 + core: + * Fix Compile in 32bit linux. Bug #95492 + * Splash: type 3 chars. restore the current position also in output device. Bug #95344 + * Splash: Improve rendering of some dotted lines. Bug #84693 + * Refactor GooString::Set(). Bug #94201 + * Fix typo in GfxPatchMeshShading::parse + * Fix memory leak in PSOutputDev::filterPSLabel + * Fix memory leak in SignatureHandler::getDefaultFirefoxCertDB_Linux + * Fix potential crash in SplashOutputDev::doUpdateFont + * Fix potential crash in TextPage::coalesce + * Remove call that does nothing + + utils: + * pdftocairo: add -antialias option. Bug #94977 + Release 0.43.0 core: * Implement sanity check for linearization usage. Bug #92482 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/configure new/poppler-0.44.0/configure --- old/poppler-0.43.0/configure 2016-04-29 00:30:43.000000000 +0200 +++ new/poppler-0.44.0/configure 2016-05-21 18:59:37.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for poppler 0.43.0. +# Generated by GNU Autoconf 2.69 for poppler 0.44.0. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=poppler>. # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='poppler' PACKAGE_TARNAME='poppler' -PACKAGE_VERSION='0.43.0' -PACKAGE_STRING='poppler 0.43.0' +PACKAGE_VERSION='0.44.0' +PACKAGE_STRING='poppler 0.44.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=poppler' PACKAGE_URL='' @@ -1554,7 +1554,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 0.43.0 to adapt to many kinds of systems. +\`configure' configures poppler 0.44.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1629,7 +1629,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of poppler 0.43.0:";; + short | recursive ) echo "Configuration of poppler 0.44.0:";; esac cat <<\_ACEOF @@ -1860,7 +1860,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -poppler configure 0.43.0 +poppler configure 0.44.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2554,7 +2554,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 $as_me 0.43.0, which was +It was created by poppler $as_me 0.44.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3418,7 +3418,7 @@ # Define the identity of the package. PACKAGE='poppler' - VERSION='0.43.0' + VERSION='0.44.0' cat >>confdefs.h <<_ACEOF @@ -18500,7 +18500,7 @@ cat >>confdefs.h <<_ACEOF -#define POPPLER_VERSION "0.43.0" +#define POPPLER_VERSION "0.44.0" _ACEOF @@ -25812,11 +25812,11 @@ POPPLER_MAJOR_VERSION=0 -POPPLER_MINOR_VERSION=43 +POPPLER_MINOR_VERSION=44 POPPLER_MICRO_VERSION=0 -POPPLER_VERSION=0.43.0 +POPPLER_VERSION=0.44.0 ac_config_files="$ac_config_files Makefile goo/Makefile fofi/Makefile splash/Makefile poppler/Makefile utils/Makefile glib/Makefile glib/poppler-features.h glib/reference/Makefile glib/reference/version.xml glib/demo/Makefile test/Makefile qt4/Makefile qt4/src/Makefile qt4/tests/Makefile qt4/demos/Makefile qt5/Makefile qt5/src/Makefile qt5/tests/Makefile qt5/demos/Makefile cpp/Makefile cpp/poppler-version.h cpp/tests/Makefile poppler.pc poppler-uninstalled.pc poppler-cairo.pc poppler-cairo-uninstalled.pc poppler-splash.pc poppler-splash-uninstalled.pc poppler-glib.pc poppler-glib-uninstalled.pc poppler-qt4.pc poppler-qt4-uninstalled.pc poppler-qt5.pc poppler-qt5-uninstalled.pc poppler-cpp.pc poppler-cpp-uninstalled.pc" @@ -26476,7 +26476,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by poppler $as_me 0.43.0, which was +This file was extended by poppler $as_me 0.44.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -26542,7 +26542,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 config.status 0.43.0 +poppler config.status 0.44.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/configure.ac new/poppler-0.44.0/configure.ac --- old/poppler-0.43.0/configure.ac 2016-04-29 00:30:06.000000000 +0200 +++ new/poppler-0.44.0/configure.ac 2016-05-21 18:55:49.000000000 +0200 @@ -1,5 +1,5 @@ m4_define([poppler_version_major],[0]) -m4_define([poppler_version_minor],[43]) +m4_define([poppler_version_minor],[44]) m4_define([poppler_version_micro],[0]) m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/cpp/poppler-version.h new/poppler-0.44.0/cpp/poppler-version.h --- old/poppler-0.43.0/cpp/poppler-version.h 2016-04-29 00:30:48.000000000 +0200 +++ new/poppler-0.44.0/cpp/poppler-version.h 2016-05-21 18:59:43.000000000 +0200 @@ -21,9 +21,9 @@ #include "poppler-global.h" -#define POPPLER_VERSION "0.43.0" +#define POPPLER_VERSION "0.44.0" #define POPPLER_VERSION_MAJOR 0 -#define POPPLER_VERSION_MINOR 43 +#define POPPLER_VERSION_MINOR 44 #define POPPLER_VERSION_MICRO 0 namespace poppler diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/glib/reference/html/index.html new/poppler-0.44.0/glib/reference/html/index.html --- old/poppler-0.43.0/glib/reference/html/index.html 2016-04-29 00:39:48.000000000 +0200 +++ new/poppler-0.44.0/glib/reference/html/index.html 2016-05-21 19:11:04.000000000 +0200 @@ -15,7 +15,7 @@ <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">Poppler Reference Manual</p></th></tr></table></div> <div><p class="releaseinfo"> - for Poppler 0.43.0 + for Poppler 0.44.0 </p></div> </div> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/glib/reference/html/poppler-Version-and-Features-Information.html new/poppler-0.44.0/glib/reference/html/poppler-Version-and-Features-Information.html --- old/poppler-0.43.0/glib/reference/html/poppler-Version-and-Features-Information.html 2016-04-29 00:39:48.000000000 +0200 +++ new/poppler-0.44.0/glib/reference/html/poppler-Version-and-Features-Information.html 2016-05-21 19:11:04.000000000 +0200 @@ -189,7 +189,7 @@ <hr> <div class="refsect2"> <a name="POPPLER-MINOR-VERSION:CAPS"></a><h3>POPPLER_MINOR_VERSION</h3> -<pre class="programlisting">#define POPPLER_MINOR_VERSION (43) +<pre class="programlisting">#define POPPLER_MINOR_VERSION (44) </pre> <p>The major version number of the poppler header files (e.g. in poppler version 0.1.2 this is 1.)</p> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/glib/reference/version.xml new/poppler-0.44.0/glib/reference/version.xml --- old/poppler-0.43.0/glib/reference/version.xml 2016-04-29 00:30:48.000000000 +0200 +++ new/poppler-0.44.0/glib/reference/version.xml 2016-05-21 18:59:43.000000000 +0200 @@ -1 +1 @@ -0.43.0 +0.44.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/goo/GooString.cc new/poppler-0.44.0/goo/GooString.cc --- old/poppler-0.43.0/goo/GooString.cc 2016-02-19 10:04:56.000000000 +0100 +++ new/poppler-0.44.0/goo/GooString.cc 2016-05-11 00:47:44.000000000 +0200 @@ -25,6 +25,7 @@ // Copyright (C) 2012 Pino Toscano <[email protected]> // Copyright (C) 2013 Jason Crain <[email protected]> // Copyright (C) 2015 William Bader <[email protected]> +// Copyright (C) 2016 Jakub Kucharski <[email protected]> // // 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 @@ -176,37 +177,22 @@ s[length] = '\0'; } -GooString* GooString::Set(const char *s1, int s1Len, const char *s2, int s2Len) +GooString* GooString::Set(const char *newStr, int newLen) { - int newLen = 0; - char *p; - - if (s1) { - if (CALC_STRING_LEN == s1Len) { - s1Len = strlen(s1); - } else - assert(s1Len >= 0); - newLen += s1Len; + if (!newStr) { + clear(); + return this; } - if (s2) { - if (CALC_STRING_LEN == s2Len) { - s2Len = strlen(s2); - } else - assert(s2Len >= 0); - newLen += s2Len; + if (newLen == CALC_STRING_LEN) { + newLen = strlen(newStr); + } else { + assert(newLen >= 0); } resize(newLen); - p = s; - if (s1) { - memcpy(p, s1, s1Len); - p += s1Len; - } - if (s2) { - memcpy(p, s2, s2Len); - p += s2Len; - } + memmove(s, newStr, newLen); + return this; } @@ -244,7 +230,9 @@ GooString::GooString(GooString *str1, GooString *str2) { s = NULL; length = 0; - Set(str1->getCString(), str1->length, str2->getCString(), str2->length); + resize(str1->length + str2->length); + memcpy(s, str1->getCString(), str1->length); + memcpy(s + str1->length, str2->getCString(), str2->length); } GooString *GooString::fromInt(int x) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/goo/GooString.h new/poppler-0.44.0/goo/GooString.h --- old/poppler-0.43.0/goo/GooString.h 2016-02-19 10:05:07.000000000 +0100 +++ new/poppler-0.44.0/goo/GooString.h 2016-05-11 00:47:44.000000000 +0200 @@ -21,6 +21,7 @@ // Copyright (C) 2012-2014 Fabio D'Urso <[email protected]> // Copyright (C) 2013 Jason Crain <[email protected]> // Copyright (C) 2015 Adam Reichold <[email protected]> +// Copyright (C) 2016 Jakub Kucharski <[email protected]> // // 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 @@ -65,11 +66,10 @@ // Create a string from <lengthA> chars at <idx> in <str>. GooString(GooString *str, int idx, int lengthA); - // Set content of a string to concatination of <s1> and <s2>. They can both - // be NULL. if <s1Len> or <s2Len> is CALC_STRING_LEN, then length of the string - // will be calculated with strlen(). Otherwise we assume they are a valid - // length of string (or its substring) - GooString* Set(const char *s1, int s1Len=CALC_STRING_LEN, const char *s2=NULL, int s2Len=CALC_STRING_LEN); + // Set content of a string to <newStr>. If <newLen> is CALC_STRING_LEN, then + // length of the string will be calculated with strlen(). Otherwise we assume + // this is a valid length of <newStr> (or its substring) + GooString* Set(const char *newStr, int newLen=CALC_STRING_LEN); // Copy a string. explicit GooString(const GooString *str); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/poppler/CairoOutputDev.cc new/poppler-0.44.0/poppler/CairoOutputDev.cc --- old/poppler-0.43.0/poppler/CairoOutputDev.cc 2016-04-29 00:05:11.000000000 +0200 +++ new/poppler-0.44.0/poppler/CairoOutputDev.cc 2016-05-21 18:31:15.000000000 +0200 @@ -206,6 +206,7 @@ /* save the initial matrix so that we can use it for type3 fonts. */ //XXX: is this sufficient? could we miss changes to the matrix somehow? cairo_get_matrix(cairo, &orig_matrix); + setAntialias(cairo, antialias); } else { this->cairo = NULL; this->cairo_shape = NULL; @@ -228,6 +229,26 @@ } } +void CairoOutputDev::setAntialias(cairo_antialias_t antialias) +{ + this->antialias = antialias; + if (cairo) + setAntialias (cairo, antialias); + if (cairo_shape) + setAntialias (cairo_shape, antialias); +} + +void CairoOutputDev::setAntialias(cairo_t *cr, cairo_antialias_t antialias) +{ + cairo_font_options_t *font_options; + cairo_set_antialias (cairo, antialias); + font_options = cairo_font_options_create (); + cairo_get_font_options (cr, font_options); + cairo_font_options_set_antialias (font_options, antialias); + cairo_set_font_options (cr, font_options); + cairo_font_options_destroy (font_options); +} + void CairoOutputDev::startDoc(PDFDoc *docA, CairoFontEngine *parentFontEngine) { doc = docA; @@ -913,6 +934,7 @@ old_cairo = cairo; cairo = cairo_create (surface); cairo_surface_destroy (surface); + setAntialias(cairo, antialias); cairo_scale (cairo, surface_width / width, surface_height / height); box.x1 = bbox[0]; box.y1 = bbox[1]; @@ -1611,6 +1633,7 @@ cairo_surface_t *cairo_shape_surface = cairo_surface_create_similar_clip (cairo, CAIRO_CONTENT_ALPHA); cairo_shape = cairo_create (cairo_shape_surface); cairo_surface_destroy (cairo_shape_surface); + setAntialias(cairo_shape, antialias); /* the color doesn't matter as long as it is opaque */ cairo_set_source_rgb (cairo_shape, 0, 0, 0); @@ -1765,6 +1788,7 @@ cairo_surface_t *source = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height); cairo_t *maskCtx = cairo_create(source); + setAntialias(maskCtx, antialias); //XXX: hopefully this uses the correct color space */ if (!alpha && groupColorSpaceStack->cs) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/poppler/CairoOutputDev.h new/poppler-0.44.0/poppler/CairoOutputDev.h --- old/poppler-0.43.0/poppler/CairoOutputDev.h 2016-04-29 00:05:29.000000000 +0200 +++ new/poppler-0.44.0/poppler/CairoOutputDev.h 2016-05-21 18:31:15.000000000 +0200 @@ -266,6 +266,7 @@ void setCairo (cairo_t *cr); void setTextPage (TextPage *text); void setPrinting (GBool printing) { this->printing = printing; needFontUpdate = gTrue; } + void setAntialias(cairo_antialias_t antialias); void setInType3Char(GBool inType3Char) { this->inType3Char = inType3Char; } void getType3GlyphWidth (double *wx, double *wy) { *wx = t3_glyph_wx; *wy = t3_glyph_wy; } @@ -288,6 +289,7 @@ #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0) GBool setMimeDataForJBIG2Globals (Stream *str, cairo_surface_t *image); #endif + void setAntialias(cairo_t *cr, cairo_antialias_t antialias); GfxRGB fill_color, stroke_color; cairo_pattern_t *fill_pattern, *stroke_pattern; @@ -340,7 +342,7 @@ double t3_glyph_wx, t3_glyph_wy; GBool t3_glyph_has_bbox; double t3_glyph_bbox[4]; - + cairo_antialias_t antialias; GBool prescaleImages; TextPage *text; // text for the current page diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/poppler/Decrypt.cc new/poppler-0.44.0/poppler/Decrypt.cc --- old/poppler-0.43.0/poppler/Decrypt.cc 2016-03-14 20:18:16.000000000 +0100 +++ new/poppler-0.44.0/poppler/Decrypt.cc 2016-05-21 18:31:15.000000000 +0200 @@ -20,6 +20,7 @@ // Copyright (C) 2012 Fabio D'Urso <[email protected]> // Copyright (C) 2013 Adrian Johnson <[email protected]> // Copyright (C) 2016 Alok Anand <[email protected]> +// Copyright (C) 2016 Thomas Freitag <[email protected]> // // 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 @@ -1444,22 +1445,22 @@ //------------------------------------------------------------------------ // SHA 384 and SHA 512 use the same sequence of eighty constant 64 bit words. static const uint64_t K[80] = { - 0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc, 0x3956c25bf348b538, - 0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118, 0xd807aa98a3030242, 0x12835b0145706fbe, - 0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2, 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235, - 0xc19bf174cf692694, 0xe49b69c19ef14ad2, 0xefbe4786384f25e3, 0x0fc19dc68b8cd5b5, 0x240ca1cc77ac9c65, - 0x2de92c6f592b0275, 0x4a7484aa6ea6e483, 0x5cb0a9dcbd41fbd4, 0x76f988da831153b5, 0x983e5152ee66dfab, - 0xa831c66d2db43210, 0xb00327c898fb213f, 0xbf597fc7beef0ee4, 0xc6e00bf33da88fc2, 0xd5a79147930aa725, - 0x06ca6351e003826f, 0x142929670a0e6e70, 0x27b70a8546d22ffc, 0x2e1b21385c26c926, 0x4d2c6dfc5ac42aed, - 0x53380d139d95b3df, 0x650a73548baf63de, 0x766a0abb3c77b2a8, 0x81c2c92e47edaee6, 0x92722c851482353b, - 0xa2bfe8a14cf10364, 0xa81a664bbc423001, 0xc24b8b70d0f89791, 0xc76c51a30654be30, 0xd192e819d6ef5218, - 0xd69906245565a910, 0xf40e35855771202a, 0x106aa07032bbd1b8, 0x19a4c116b8d2d0c8, 0x1e376c085141ab53, - 0x2748774cdf8eeb99, 0x34b0bcb5e19b48a8, 0x391c0cb3c5c95a63, 0x4ed8aa4ae3418acb, 0x5b9cca4f7763e373, - 0x682e6ff3d6b2b8a3, 0x748f82ee5defb2fc, 0x78a5636f43172f60, 0x84c87814a1f0ab72, 0x8cc702081a6439ec, - 0x90befffa23631e28, 0xa4506cebde82bde9, 0xbef9a3f7b2c67915, 0xc67178f2e372532b, 0xca273eceea26619c, - 0xd186b8c721c0c207, 0xeada7dd6cde0eb1e, 0xf57d4f7fee6ed178, 0x06f067aa72176fba, 0x0a637dc5a2c898a6, - 0x113f9804bef90dae, 0x1b710b35131c471b, 0x28db77f523047d84, 0x32caab7b40c72493, 0x3c9ebe0a15c9bebc, - 0x431d67c49c100d4c, 0x4cc5d4becb3e42b6, 0x597f299cfc657e2a, 0x5fcb6fab3ad6faec, 0x6c44198c4a475817 + 0x428a2f98d728ae22ull, 0x7137449123ef65cdull, 0xb5c0fbcfec4d3b2full, 0xe9b5dba58189dbbcull, 0x3956c25bf348b538ull, + 0x59f111f1b605d019ull, 0x923f82a4af194f9bull, 0xab1c5ed5da6d8118ull, 0xd807aa98a3030242ull, 0x12835b0145706fbeull, + 0x243185be4ee4b28cull, 0x550c7dc3d5ffb4e2ull, 0x72be5d74f27b896full, 0x80deb1fe3b1696b1ull, 0x9bdc06a725c71235ull, + 0xc19bf174cf692694ull, 0xe49b69c19ef14ad2ull, 0xefbe4786384f25e3ull, 0x0fc19dc68b8cd5b5ull, 0x240ca1cc77ac9c65ull, + 0x2de92c6f592b0275ull, 0x4a7484aa6ea6e483ull, 0x5cb0a9dcbd41fbd4ull, 0x76f988da831153b5ull, 0x983e5152ee66dfabull, + 0xa831c66d2db43210ull, 0xb00327c898fb213full, 0xbf597fc7beef0ee4ull, 0xc6e00bf33da88fc2ull, 0xd5a79147930aa725ull, + 0x06ca6351e003826full, 0x142929670a0e6e70ull, 0x27b70a8546d22ffcull, 0x2e1b21385c26c926ull, 0x4d2c6dfc5ac42aedull, + 0x53380d139d95b3dfull, 0x650a73548baf63deull, 0x766a0abb3c77b2a8ull, 0x81c2c92e47edaee6ull, 0x92722c851482353bull, + 0xa2bfe8a14cf10364ull, 0xa81a664bbc423001ull, 0xc24b8b70d0f89791ull, 0xc76c51a30654be30ull, 0xd192e819d6ef5218ull, + 0xd69906245565a910ull, 0xf40e35855771202aull, 0x106aa07032bbd1b8ull, 0x19a4c116b8d2d0c8ull, 0x1e376c085141ab53ull, + 0x2748774cdf8eeb99ull, 0x34b0bcb5e19b48a8ull, 0x391c0cb3c5c95a63ull, 0x4ed8aa4ae3418acbull, 0x5b9cca4f7763e373ull, + 0x682e6ff3d6b2b8a3ull, 0x748f82ee5defb2fcull, 0x78a5636f43172f60ull, 0x84c87814a1f0ab72ull, 0x8cc702081a6439ecull, + 0x90befffa23631e28ull, 0xa4506cebde82bde9ull, 0xbef9a3f7b2c67915ull, 0xc67178f2e372532bull, 0xca273eceea26619cull, + 0xd186b8c721c0c207ull, 0xeada7dd6cde0eb1eull, 0xf57d4f7fee6ed178ull, 0x06f067aa72176fbaull, 0x0a637dc5a2c898a6ull, + 0x113f9804bef90daeull, 0x1b710b35131c471bull, 0x28db77f523047d84ull, 0x32caab7b40c72493ull, 0x3c9ebe0a15c9bebcull, + 0x431d67c49c100d4cull, 0x4cc5d4becb3e42b6ull, 0x597f299cfc657e2aull, 0x5fcb6fab3ad6faecull, 0x6c44198c4a475817ull }; static inline uint64_t rotr(uint64_t x, uint64_t n) { @@ -1548,14 +1549,14 @@ uint64_t H[8]; int blkLen = 0, i; // setting the initial hash value. - H[0] = 0x6a09e667f3bcc908; - H[1] = 0xbb67ae8584caa73b; - H[2] = 0x3c6ef372fe94f82b; - H[3] = 0xa54ff53a5f1d36f1; - H[4] = 0x510e527fade682d1; - H[5] = 0x9b05688c2b3e6c1f; - H[6] = 0x1f83d9abfb41bd6b; - H[7] = 0x5be0cd19137e2179; + H[0] = 0x6a09e667f3bcc908ull; + H[1] = 0xbb67ae8584caa73bull; + H[2] = 0x3c6ef372fe94f82bull; + H[3] = 0xa54ff53a5f1d36f1ull; + H[4] = 0x510e527fade682d1ull; + H[5] = 0x9b05688c2b3e6c1full; + H[6] = 0x1f83d9abfb41bd6bull; + H[7] = 0x5be0cd19137e2179ull; for (i = 0; i + 128 <= msgLen; i += 128) { sha512HashBlock(msg + i, H); @@ -1620,14 +1621,14 @@ uint64_t H[8]; int blkLen, i; //setting initial hash values - H[0] = 0xcbbb9d5dc1059ed8; - H[1] = 0x629a292a367cd507; - H[2] = 0x9159015a3070dd17; - H[3] = 0x152fecd8f70e5939; - H[4] = 0x67332667ffc00b31; - H[5] = 0x8eb44a8768581511; - H[6] = 0xdb0c2e0d64f98fa7; - H[7] = 0x47b5481dbefa4fa4; + H[0] = 0xcbbb9d5dc1059ed8ull; + H[1] = 0x629a292a367cd507ull; + H[2] = 0x9159015a3070dd17ull; + H[3] = 0x152fecd8f70e5939ull; + H[4] = 0x67332667ffc00b31ull; + H[5] = 0x8eb44a8768581511ull; + H[6] = 0xdb0c2e0d64f98fa7ull; + H[7] = 0x47b5481dbefa4fa4ull; //SHA 384 will use the same sha512HashBlock function. blkLen = 0; for (i = 0; i + 128 <= msgLen; i += 128) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/poppler/Gfx.cc new/poppler-0.44.0/poppler/Gfx.cc --- old/poppler-0.43.0/poppler/Gfx.cc 2016-03-16 20:16:12.000000000 +0100 +++ new/poppler-0.44.0/poppler/Gfx.cc 2016-05-11 23:45:06.000000000 +0200 @@ -4046,6 +4046,7 @@ curX += tdx; curY += tdy; state->moveTo(curX, curY); + out->updateCTM(state, 0, 0, 0, 0, 0, 0); p += n; len -= n; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/poppler/GfxState.cc new/poppler-0.44.0/poppler/GfxState.cc --- old/poppler-0.43.0/poppler/GfxState.cc 2016-03-16 00:56:00.000000000 +0100 +++ new/poppler-0.44.0/poppler/GfxState.cc 2016-05-04 23:21:40.000000000 +0200 @@ -16,7 +16,7 @@ // Copyright (C) 2005 Kristian Høgsberg <[email protected]> // Copyright (C) 2006, 2007 Jeff Muizelaar <[email protected]> // Copyright (C) 2006, 2010 Carlos Garcia Campos <[email protected]> -// Copyright (C) 2006-2015 Albert Astals Cid <[email protected]> +// Copyright (C) 2006-2016 Albert Astals Cid <[email protected]> // Copyright (C) 2009, 2012 Koji Otani <[email protected]> // Copyright (C) 2009, 2011-2016 Thomas Freitag <[email protected]> // Copyright (C) 2009 Christian Persch <[email protected]> @@ -2033,7 +2033,6 @@ #ifdef USE_CMS arr->get(1, &obj1); - dict = obj1.streamGetDict(); Guchar *profBuf; Stream *iccStream = obj1.getStream(); int length = 0; @@ -5548,7 +5547,7 @@ p->x[1][0] = x[7]; p->y[1][0] = y[7]; for (j = 0; j < nComps; ++j) { - p->color[0][1].c[j] = patchesA[nPatchesA-1].color[1][0].c[j]; + p->color[0][0].c[j] = patchesA[nPatchesA-1].color[1][0].c[j]; p->color[0][1].c[j] = patchesA[nPatchesA-1].color[0][0].c[j]; p->color[1][1].c[j] = c[0][j]; p->color[1][0].c[j] = c[1][j]; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/poppler/Makefile.am new/poppler-0.44.0/poppler/Makefile.am --- old/poppler-0.43.0/poppler/Makefile.am 2016-04-29 00:14:14.000000000 +0200 +++ new/poppler-0.44.0/poppler/Makefile.am 2016-05-21 18:56:39.000000000 +0200 @@ -327,7 +327,7 @@ $(win32_libs) libpoppler_la_LDFLAGS = \ - -version-info 60:0:0 \ + -version-info 61:0:0 \ @create_shared_lib@ \ @auto_import_flags@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/poppler/Makefile.in new/poppler-0.44.0/poppler/Makefile.in --- old/poppler-0.43.0/poppler/Makefile.in 2016-04-29 00:30:44.000000000 +0200 +++ new/poppler-0.44.0/poppler/Makefile.in 2016-05-21 18:59:38.000000000 +0200 @@ -839,7 +839,7 @@ $(win32_libs) libpoppler_la_LDFLAGS = \ - -version-info 60:0:0 \ + -version-info 61:0:0 \ @create_shared_lib@ \ @auto_import_flags@ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/poppler/PSOutputDev.cc new/poppler-0.44.0/poppler/PSOutputDev.cc --- old/poppler-0.43.0/poppler/PSOutputDev.cc 2016-03-16 20:16:50.000000000 +0100 +++ new/poppler-0.44.0/poppler/PSOutputDev.cc 2016-05-04 00:54:51.000000000 +0200 @@ -15,7 +15,7 @@ // // Copyright (C) 2005 Martin Kretzschmar <[email protected]> // Copyright (C) 2005, 2006 Kristian Høgsberg <[email protected]> -// Copyright (C) 2006-2009, 2011-2013, 2015 Albert Astals Cid <[email protected]> +// Copyright (C) 2006-2009, 2011-2013, 2015, 2016 Albert Astals Cid <[email protected]> // Copyright (C) 2006 Jeff Muizelaar <[email protected]> // Copyright (C) 2007, 2008 Brad Hards <[email protected]> // Copyright (C) 2008, 2009 Koji Otani <[email protected]> @@ -7656,8 +7656,10 @@ } else if (c == '(') { label2->append("\\("); } else if (c < 0x20 || c > 0x7e) { - label2->append(GooString::format("\\{0:03o}", c)); + GooString *aux = GooString::format("\\{0:03o}", c); + label2->append(aux); j += 4; + delete aux; } else { label2->append(c); ++j; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/poppler/SignatureHandler.cc new/poppler-0.44.0/poppler/SignatureHandler.cc --- old/poppler-0.43.0/poppler/SignatureHandler.cc 2016-03-16 20:20:41.000000000 +0100 +++ new/poppler-0.44.0/poppler/SignatureHandler.cc 2016-05-04 01:27:41.000000000 +0200 @@ -6,7 +6,7 @@ // // Copyright 2015, 2016 André Guerreiro <[email protected]> // Copyright 2015 André Esser <[email protected]> -// Copyright 2015 Albert Astals Cid <[email protected]> +// Copyright 2015, 2016 Albert Astals Cid <[email protected]> // Copyright 2015 Markus Kilås <[email protected]> // //======================================================================== @@ -82,6 +82,7 @@ } while (subFolder != NULL); closedir(toSearchIn); + delete homePath; return NULL; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/poppler/SplashOutputDev.cc new/poppler-0.44.0/poppler/SplashOutputDev.cc --- old/poppler-0.43.0/poppler/SplashOutputDev.cc 2016-04-27 00:38:24.000000000 +0200 +++ new/poppler-0.44.0/poppler/SplashOutputDev.cc 2016-05-04 01:32:39.000000000 +0200 @@ -15,7 +15,7 @@ // // Copyright (C) 2005 Takashi Iwai <[email protected]> // Copyright (C) 2006 Stefan Schweizer <[email protected]> -// Copyright (C) 2006-2015 Albert Astals Cid <[email protected]> +// Copyright (C) 2006-2016 Albert Astals Cid <[email protected]> // Copyright (C) 2006 Krzysztof Kowalczyk <[email protected]> // Copyright (C) 2006 Scott Turner <[email protected]> // Copyright (C) 2007 Koji Otani <[email protected]> @@ -2060,6 +2060,7 @@ reload: delete id; delete fontLoc; + fontLoc = NULL; if (fontsrc && !fontsrc->isFile) fontsrc->unref(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/poppler/TextOutputDev.cc new/poppler-0.44.0/poppler/TextOutputDev.cc --- old/poppler-0.43.0/poppler/TextOutputDev.cc 2016-03-16 20:14:00.000000000 +0100 +++ new/poppler-0.44.0/poppler/TextOutputDev.cc 2016-05-04 00:58:48.000000000 +0200 @@ -20,7 +20,7 @@ // Copyright (C) 2006 Jeff Muizelaar <[email protected]> // Copyright (C) 2007, 2008, 2012 Adrian Johnson <[email protected]> // Copyright (C) 2008 Koji Otani <[email protected]> -// Copyright (C) 2008, 2010-2012, 2014, 2015 Albert Astals Cid <[email protected]> +// Copyright (C) 2008, 2010-2012, 2014-2016 Albert Astals Cid <[email protected]> // Copyright (C) 2008 Pino Toscano <[email protected]> // Copyright (C) 2008, 2010 Hib Eris <[email protected]> // Copyright (C) 2009 Ross Moore <[email protected]> @@ -3763,12 +3763,12 @@ // build the flows //~ this needs to be adjusted for writing mode (vertical text) //~ this also needs to account for right-to-left column ordering - flow = NULL; while (flows) { flow = flows; flows = flows->next; delete flow; } + flow = NULL; flows = lastFlow = NULL; // assume blocks are already in reading order, // and construct flows accordingly. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/splash/Splash.cc new/poppler-0.44.0/splash/Splash.cc --- old/poppler-0.43.0/splash/Splash.cc 2016-03-19 20:39:36.000000000 +0100 +++ new/poppler-0.44.0/splash/Splash.cc 2016-05-17 01:00:14.000000000 +0200 @@ -13,7 +13,7 @@ // // Copyright (C) 2005-2015 Albert Astals Cid <[email protected]> // Copyright (C) 2005 Marco Pesenti Gritti <[email protected]> -// Copyright (C) 2010-2015 Thomas Freitag <[email protected]> +// Copyright (C) 2010-2016 Thomas Freitag <[email protected]> // Copyright (C) 2010 Christian Feuersänger <[email protected]> // Copyright (C) 2011-2013, 2015 William Bader <[email protected]> // Copyright (C) 2012 Markus Trippelsdorf <[email protected]> @@ -5914,7 +5914,7 @@ SplashPath *pathIn, *dashPath, *pathOut; SplashCoord d, dx, dy, wdx, wdy, dxNext, dyNext, wdxNext, wdyNext; SplashCoord crossprod, dotprod, miter, m; - GBool first, last, closed; + GBool first, last, closed, hasangle; int subpathStart0, subpathStart1, seg, i0, i1, j0, j1, k0, k1; int left0, left1, left2, right0, right1, right2, join0, join1, join2; int leftFirst, rightFirst, firstPt; @@ -6142,6 +6142,7 @@ // compute the join parameters crossprod = dx * dyNext - dy * dxNext; dotprod = -(dx * dxNext + dy * dyNext); + hasangle = crossprod != 0 || dx * dxNext < 0 || dy * dyNext < 0; if (dotprod > 0.9999) { // avoid a divide-by-zero -- set miter to something arbitrary // such that sqrt(miter) will exceed miterLimit (and m is never @@ -6161,7 +6162,7 @@ } // round join - if (state->lineJoin == splashLineJoinRound) { + if (hasangle && state->lineJoin == splashLineJoinRound) { pathOut->moveTo(pathIn->pts[j0].x + (SplashCoord)0.5 * w, pathIn->pts[j0].y); pathOut->curveTo(pathIn->pts[j0].x + (SplashCoord)0.5 * w, @@ -6189,7 +6190,7 @@ pathIn->pts[j0].x + (SplashCoord)0.5 * w, pathIn->pts[j0].y); - } else { + } else if (hasangle) { pathOut->moveTo(pathIn->pts[j0].x, pathIn->pts[j0].y); // angle < 180 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/utils/pdftocairo.1 new/poppler-0.44.0/utils/pdftocairo.1 --- old/poppler-0.43.0/utils/pdftocairo.1 2016-03-02 00:35:28.000000000 +0100 +++ new/poppler-0.44.0/utils/pdftocairo.1 2016-05-21 18:31:15.000000000 +0200 @@ -167,6 +167,32 @@ .B \-gray Generate a grayscale file (PNG, JPEG, and TIFF only). .TP +.B \-antialias +Set the cairo antialias option used for text and drawing in image files (or rasterized regions in vector output). The options are: +.RS +.TP +.B default +Use the default antialiasing for the target device. This is the default setting if \-antialias is not used. +.TP +.B none +Antialiasing is disabled. +.TP +.B gray +Perform single-color antialiasing using shades of gray. +.TP +.B subpixel +Perform antialiasing by taking advantage of the order of subpixel elements on devices such as LCD. +.TP +.B fast +Hint that the backend should perform some antialiasing but prefer speed over quality. +.TP +.B good +The backend should balance quality against performance. +.TP +.B best +Hint that the backend should render at the highest quality, sacrificing speed if necessary. +.RE +.TP .B \-transp Use a transparent page color instead of white (PNG and TIFF only). .TP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/poppler-0.43.0/utils/pdftocairo.cc new/poppler-0.44.0/utils/pdftocairo.cc --- old/poppler-0.43.0/utils/pdftocairo.cc 2016-04-29 00:06:11.000000000 +0200 +++ new/poppler-0.44.0/utils/pdftocairo.cc 2016-05-21 18:31:15.000000000 +0200 @@ -106,6 +106,7 @@ static GBool mono = gFalse; static GBool gray = gFalse; static GBool transp = gFalse; +static GooString antialias; static GooString icc; static GBool level2 = gFalse; @@ -218,6 +219,8 @@ "generate a grayscale image file (PNG, JPEG)"}, {"-transp", argFlag, &transp, 0, "use a transparent background instead of white (PNG)"}, + {"-antialias", argGooString, &antialias, 0, + "set cairo antialias option"}, #if USE_CMS {"-icc", argGooString, &icc, 0, "ICC color profile to use"}, @@ -271,6 +274,7 @@ static GBool printing; static FILE *output_file; static GBool usePDFPageSize; +static cairo_antialias_t antialiasEnum = CAIRO_ANTIALIAS_DEFAULT; #if USE_CMS static unsigned char *icc_data; @@ -278,7 +282,46 @@ static cmsHPROFILE profile; #endif -void writePageImage(GooString *filename) +struct AntiliasOption +{ + const char *name; + cairo_antialias_t value; +}; + +static const AntiliasOption antialiasOptions[] = +{ + { "default", CAIRO_ANTIALIAS_DEFAULT }, + { "none", CAIRO_ANTIALIAS_NONE }, + { "gray", CAIRO_ANTIALIAS_GRAY }, + { "subpixel", CAIRO_ANTIALIAS_SUBPIXEL }, + { "fast", CAIRO_ANTIALIAS_FAST }, + { "good", CAIRO_ANTIALIAS_GOOD }, + { "best", CAIRO_ANTIALIAS_BEST }, + { NULL, CAIRO_ANTIALIAS_DEFAULT }, +}; + +static GBool parseAntialiasOption(GooString *antialias, cairo_antialias_t *antialiasEnum) +{ + const AntiliasOption *option = antialiasOptions; + while (option->name) { + if (antialias->cmp(option->name) == 0) { + *antialiasEnum = option->value; + return gTrue; + } + option++; + } + + fprintf(stderr, "Error: Invalid antialias option \"%s\"\n", antialias->getCString()); + fprintf(stderr, "Valid options are:\n"); + option = antialiasOptions; + while (option->name) { + fprintf(stderr, " %s\n", option->name); + option++; + } + return gFalse; +} + +static void writePageImage(GooString *filename) { ImgWriter *writer = 0; FILE *file; @@ -597,8 +640,16 @@ cairo_matrix_t m; cr = cairo_create(surface); + + if (!printing && !transp) { + cairo_set_source_rgb (cr, 1,1,1); + cairo_paint (cr); + cairo_push_group_with_content (cr, CAIRO_CONTENT_COLOR_ALPHA); + } + cairoOut->setCairo(cr); cairoOut->setPrinting(printing); + cairoOut->setAntialias(antialiasEnum); cairo_save(cr); if (ps && output_w > output_h) { @@ -629,13 +680,9 @@ cairo_restore(cr); cairoOut->setCairo(NULL); - // Blend onto white page if (!printing && !transp) { - cairo_save(cr); - cairo_set_operator(cr, CAIRO_OPERATOR_DEST_OVER); - cairo_set_source_rgb(cr, 1, 1, 1); - cairo_paint(cr); - cairo_restore(cr); + cairo_pop_group_to_source (cr); + cairo_paint (cr); } status = cairo_status(cr); @@ -914,6 +961,11 @@ exit(99); } + if (antialias.getLength() > 0) { + if (!parseAntialiasOption(&antialias, &antialiasEnum)) + exit(99); + } + if (transp && !(png || tiff)) { fprintf(stderr, "Error: -transp may only be used with png or tiff output.\n"); exit(99); ++++++ poppler-Fix-mem-leak-SplashgouraudTriangleShadedFill.patch ++++++ >From 1d0251c8ab48e2e1a4873d84b4bc573b3ae2a98d Mon Sep 17 00:00:00 2001 From: Albert Astals Cid <[email protected]> Date: Sat, 21 May 2016 20:02:26 +0200 Subject: Fix memory leak in Splash::gouraudTriangleShadedFill diff --git a/splash/Splash.cc b/splash/Splash.cc index 5acbe8e..4d33cf7 100644 --- a/splash/Splash.cc +++ b/splash/Splash.cc @@ -11,7 +11,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2005-2015 Albert Astals Cid <[email protected]> +// Copyright (C) 2005-2016 Albert Astals Cid <[email protected]> // Copyright (C) 2005 Marco Pesenti Gritti <[email protected]> // Copyright (C) 2010-2016 Thomas Freitag <[email protected]> // Copyright (C) 2010 Christian Feuersänger <[email protected]> @@ -5768,6 +5768,9 @@ GBool Splash::gouraudTriangleShadedFill(SplashGouraudColor *shading) } } } else { + if (!bDirectBlit) { + delete blitTarget; + } return gFalse; } -- cgit v0.10.2
