summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-07-21 07:02:37 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2018-07-21 07:02:37 +0000
commit58c3ccb13744cf5db852f434570b36b1d3f25cff (patch)
treeb10ad642785cc13c6269a4d7a2e998016219c43e /Build
parent05ef9a91d7f465171b4aa0e305436aa80234d924 (diff)
poppler 0.67.0
git-svn-id: svn://tug.org/texlive/trunk@48239 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/libs/README2
-rw-r--r--Build/source/libs/poppler/ChangeLog5
-rw-r--r--Build/source/libs/poppler/TLpatches/ChangeLog4
-rw-r--r--Build/source/libs/poppler/TLpatches/TL-Changes4
-rw-r--r--Build/source/libs/poppler/TLpatches/patch-03-time12
-rwxr-xr-xBuild/source/libs/poppler/configure22
-rw-r--r--Build/source/libs/poppler/poppler-src/CMakeLists.txt4
-rw-r--r--Build/source/libs/poppler/poppler-src/ChangeLog264
-rw-r--r--Build/source/libs/poppler/poppler-src/NEWS8
-rw-r--r--Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.cc2
-rw-r--r--Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.h7
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/Annot.cc6
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc2
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/Form.cc21
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/Form.h21
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/Gfx.cc59
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/Gfx.h4
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/GfxState.cc14
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.cc2
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc2
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/Parser.cc5
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc2
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/Stream.cc28
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/XRef.cc26
-rw-r--r--Build/source/libs/poppler/poppler-src/poppler/XRef.h46
-rw-r--r--Build/source/libs/poppler/version.ac2
26 files changed, 428 insertions, 146 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README
index 5971f192b43..fb181a8b430 100644
--- a/Build/source/libs/README
+++ b/Build/source/libs/README
@@ -48,7 +48,7 @@ mpfr 4.0.1 - checked 10feb18
pixman 0.34.0 - checked 04feb16
http://cairographics.org/releases/
-poppler 0.66.0 - checked 20jun18
+poppler 0.67.0 - checked 21jul18
http://poppler.freedesktop.org/ - used by luatex and xetex
(requires C++11)
diff --git a/Build/source/libs/poppler/ChangeLog b/Build/source/libs/poppler/ChangeLog
index 43faadaf6b8..948e7f1780d 100644
--- a/Build/source/libs/poppler/ChangeLog
+++ b/Build/source/libs/poppler/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import poppler-0.67.0.
+ * version.ac: Adjust.
+
2018-06-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Import poppler-0.66.0.
diff --git a/Build/source/libs/poppler/TLpatches/ChangeLog b/Build/source/libs/poppler/TLpatches/ChangeLog
index 95d2ceb3092..80258903def 100644
--- a/Build/source/libs/poppler/TLpatches/ChangeLog
+++ b/Build/source/libs/poppler/TLpatches/ChangeLog
@@ -1,3 +1,7 @@
+2018-07-21 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ * patch-03-time: Adapted.
+
2018-06-20 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
* patch-03-time: Adapted.
diff --git a/Build/source/libs/poppler/TLpatches/TL-Changes b/Build/source/libs/poppler/TLpatches/TL-Changes
index 492028e489e..144aeb3f847 100644
--- a/Build/source/libs/poppler/TLpatches/TL-Changes
+++ b/Build/source/libs/poppler/TLpatches/TL-Changes
@@ -1,4 +1,4 @@
-Changes applied to the poppler-0.66.0 tree as obtained from:
+Changes applied to the poppler-0.67.0 tree as obtained from:
http://poppler.freedesktop.org/
Removed unused dirs:
@@ -11,7 +11,7 @@ General idea:
update version.ac
mv poppler-src poppler-prev
tar xf poppler-*.tar.gz
-mv poppler-0.66.0 poppler-src
+mv poppler-0.67.0 poppler-src
cd poppler-src
svn status >/tmp/s
svn add # the ? lines
diff --git a/Build/source/libs/poppler/TLpatches/patch-03-time b/Build/source/libs/poppler/TLpatches/patch-03-time
index ff510f42f21..0f25775b968 100644
--- a/Build/source/libs/poppler/TLpatches/patch-03-time
+++ b/Build/source/libs/poppler/TLpatches/patch-03-time
@@ -1,6 +1,6 @@
-diff -ur poppler-0.66.0/goo/gfile.h poppler-src/goo/gfile.h
---- poppler-0.66.0/goo/gfile.h Wed Jun 20 06:16:47 2018
-+++ poppler-src/goo/gfile.h Wed Jun 20 14:32:44 2018
+diff -ur poppler-0.67.0/goo/gfile.h poppler-src/goo/gfile.h
+--- poppler-0.67.0/goo/gfile.h Fri Jul 20 06:20:03 2018
++++ poppler-src/goo/gfile.h Sat Jul 21 15:42:27 2018
@@ -51,8 +51,6 @@
# include <windows.h>
# endif
@@ -10,9 +10,9 @@ diff -ur poppler-0.66.0/goo/gfile.h poppler-src/goo/gfile.h
#else
# include <unistd.h>
# include <sys/types.h>
-diff -ur poppler-0.66.0/poppler/Form.h poppler-src/poppler/Form.h
---- poppler-0.66.0/poppler/Form.h Wed Jun 20 06:16:47 2018
-+++ poppler-src/poppler/Form.h Wed Jun 20 14:31:47 2018
+diff -ur poppler-0.67.0/poppler/Form.h poppler-src/poppler/Form.h
+--- poppler-0.67.0/poppler/Form.h Fri Jul 20 06:20:03 2018
++++ poppler-src/poppler/Form.h Sat Jul 21 15:43:15 2018
@@ -36,6 +36,7 @@
#include <set>
diff --git a/Build/source/libs/poppler/configure b/Build/source/libs/poppler/configure
index 7062703388d..a98031364d6 100755
--- a/Build/source/libs/poppler/configure
+++ b/Build/source/libs/poppler/configure
@@ -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.66.0.
+# Generated by GNU Autoconf 2.69 for poppler (TeX Live) 0.67.0.
#
# Report bugs to <tex-k@tug.org>.
#
@@ -580,8 +580,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='poppler (TeX Live)'
PACKAGE_TARNAME='poppler--tex-live-'
-PACKAGE_VERSION='0.66.0'
-PACKAGE_STRING='poppler (TeX Live) 0.66.0'
+PACKAGE_VERSION='0.67.0'
+PACKAGE_STRING='poppler (TeX Live) 0.67.0'
PACKAGE_BUGREPORT='tex-k@tug.org'
PACKAGE_URL=''
@@ -1307,7 +1307,7 @@ if test "$ac_init_help" = "long"; then
# 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.66.0 to adapt to many kinds of systems.
+\`configure' configures poppler (TeX Live) 0.67.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1374,7 +1374,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of poppler (TeX Live) 0.66.0:";;
+ short | recursive ) echo "Configuration of poppler (TeX Live) 0.67.0:";;
esac
cat <<\_ACEOF
@@ -1487,7 +1487,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-poppler (TeX Live) configure 0.66.0
+poppler (TeX Live) configure 0.67.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2134,7 +2134,7 @@ cat >config.log <<_ACEOF
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.66.0, which was
+It was created by poppler (TeX Live) $as_me 0.67.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -4057,7 +4057,7 @@ fi
# Define the identity of the package.
PACKAGE='poppler--tex-live-'
- VERSION='0.66.0'
+ VERSION='0.67.0'
# Some tools Automake needs.
@@ -7647,7 +7647,7 @@ ac_config_headers="$ac_config_headers poppler-config.h:poppler-src/poppler/poppl
cat >>confdefs.h <<_ACEOF
-#define POPPLER_VERSION "0.66.0"
+#define POPPLER_VERSION "0.67.0"
_ACEOF
@@ -8341,7 +8341,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# 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.66.0, which was
+This file was extended by poppler (TeX Live) $as_me 0.67.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -8407,7 +8407,7 @@ _ACEOF
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.66.0
+poppler (TeX Live) config.status 0.67.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/libs/poppler/poppler-src/CMakeLists.txt b/Build/source/libs/poppler/poppler-src/CMakeLists.txt
index 7b94037b6f1..cdfe779511e 100644
--- a/Build/source/libs/poppler/poppler-src/CMakeLists.txt
+++ b/Build/source/libs/poppler/poppler-src/CMakeLists.txt
@@ -30,7 +30,7 @@ if (ECM_FOUND)
endif()
set(POPPLER_MAJOR_VERSION "0")
-set(POPPLER_MINOR_VERSION "66")
+set(POPPLER_MINOR_VERSION "67")
set(POPPLER_MICRO_VERSION "0")
set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
@@ -490,7 +490,7 @@ add_library(poppler STATIC ${poppler_SRCS})
else()
add_library(poppler ${poppler_SRCS})
endif()
-set_target_properties(poppler PROPERTIES VERSION 77.0.0 SOVERSION 77)
+set_target_properties(poppler PROPERTIES VERSION 78.0.0 SOVERSION 78)
if(MINGW)
get_target_property(POPPLER_SOVERSION poppler SOVERSION)
set_target_properties(poppler PROPERTIES SUFFIX "-${POPPLER_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
diff --git a/Build/source/libs/poppler/poppler-src/ChangeLog b/Build/source/libs/poppler/poppler-src/ChangeLog
index 022b69a02cb..e8b09ae5273 100644
--- a/Build/source/libs/poppler/poppler-src/ChangeLog
+++ b/Build/source/libs/poppler/poppler-src/ChangeLog
@@ -1,3 +1,267 @@
+commit 20d89699b35397f23352d0e60a3e19da2ce6b410
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jul 19 23:20:03 2018 +0200
+
+ poppler 0.67
+
+ CMakeLists.txt | 4 ++--
+ NEWS | 8 ++++++++
+ cpp/Doxyfile | 2 +-
+ qt5/src/Doxyfile | 2 +-
+ 4 files changed, 12 insertions(+), 4 deletions(-)
+
+commit 8bc5acb1c18e77e912b7d9caa7f73e6969d1dede
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Thu Jul 19 17:55:13 2018 +0200
+
+ Splash::arbitraryTransformMask: Set clipRes to splashClipPartial in
+ some if branches
+
+ If xx or yy are not in the expected bounds something went wrong so
+ don't assume we're still inside the valid area for the destination
+ either
+
+ fixes oss-fuzz/9382
+
+ splash/Splash.cc | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+commit 004e3c10df0abda214f0c293f9e269fdd979c5ee
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jul 18 20:31:27 2018 +0200
+
+ Fix crash when Object has negative number
+
+ Spec says object number has to be > 0 and gen has to be >= 0
+
+ Reported by email
+
+ poppler/Parser.cc | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+commit 155897f3cb88db5050b9d16dc50bfd8b660077b6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jul 17 01:05:38 2018 +0200
+
+ JBIG2Stream::readTextRegion: Fix uninitialized memory read
+
+ fixes oss-fuzz/9381
+
+ poppler/JBIG2Stream.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit eb1291f86260124071e12226294631ce685eaad6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Wed Jul 11 00:26:01 2018 +0200
+
+ GfxPatchMeshShading::getParameterizedColor: Fix uninitialized
+ memory read
+
+ fixes oss-fuzz/9264
+
+ poppler/GfxState.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 729e212f465d015959e5a64662593e5e3f8e4924
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jul 6 17:29:46 2018 +0200
+
+ Add some easy const to XRef
+
+ poppler/XRef.cc | 26 +++++++++++++-------------
+ poppler/XRef.h | 46 +++++++++++++++++++++++-----------------------
+ 2 files changed, 36 insertions(+), 36 deletions(-)
+
+commit e607d9c4a0057c390c59e306f6dc010aea2125ee
+Author: Stefan BrĂ¼ns <stefan.bruens@rwth-aachen.de>
+Date: Sun May 20 19:31:53 2018 +0200
+
+ Small optimization for AABGR8 pipes
+
+ Skip some computations if both src and dest alpha are zero, or if
+ src is fully opaque. Equivalent to Commit f47936af7508A
+ ("Small optimization for AAXRGB8 pipes").
+
+ splash/Splash.cc | 28 +++++++++++++++++++---------
+ 1 file changed, 19 insertions(+), 9 deletions(-)
+
+commit 1b5298ebb8d76b5eee11d9cccdfffcdceb5d064b
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jul 2 21:46:10 2018 +0200
+
+ GfxUnivariateShading::getColor: Fix uninitialized memory read
+
+ fixes oss-fuzz/9165
+
+ poppler/GfxState.cc | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+commit d8346166d5150c1673379dcb3c658b9805f99764
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jul 2 20:10:25 2018 +0200
+
+ Gfx::doRadialShFill: Don't divide by zero
+
+ fixes oss-fuzz/9133
+
+ poppler/Gfx.cc | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+commit 0735821ee03f9d83a9817450b12f45a502f51834
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 26 17:09:52 2018 +0200
+
+ Form: Remove return in void function
+
+ poppler/Form.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit b317ee3ecb939b91e1f8245177defaa59f8478b7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 26 15:27:48 2018 +0200
+
+ Form: Remove unused getContentCopy
+
+ it's confusing to have getContent and getContentCopy that does 99%
+ the same
+
+ poppler/Form.cc | 11 -----------
+ poppler/Form.h | 3 ---
+ 2 files changed, 14 deletions(-)
+
+commit 664d166194bc0832fd446b354630c4c7994ae4e3
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Tue Jun 26 15:22:13 2018 +0200
+
+ Form: Add a few more const
+
+ poppler/Form.cc | 8 ++++----
+ poppler/Form.h | 18 +++++++++---------
+ 2 files changed, 13 insertions(+), 13 deletions(-)
+
+commit 5ef6a845d8872f5dbc5698260ab5e12391f01f76
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Mon Jun 25 19:21:37 2018 +0200
+
+ Splash::arbitraryTransformImage: Fix uninitialized memory read
+
+ fixes oss-fuzz/9066
+
+ splash/Splash.cc | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+commit 267228bb071016621c80fc8514927905164aaeea
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 24 18:28:22 2018 +0200
+
+ pdfsig: Use posix basename() instead of GNU one
+
+ So it builds on non GNU systems too
+
+ Bug #106783
+
+ utils/pdfsig.cc | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+commit 459f369145a9d8f638fe123425f0e2880487640e
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 24 11:51:20 2018 +0200
+
+ Move variable declarations closer to where they are used
+
+ Allows for declaring two of them as const
+
+ poppler/Stream.cc | 26 ++++++++++----------------
+ 1 file changed, 10 insertions(+), 16 deletions(-)
+
+commit e8b82c4239da638ae77dfab07faaff33af4af1cc
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 24 11:46:36 2018 +0200
+
+ ImageStream::getLine: Fix ubsan undefined shift
+
+ I'm not totally sure this is the "correct" fix, but doesn't regress
+ any file on my test suite so seems one of those cases only happens
+ on bad files, and this helps oss-fuzz progress in its testing
+
+ Fixes oss-fuzz/8432
+
+ poppler/Stream.cc | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+commit c0e87eda688351b3caf222e5525f75a3190fd87c
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sun Jun 24 11:15:52 2018 +0200
+
+ AnnotBorder::parseDashArray: Fix correct calculation
+
+ obj not being a num also means not correct
+
+ fixes oss-fuzz/9056
+
+ poppler/Annot.cc | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+commit 322f8a453664fbad65c4b998034adf8df2ac0bea
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Sat Jun 23 00:41:18 2018 +0200
+
+ GfxDeviceNColorSpace::parse: Fix leak on malformed files
+
+ Fixes oss-fuzz/9036
+
+ poppler/GfxState.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+commit af4d5f31705dcfd65319da430f87744b5c1f3616
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 22 23:55:09 2018 +0200
+
+ SplashFTFont::makeGlyph: Bail out if constructor returned early
+
+ fixes oss-fuzz/8811
+
+ splash/SplashFTFont.cc | 7 +++++--
+ splash/SplashFTFont.h | 3 ++-
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+commit 0281c02b9a1cd776c45ca1fd2f5eeea15f6827a6
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 22 17:33:21 2018 +0200
+
+ (C) update from 2 commits ago
+
+ fofi/FoFiType1C.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+commit 1b65f9eb1beef0d1a41a4d59c89e4acd193a1a3f
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 22 17:29:26 2018 +0200
+
+ Gfx:Generalize protection against a pattern drawing itself
+
+ fixes oss-fuzz/8929
+
+ poppler/CairoOutputDev.cc | 2 +-
+ poppler/Gfx.cc | 53
+ ++++++++++++++++++++++++++--------------------
+ poppler/Gfx.h | 4 ++--
+ poppler/PSOutputDev.cc | 2 +-
+ poppler/SplashOutputDev.cc | 2 +-
+ 5 files changed, 35 insertions(+), 28 deletions(-)
+
+commit da349184c61034ac5818efe90d426de6af2c74d7
+Author: Albert Astals Cid <aacid@kde.org>
+Date: Fri Jun 22 16:48:11 2018 +0200
+
+ FoFiType1C::readPrivateDict: Fix potential uninitialized memory read
+
+ fixes oss-fuzz/8864
+
+ fofi/FoFiType1C.cc | 2 --
+ fofi/FoFiType1C.h | 6 +++---
+ 2 files changed, 3 insertions(+), 5 deletions(-)
+
commit 877dcec7e2357991d79508a2aefc39d1510bf235
Author: Albert Astals Cid <aacid@kde.org>
Date: Tue Jun 19 23:16:47 2018 +0200
diff --git a/Build/source/libs/poppler/poppler-src/NEWS b/Build/source/libs/poppler/poppler-src/NEWS
index 328265617a5..8df783696a6 100644
--- a/Build/source/libs/poppler/poppler-src/NEWS
+++ b/Build/source/libs/poppler/poppler-src/NEWS
@@ -1,3 +1,11 @@
+Release 0.67.0
+ core:
+ * Fix lots of security/leak issues found by oss-fuzz
+ * Splash: Optimize some files, making them 20% faster (now for AABGR8)
+
+ utils:
+ * pdfsig: Compile with libc != glibc. Bug #106783
+
Release 0.66.0
core:
* Fix lots of security/leak issues found by oss-fuzz
diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.cc b/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.cc
index 37694869d9c..caa4b42b6cf 100644
--- a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.cc
+++ b/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.cc
@@ -2564,8 +2564,6 @@ int FoFiType1C::getOp(int pos, GBool charstring, GBool *ok) {
int b0, b1, nyb0, nyb1, x, i;
b0 = getU8(pos++, ok);
- op.isNum = gTrue;
- op.isFP = gFalse;
if (b0 == 28) {
x = getU8(pos++, ok);
diff --git a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.h b/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.h
index 698dccd77fd..03a160040ea 100644
--- a/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.h
+++ b/Build/source/libs/poppler/poppler-src/fofi/FoFiType1C.h
@@ -15,6 +15,7 @@
//
// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
// Copyright (C) 2012 Thomas Freitag <Thomas.Freitag@alfa.de>
+// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
//
// 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
@@ -124,10 +125,10 @@ struct Type1CPrivateDict {
};
struct Type1COp {
- GBool isNum; // true -> number, false -> operator
- GBool isFP; // true -> floating point number, false -> int
+ GBool isNum = gTrue; // true -> number, false -> operator
+ GBool isFP = gFalse; // true -> floating point number, false -> int
union {
- double num; // if num is true
+ double num = 0; // if num is true
int op; // if num is false
};
};
diff --git a/Build/source/libs/poppler/poppler-src/poppler/Annot.cc b/Build/source/libs/poppler/poppler-src/poppler/Annot.cc
index d5a66524797..d37824c1d38 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/Annot.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/Annot.cc
@@ -522,16 +522,18 @@ AnnotBorder::AnnotBorder() {
GBool AnnotBorder::parseDashArray(Object *dashObj) {
GBool correct = gTrue;
- int tempLength = dashObj->arrayGetLength();
+ const int tempLength = dashObj->arrayGetLength();
double *tempDash = (double *) gmallocn (tempLength, sizeof (double));
// TODO: check not all zero (Line Dash Pattern Page 217 PDF 8.1)
for (int i = 0; i < tempLength && i < DASH_LIMIT && correct; i++) {
- Object obj1 = dashObj->arrayGet(i);
+ const Object obj1 = dashObj->arrayGet(i);
if (obj1.isNum()) {
tempDash[i] = obj1.getNum();
correct = tempDash[i] >= 0;
+ } else {
+ correct = gFalse;
}
}
diff --git a/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc b/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc
index 18124b8f8ea..8e8102e9e3f 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/CairoOutputDev.cc
@@ -960,7 +960,7 @@ GBool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat
adjusted_stroke_width_tmp = adjusted_stroke_width;
maskTmp = mask;
mask = nullptr;
- gfx = new Gfx(doc, this, resDict, &box, nullptr, nullptr, nullptr, gfxA->getXRef());
+ gfx = new Gfx(doc, this, resDict, &box, nullptr, nullptr, nullptr, gfxA);
if (paintType == 2)
inUncoloredPattern = gTrue;
gfx->display(str);
diff --git a/Build/source/libs/poppler/poppler-src/poppler/Form.cc b/Build/source/libs/poppler/poppler-src/poppler/Form.cc
index 820944e87c3..1b2888e997f 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/Form.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/Form.cc
@@ -136,7 +136,7 @@ bool FormWidget::isReadOnly() const
void FormWidget::setReadOnly(bool value)
{
- return field->setReadOnly(value);
+ field->setReadOnly(value);
}
int FormWidget::encodeID (unsigned pageNum, unsigned fieldNum)
@@ -269,11 +269,6 @@ const GooString* FormWidgetText::getContent () const
return parent()->getContent();
}
-GooString* FormWidgetText::getContentCopy ()
-{
- return parent()->getContentCopy();
-}
-
void FormWidgetText::updateWidgetAppearance()
{
if (widget)
@@ -330,7 +325,7 @@ void FormWidgetText::setTextFontSize(int fontSize)
parent()->setTextFontSize(fontSize);
}
-void FormWidgetText::setContent(GooString* new_content)
+void FormWidgetText::setContent(const GooString* new_content)
{
parent()->setContentCopy(new_content);
}
@@ -397,7 +392,7 @@ bool FormWidgetChoice::isSelected (int i) const
return parent()->isSelected(i);
}
-void FormWidgetChoice::setEditChoice (GooString* new_content)
+void FormWidgetChoice::setEditChoice (const GooString* new_content)
{
if (!hasEdit()) {
error(errInternal, -1, "FormFieldChoice::setEditChoice : trying to edit an non-editable choice\n");
@@ -1202,13 +1197,7 @@ void FormFieldText::print(int indent)
}
#endif
-GooString* FormFieldText::getContentCopy ()
-{
- if (!content) return nullptr;
- return new GooString(content);
-}
-
-void FormFieldText::setContentCopy (GooString* new_content)
+void FormFieldText::setContentCopy (const GooString* new_content)
{
delete content;
content = nullptr;
@@ -1563,7 +1552,7 @@ void FormFieldChoice::select (int i)
updateSelection();
}
-void FormFieldChoice::setEditChoice (GooString* new_content)
+void FormFieldChoice::setEditChoice (const GooString* new_content)
{
delete editedChoice;
editedChoice = nullptr;
diff --git a/Build/source/libs/poppler/poppler-src/poppler/Form.h b/Build/source/libs/poppler/poppler-src/poppler/Form.h
index b83ba9eaa35..02fc52fb192 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/Form.h
+++ b/Build/source/libs/poppler/poppler-src/poppler/Form.h
@@ -196,11 +196,9 @@ public:
FormWidgetText(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p);
//return the field's content (UTF16BE)
const GooString* getContent() const;
- //return a copy of the field's content (UTF16BE)
- GooString* getContentCopy();
- //except a UTF16BE string
- void setContent(GooString* new_content);
+ //expects a UTF16BE string
+ void setContent(const GooString* new_content);
void updateWidgetAppearance() override;
@@ -244,7 +242,7 @@ public:
//except a UTF16BE string
//only work for editable combo box, set the user-entered text as the current choice
- void setEditChoice(GooString* new_content);
+ void setEditChoice(const GooString* new_content);
const GooString* getEditChoice () const;
@@ -312,10 +310,10 @@ public:
GBool hasTextQuadding() const { return hasQuadding; }
VariableTextQuadding getTextQuadding() const { return quadding; }
- GooString *getPartialName() const { return partialName; }
+ const GooString *getPartialName() const { return partialName; }
void setPartialName(const GooString &name);
- GooString *getAlternateUiName() const { return alternateUiName; }
- GooString *getMappingName() const { return mappingName; }
+ const GooString *getAlternateUiName() const { return alternateUiName; }
+ const GooString *getMappingName() const { return mappingName; }
GooString *getFullyQualifiedName();
FormWidget* findWidgetByRef (Ref aref);
@@ -420,8 +418,7 @@ public:
FormFieldText(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set<int> *usedParents);
const GooString* getContent () const { return content; }
- GooString* getContentCopy ();
- void setContentCopy (GooString* new_content);
+ void setContentCopy (const GooString* new_content);
~FormFieldText();
bool isMultiline () const { return multiline; }
@@ -485,7 +482,7 @@ public:
void deselectAll ();
//only work for editable combo box, set the user-entered text as the current choice
- void setEditChoice(GooString* new_content);
+ void setEditChoice(const GooString* new_content);
const GooString* getEditChoice () const;
@@ -584,7 +581,7 @@ public:
GBool getNeedAppearances () const { return needAppearances; }
int getNumFields() const { return numFields; }
FormField* getRootField(int i) const { return rootFields[i]; }
- GooString* getDefaultAppearance() const { return defaultAppearance; }
+ const GooString* getDefaultAppearance() const { return defaultAppearance; }
VariableTextQuadding getTextQuadding() const { return quadding; }
GfxResources* getDefaultResources() const { return defaultResources; }
Object* getDefaultResourcesObj() { return &resDict; }
diff --git a/Build/source/libs/poppler/poppler-src/poppler/Gfx.cc b/Build/source/libs/poppler/poppler-src/poppler/Gfx.cc
index 572f435cd90..8f2c62d24a7 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/Gfx.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/Gfx.cc
@@ -589,12 +589,18 @@ Gfx::Gfx(PDFDoc *docA, OutputDev *outA, int pageNum, Dict *resDict,
Gfx::Gfx(PDFDoc *docA, OutputDev *outA, Dict *resDict,
PDFRectangle *box, PDFRectangle *cropBox,
GBool (*abortCheckCbkA)(void *data),
- void *abortCheckCbkDataA, XRef *xrefA)
+ void *abortCheckCbkDataA, Gfx *gfxA)
{
int i;
doc = docA;
- xref = (xrefA == nullptr) ? doc->getXRef() : xrefA;
+ if (gfxA) {
+ xref = gfxA->getXRef();
+ formsDrawing = gfxA->formsDrawing;
+ charProcDrawing = gfxA->charProcDrawing;
+ } else {
+ xref = doc->getXRef();
+ }
catalog = doc->getCatalog();
subPage = gTrue;
printCommands = globalParams->getPrintCommands();
@@ -2202,37 +2208,38 @@ void Gfx::doTilingPatternFill(GfxTilingPattern *tPat,
}
m1[4] = m[4];
m1[5] = m[5];
- if (out->useTilingPatternFill() &&
- out->tilingPatternFill(state, this, catalog, tPat->getContentStream(),
- tPat->getMatrix(), tPat->getPaintType(), tPat->getTilingType(),
- tPat->getResDict(), m1, tPat->getBBox(),
- xi0, yi0, xi1, yi1, xstep, ystep)) {
- goto restore;
- } else {
- bool shouldDrawForm = gTrue;
+ {
+ bool shouldDrawPattern = gTrue;
std::set<int>::iterator patternRefIt;
const int patternRefNum = tPat->getPatternRefNum();
if (patternRefNum != -1) {
if (formsDrawing.find(patternRefNum) == formsDrawing.end()) {
patternRefIt = formsDrawing.insert(patternRefNum).first;
} else {
- shouldDrawForm = gFalse;
+ shouldDrawPattern = gFalse;
}
}
-
- if (shouldDrawForm) {
- out->updatePatternOpacity(state);
- for (yi = yi0; yi < yi1; ++yi) {
- for (xi = xi0; xi < xi1; ++xi) {
- x = xi * xstep;
- y = yi * ystep;
- m1[4] = x * m[0] + y * m[2] + m[4];
- m1[5] = x * m[1] + y * m[3] + m[5];
- drawForm(tPat->getContentStream(), tPat->getResDict(),
- m1, tPat->getBBox());
+ if (shouldDrawPattern) {
+ if (out->useTilingPatternFill() &&
+ out->tilingPatternFill(state, this, catalog, tPat->getContentStream(),
+ tPat->getMatrix(), tPat->getPaintType(), tPat->getTilingType(),
+ tPat->getResDict(), m1, tPat->getBBox(),
+ xi0, yi0, xi1, yi1, xstep, ystep)) {
+ // do nothing
+ } else {
+ out->updatePatternOpacity(state);
+ for (yi = yi0; yi < yi1; ++yi) {
+ for (xi = xi0; xi < xi1; ++xi) {
+ x = xi * xstep;
+ y = yi * ystep;
+ m1[4] = x * m[0] + y * m[2] + m[4];
+ m1[5] = x * m[1] + y * m[3] + m[5];
+ drawForm(tPat->getContentStream(), tPat->getResDict(),
+ m1, tPat->getBBox());
+ }
}
+ out->clearPatternOpacity(state);
}
- out->clearPatternOpacity(state);
if (patternRefNum != -1) {
formsDrawing.erase(patternRefIt);
}
@@ -3041,7 +3048,11 @@ void Gfx::doRadialShFill(GfxRadialShading *shading) {
if (t < 1) {
n = 3;
} else {
- n = (int)(M_PI / acos(1 - 0.1 / t));
+ const double tmp = 1 - 0.1 / t;
+ if (unlikely(tmp == 1))
+ n = 200;
+ else
+ n = (int)(M_PI / acos(tmp));
if (n < 3) {
n = 3;
} else if (n > 200) {
diff --git a/Build/source/libs/poppler/poppler-src/poppler/Gfx.h b/Build/source/libs/poppler/poppler-src/poppler/Gfx.h
index 2ea0d9faf15..3ac4c929fc8 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/Gfx.h
+++ b/Build/source/libs/poppler/poppler-src/poppler/Gfx.h
@@ -161,7 +161,7 @@ public:
Gfx(PDFDoc *docA, OutputDev *outA, Dict *resDict,
PDFRectangle *box, PDFRectangle *cropBox,
GBool (*abortCheckCbkA)(void *data) = NULL,
- void *abortCheckCbkDataA = NULL, XRef *xrefA = NULL);
+ void *abortCheckCbkDataA = NULL, Gfx *gfxA = NULL);
#ifdef USE_CMS
void initDisplayProfile();
#endif
@@ -236,7 +236,7 @@ private:
Parser *parser; // parser for page content stream(s)
- std::set<int> formsDrawing; // the forms that are being drawn
+ std::set<int> formsDrawing; // the forms/patterns that are being drawn
std::set<int> charProcDrawing; // the charProc that are being drawn
GBool // callback to check for an abort
diff --git a/Build/source/libs/poppler/poppler-src/poppler/GfxState.cc b/Build/source/libs/poppler/poppler-src/poppler/GfxState.cc
index 157bcf44181..956a214bf84 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/GfxState.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/GfxState.cc
@@ -3057,7 +3057,8 @@ GfxColorSpace *GfxDeviceNColorSpace::parse(GfxResources *res, Array *arr, Output
Object obj2 = obj1.arrayGet(i);
if (!obj2.isName()) {
error(errSyntaxWarning, -1, "Bad DeviceN color space (names)");
- goto err1;
+ nCompsA = i;
+ goto err3;
}
namesA[i] = new GooString(obj2.getName());
}
@@ -3899,10 +3900,13 @@ GfxUnivariateShading::~GfxUnivariateShading() {
int GfxUnivariateShading::getColor(double t, GfxColor *color) {
double out[gfxColorMaxComps];
+ int nComps;
- // NB: there can be one function with n outputs or n functions with
- // one output each (where n = number of color components)
- const int nComps = nFuncs * funcs[0]->getOutputSize();
+ if (likely(nFuncs >= 1)) {
+ // NB: there can be one function with n outputs or n functions with
+ // one output each (where n = number of color components)
+ nComps = nFuncs * funcs[0]->getOutputSize();
+ }
if (unlikely(nFuncs < 1 || nComps > gfxColorMaxComps)) {
for (int i = 0; i < gfxColorMaxComps; i++)
@@ -5665,7 +5669,7 @@ GfxPatchMeshShading *GfxPatchMeshShading::parse(GfxResources *res, int typeA, Di
}
void GfxPatchMeshShading::getParameterizedColor(double t, GfxColor *color) {
- double out[gfxColorMaxComps];
+ double out[gfxColorMaxComps] = {};
for (int j = 0; j < nFuncs; ++j) {
funcs[j]->transform(&t, &out[j]);
diff --git a/Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.cc b/Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.cc
index 2ed787e0510..25df3db8ae0 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/JBIG2Stream.cc
@@ -2338,7 +2338,7 @@ JBIG2Bitmap *JBIG2Stream::readTextRegion(GBool huff, GBool refine,
JBIG2Bitmap *bitmap;
JBIG2Bitmap *symbolBitmap;
Guint strips;
- int t = 0, dt = 0, tt, s, ds = 0, sFirst, j;
+ int t = 0, dt = 0, tt, s, ds = 0, sFirst, j = 0;
int rdw, rdh, rdx, rdy, ri = 0, refDX, refDY, bmSize;
Guint symID, inst, bw, bh;
diff --git a/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc b/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc
index b466bc69a61..d1ead5862a8 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/PSOutputDev.cc
@@ -4526,7 +4526,7 @@ GBool PSOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *cat, O
box.y1 = bbox[1];
box.x2 = bbox[2];
box.y2 = bbox[3];
- gfx = new Gfx(doc, this, resDict, &box, nullptr, nullptr, nullptr, gfxA->getXRef());
+ gfx = new Gfx(doc, this, resDict, &box, nullptr, nullptr, nullptr, gfxA);
writePSFmt("[{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] cm\n", mat[0], mat[1], mat[2], mat[3], tx, ty);
inType3Char = gTrue;
gfx->display(str);
diff --git a/Build/source/libs/poppler/poppler-src/poppler/Parser.cc b/Build/source/libs/poppler/poppler-src/poppler/Parser.cc
index 39c9a96720b..8b0093e3fcf 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/Parser.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/Parser.cc
@@ -154,6 +154,11 @@ Object Parser::getObj(GBool simpleOnly,
const int gen = buf1.getInt();
shift();
shift();
+
+ if (unlikely(num <= 0 || gen < 0)) {
+ return Object();
+ }
+
return Object(num, gen);
} else {
return Object(num);
diff --git a/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc b/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc
index 74953839a30..3e883970e3e 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/SplashOutputDev.cc
@@ -4697,7 +4697,7 @@ GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfxA, Catalog *ca
box.x1 = bbox[0]; box.y1 = bbox[1];
box.x2 = bbox[2]; box.y2 = bbox[3];
- gfx = new Gfx(doc, this, resDict, &box, nullptr, nullptr, nullptr, gfxA->getXRef());
+ gfx = new Gfx(doc, this, resDict, &box, nullptr, nullptr, nullptr, gfxA);
// set pattern transformation matrix
gfx->getState()->setCTM(m1.m[0], m1.m[1], m1.m[2], m1.m[3], m1.m[4], m1.m[5]);
updateCTM(gfx->getState(), m1.m[0], m1.m[1], m1.m[2], m1.m[3], m1.m[4], m1.m[5]);
diff --git a/Build/source/libs/poppler/poppler-src/poppler/Stream.cc b/Build/source/libs/poppler/poppler-src/poppler/Stream.cc
index 21bd3b9bdde..2c55f295979 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/Stream.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/Stream.cc
@@ -499,12 +499,6 @@ GBool ImageStream::getPixel(Guchar *pix) {
}
Guchar *ImageStream::getLine() {
- Gulong buf, bitMask;
- int bits;
- int c;
- int i;
- Guchar *p;
-
if (unlikely(inputLine == nullptr)) {
return nullptr;
}
@@ -512,9 +506,9 @@ Guchar *ImageStream::getLine() {
int readChars = str->doGetChars(inputLineSize, inputLine);
for ( ; readChars < inputLineSize; readChars++) inputLine[readChars] = EOF;
if (nBits == 1) {
- p = inputLine;
- for (i = 0; i < nVals; i += 8) {
- c = *p++;
+ Guchar *p = inputLine;
+ for (int i = 0; i < nVals; i += 8) {
+ const int c = *p++;
imgLine[i+0] = (Guchar)((c >> 7) & 1);
imgLine[i+1] = (Guchar)((c >> 6) & 1);
imgLine[i+2] = (Guchar)((c >> 5) & 1);
@@ -531,18 +525,18 @@ Guchar *ImageStream::getLine() {
// we assume a component fits in 8 bits, with this hack
// we treat 16 bit images as 8 bit ones until it's fixed correctly.
// The hack has another part on GfxImageColorMap::GfxImageColorMap
- p = inputLine;
- for (i = 0; i < nVals; ++i) {
+ Guchar *p = inputLine;
+ for (int i = 0; i < nVals; ++i) {
imgLine[i] = *p++;
p++;
}
} else {
- bitMask = (1 << nBits) - 1;
- buf = 0;
- bits = 0;
- p = inputLine;
- for (i = 0; i < nVals; ++i) {
- if (bits < nBits) {
+ const Gulong bitMask = (1 << nBits) - 1;
+ Gulong buf = 0;
+ int bits = 0;
+ Guchar *p = inputLine;
+ for (int i = 0; i < nVals; ++i) {
+ while (bits < nBits) {
buf = (buf << 8) | (*p++ & 0xff);
bits += 8;
}
diff --git a/Build/source/libs/poppler/poppler-src/poppler/XRef.cc b/Build/source/libs/poppler/poppler-src/poppler/XRef.cc
index 95e1a1d45b5..6eadc0a193e 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/XRef.cc
+++ b/Build/source/libs/poppler/poppler-src/poppler/XRef.cc
@@ -293,7 +293,7 @@ XRef::XRef() {
init();
}
-XRef::XRef(Object *trailerDictA) {
+XRef::XRef(const Object *trailerDictA) {
init();
if (trailerDictA->isDict())
@@ -393,7 +393,7 @@ XRef::~XRef() {
#endif
}
-XRef *XRef::copy() {
+XRef *XRef::copy() const {
XRef *xref = new XRef();
xref->str = str->copy();
xref->strOwner = gTrue;
@@ -1028,7 +1028,7 @@ GBool XRef::constructXRef(GBool *wasReconstructed, GBool needCatalogDict) {
}
void XRef::setEncryption(int permFlagsA, GBool ownerPasswordOkA,
- Guchar *fileKeyA, int keyLengthA,
+ const Guchar *fileKeyA, int keyLengthA,
int encVersionA, int encRevisionA,
CryptAlgorithm encAlgorithmA) {
int i;
@@ -1063,14 +1063,14 @@ void XRef::getEncryptionParameters(Guchar **fileKeyA, CryptAlgorithm *encAlgorit
}
}
-GBool XRef::okToPrint(GBool ignoreOwnerPW) {
+GBool XRef::okToPrint(GBool ignoreOwnerPW) const {
return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permPrint);
}
// we can print at high res if we are only doing security handler revision
// 2 (and we are allowed to print at all), or with security handler rev
// 3 and we are allowed to print, and bit 12 is set.
-GBool XRef::okToPrintHighRes(GBool ignoreOwnerPW) {
+GBool XRef::okToPrintHighRes(GBool ignoreOwnerPW) const {
if (encrypted) {
if (2 == encRevision) {
return (okToPrint(ignoreOwnerPW));
@@ -1085,27 +1085,27 @@ GBool XRef::okToPrintHighRes(GBool ignoreOwnerPW) {
}
}
-GBool XRef::okToChange(GBool ignoreOwnerPW) {
+GBool XRef::okToChange(GBool ignoreOwnerPW) const {
return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permChange);
}
-GBool XRef::okToCopy(GBool ignoreOwnerPW) {
+GBool XRef::okToCopy(GBool ignoreOwnerPW) const {
return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permCopy);
}
-GBool XRef::okToAddNotes(GBool ignoreOwnerPW) {
+GBool XRef::okToAddNotes(GBool ignoreOwnerPW) const {
return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permNotes);
}
-GBool XRef::okToFillForm(GBool ignoreOwnerPW) {
+GBool XRef::okToFillForm(GBool ignoreOwnerPW) const {
return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permFillForm);
}
-GBool XRef::okToAccessibility(GBool ignoreOwnerPW) {
+GBool XRef::okToAccessibility(GBool ignoreOwnerPW) const {
return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permAccessibility);
}
-GBool XRef::okToAssemble(GBool ignoreOwnerPW) {
+GBool XRef::okToAssemble(GBool ignoreOwnerPW) const {
return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permAssemble);
}
@@ -1357,7 +1357,7 @@ void XRef::add(int num, int gen, Goffset offs, GBool used) {
}
}
-void XRef::setModifiedObject (Object* o, Ref r) {
+void XRef::setModifiedObject (const Object* o, Ref r) {
xrefLocker();
if (r.num < 0 || r.num >= size) {
error(errInternal, -1,"XRef::setModifiedObject on unknown ref: {0:d}, {1:d}\n", r.num, r.gen);
@@ -1369,7 +1369,7 @@ void XRef::setModifiedObject (Object* o, Ref r) {
setModified();
}
-Ref XRef::addIndirectObject (Object* o) {
+Ref XRef::addIndirectObject (const Object *o) {
int entryIndexToUse = -1;
for (int i = 1; entryIndexToUse == -1 && i < size; ++i) {
XRefEntry *e = getEntry(i, false /* complainIfMissing */);
diff --git a/Build/source/libs/poppler/poppler-src/poppler/XRef.h b/Build/source/libs/poppler/poppler-src/poppler/XRef.h
index 686b3eb7cd9..bf904d507c0 100644
--- a/Build/source/libs/poppler/poppler-src/poppler/XRef.h
+++ b/Build/source/libs/poppler/poppler-src/poppler/XRef.h
@@ -76,7 +76,7 @@ struct XRefEntry {
DontRewrite // Entry must not be written back in case of full rewrite
};
- inline GBool getFlag(Flag flag) {
+ inline GBool getFlag(Flag flag) const {
const int mask = (1 << (int)flag);
return (flags & mask) != 0;
}
@@ -97,7 +97,7 @@ public:
// Constructor, create an empty XRef, used for PDF writing
XRef();
// Constructor, create an empty XRef but with info dict, used for PDF writing
- XRef(Object *trailerDictA);
+ XRef(const Object *trailerDictA);
// Constructor. Read xref table from stream.
XRef(BaseStream *strA, Goffset pos, Goffset mainXRefEntriesOffsetA = 0, GBool *wasReconstructed = NULL, GBool reconstruct = false);
@@ -108,20 +108,20 @@ public:
XRef& operator=(const XRef &) = delete;
// Copy xref but with new base stream!
- XRef *copy();
+ XRef *copy() const;
// Is xref table valid?
- GBool isOk() { return ok; }
+ GBool isOk() const { return ok; }
// Is the last XRef section a stream or a table?
- GBool isXRefStream() { return xRefStream; }
+ GBool isXRefStream() const { return xRefStream; }
// Get the error code (if isOk() returns false).
- int getErrorCode() { return errCode; }
+ int getErrorCode() const { return errCode; }
// Set the encryption parameters.
void setEncryption(int permFlagsA, GBool ownerPasswordOkA,
- Guchar *fileKeyA, int keyLengthA,
+ const Guchar *fileKeyA, int keyLengthA,
int encVersionA, int encRevisionA,
CryptAlgorithm encAlgorithmA);
// Mark Encrypt entry as Unencrypted
@@ -130,18 +130,18 @@ public:
void getEncryptionParameters(Guchar **fileKeyA, CryptAlgorithm *encAlgorithmA, int *keyLengthA);
// Is the file encrypted?
- GBool isEncrypted() { return encrypted; }
+ GBool isEncrypted() const { return encrypted; }
// Check various permissions.
- GBool okToPrint(GBool ignoreOwnerPW = gFalse);
- GBool okToPrintHighRes(GBool ignoreOwnerPW = gFalse);
- GBool okToChange(GBool ignoreOwnerPW = gFalse);
- GBool okToCopy(GBool ignoreOwnerPW = gFalse);
- GBool okToAddNotes(GBool ignoreOwnerPW = gFalse);
- GBool okToFillForm(GBool ignoreOwnerPW = gFalse);
- GBool okToAccessibility(GBool ignoreOwnerPW = gFalse);
- GBool okToAssemble(GBool ignoreOwnerPW = gFalse);
- int getPermFlags() { return permFlags; }
+ GBool okToPrint(GBool ignoreOwnerPW = gFalse) const;
+ GBool okToPrintHighRes(GBool ignoreOwnerPW = gFalse) const;
+ GBool okToChange(GBool ignoreOwnerPW = gFalse) const;
+ GBool okToCopy(GBool ignoreOwnerPW = gFalse) const;
+ GBool okToAddNotes(GBool ignoreOwnerPW = gFalse) const;
+ GBool okToFillForm(GBool ignoreOwnerPW = gFalse) const;
+ GBool okToAccessibility(GBool ignoreOwnerPW = gFalse) const;
+ GBool okToAssemble(GBool ignoreOwnerPW = gFalse) const;
+ int getPermFlags() const { return permFlags; }
// Get catalog object.
Object getCatalog();
@@ -161,11 +161,11 @@ public:
void removeDocInfo();
// Return the number of objects in the xref table.
- int getNumObjects() { return size; }
+ int getNumObjects() const { return size; }
// Return the catalog object reference.
- int getRootNum() { return rootNum; }
- int getRootGen() { return rootGen; }
+ int getRootNum() const { return rootNum; }
+ int getRootGen() const { return rootGen; }
// Get end position for a stream in a damaged file.
// Returns false if unknown or file is not damaged.
@@ -187,13 +187,13 @@ public:
Object *getTrailerDict() { return &trailerDict; }
// Was the XRef modified?
- GBool isModified() { return modified; }
+ GBool isModified() const { return modified; }
// Set the modification flag for XRef to true.
void setModified() { modified = gTrue; }
// Write access
- void setModifiedObject(Object* o, Ref r);
- Ref addIndirectObject (Object* o);
+ void setModifiedObject(const Object* o, Ref r);
+ Ref addIndirectObject (const Object* o);
void removeIndirectObject(Ref r);
void add(int num, int gen, Goffset offs, GBool used);
diff --git a/Build/source/libs/poppler/version.ac b/Build/source/libs/poppler/version.ac
index 195b90c5486..a9daa9391cb 100644
--- a/Build/source/libs/poppler/version.ac
+++ b/Build/source/libs/poppler/version.ac
@@ -9,4 +9,4 @@ dnl
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current poppler version
-m4_define([poppler_version], [0.66.0])
+m4_define([poppler_version], [0.67.0])