summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2015-02-12 12:09:59 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2015-02-12 12:09:59 +0000
commitad004871e4e993c8127abffbc926968b8545e23c (patch)
tree524d97509e0b38be34cdac5e8b07c6c72da12d78
parentextensions. gimp_xcf.py. add error message if Inkscape installation not found... (diff)
downloadinkscape-ad004871e4e993c8127abffbc926968b8545e23c.tar.gz
inkscape-ad004871e4e993c8127abffbc926968b8545e23c.zip
Bump Poppler dependency to 0.8.3
(bzr r13917)
-rw-r--r--configure.ac11
-rw-r--r--src/extension/internal/pdfinput/pdf-parser.cpp20
2 files changed, 3 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac
index a903f8f84..f5d16457b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -421,12 +421,12 @@ AC_ARG_ENABLE(poppler-cairo,
[enable_poppler_cairo=$enableval], [enable_poppler_cairo=yes])
POPPLER_CFLAGS=""
-PKG_CHECK_MODULES(POPPLER, poppler >= 0.5.9, poppler=yes, poppler=no)
+PKG_CHECK_MODULES(POPPLER, poppler >= 0.8.3, poppler=yes, poppler=no)
if test "x$poppler" = "xyes"; then
dnl Working libpoppler
dnl Have to test libpoppler-glib presence
- PKG_CHECK_MODULES(POPPLER_GLIB, poppler-glib >= 0.5.9, poppler_glib=yes, poppler_glib=no)
+ PKG_CHECK_MODULES(POPPLER_GLIB, poppler-glib >= 0.8.3, poppler_glib=yes, poppler_glib=no)
if test "x$poppler_glib" = "xyes"; then
dnl Working libpoppler-glib found
dnl Check whether the Cairo SVG backend is available
@@ -438,7 +438,7 @@ if test "x$poppler" = "xyes"; then
if test "x$enable_poppler_cairo" = "xyes"; then
dnl Have to test libpoppler-cairo presence for PDF preview
dnl AC_CHECK_HEADER(Magick++.h, magick_ok=yes, magick_ok=no)
- PKG_CHECK_MODULES(POPPLER_CAIRO, poppler-cairo >= 0.5.9, poppler_cairo=yes, poppler_cairo=no)
+ PKG_CHECK_MODULES(POPPLER_CAIRO, poppler-cairo >= 0.8.3, poppler_cairo=yes, poppler_cairo=no)
if test "x$poppler_glib" = "xyes" -a "x$poppler_cairo" = "xyes" -a \
"x$cairo_svg" = "xno"
then
@@ -460,11 +460,6 @@ fi
AC_SUBST(POPPLER_CFLAGS)
AC_SUBST(POPPLER_LIBS)
-PKG_CHECK_MODULES(POPPLER_GFXFONT, poppler >= 0.8.3, popplernew=yes, popplernew=no)
-if test "x$popplernew" = "xyes"; then
- AC_DEFINE(POPPLER_NEW_GFXFONT, 1, [Use GfxFont from Poppler >= 0.8.3])
-fi
-
PKG_CHECK_MODULES(POPPLER_NEWERRORAPI, poppler >= 0.20.0, popplernewerror=yes, popplernewerror=no)
if test "x$popplernewerror" = "xyes"; then
AC_DEFINE(POPPLER_NEW_ERRORAPI, 1, [Use new error API from Poppler >= 0.20.0])
diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp
index 812fa373f..cc0b38515 100644
--- a/src/extension/internal/pdfinput/pdf-parser.cpp
+++ b/src/extension/internal/pdfinput/pdf-parser.cpp
@@ -2586,24 +2586,12 @@ void PdfParser::opShowSpaceText(Object args[], int /*numArgs*/)
}
}
-
-
-/*
- * The `POPPLER_NEW_GFXFONT' stuff is for the change to GfxFont's getNextChar() call.
- * Thanks to tsdgeos for the fix.
- * Miklos, does this look ok?
- */
-
void PdfParser::doShowText(GooString *s) {
GfxFont *font;
int wMode;
double riseX, riseY;
CharCode code;
-#ifdef POPPLER_NEW_GFXFONT
Unicode *u = NULL;
-#else
- Unicode u[8];
-#endif
double x, y, dx, dy, tdx, tdy;
double originX, originY, tOriginX, tOriginY;
double oldCTM[6], newCTM[6];
@@ -2651,11 +2639,7 @@ void PdfParser::doShowText(GooString *s) {
len = s->getLength();
while (len > 0) {
n = font->getNextChar(p, len, &code,
-#ifdef POPPLER_NEW_GFXFONT
&u, &uLen, /* TODO: This looks like a memory leak for u. */
-#else
- u, (int)(sizeof(u) / sizeof(Unicode)), &uLen,
-#endif
&dx, &dy, &originX, &originY);
dx = dx * state->getFontSize() + state->getCharSpace();
if (n == 1 && *p == ' ') {
@@ -2708,11 +2692,7 @@ void PdfParser::doShowText(GooString *s) {
len = s->getLength();
while (len > 0) {
n = font->getNextChar(p, len, &code,
-#ifdef POPPLER_NEW_GFXFONT
&u, &uLen, /* TODO: This looks like a memory leak for u. */
-#else
- u, (int)(sizeof(u) / sizeof(Unicode)), &uLen,
-#endif
&dx, &dy, &originX, &originY);
if (wMode) {