From a6e9bb4c7bad649cb44efaeef67fa18090348c53 Mon Sep 17 00:00:00 2001 From: Peter Foley Date: Sat, 10 Nov 2012 15:16:14 -0500 Subject: fdo#38878 upgrade xpdf to poppler Change-Id: Ib908a3acba1faabeb411b4d1459968a362ee8029 Reviewed-on: https://gerrit.libreoffice.org/1036 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist --- sdext/Executable_xpdfimport.mk | 5 +--- .../pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 8 ------- sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 27 +--------------------- 3 files changed, 2 insertions(+), 38 deletions(-) (limited to 'sdext') diff --git a/sdext/Executable_xpdfimport.mk b/sdext/Executable_xpdfimport.mk index f333ef9d6bce..e1e7db339935 100644 --- a/sdext/Executable_xpdfimport.mk +++ b/sdext/Executable_xpdfimport.mk @@ -34,13 +34,10 @@ $(eval $(call gb_Executable_use_packages,xpdfimport,\ $(eval $(call gb_Executable_use_externals,xpdfimport,\ poppler \ + fontconfig \ zlib \ )) -$(eval $(call gb_Executable_set_include,xpdfimport,\ - $$(INCLUDE) \ -)) - $(eval $(call gb_Executable_add_exception_objects,xpdfimport,\ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl \ sdext/source/pdfimport/xpdfwrapper/pnghelper \ diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx index e5e48fc8a1a0..5d537e1e3fef 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx @@ -34,9 +34,6 @@ #include "Link.h" #include "Object.h" #include "OutputDev.h" -#ifndef SYSTEM_POPPLER -# include "parseargs.h" -#endif #include "GlobalParams.h" #include "PDFDoc.h" @@ -52,16 +49,11 @@ class GfxPath; class GfxFont; class PDFDoc; -#ifndef SYSTEM_POPPLER -#define POPPLER_CHECK_VERSION(major,minor,micro) (0) -typedef GString GooString; -#else #include #define POPPLER_CHECK_VERSION(major,minor,micro) \ (POPPLER_VERSION_MAJOR > (major) || \ (POPPLER_VERSION_MAJOR == (major) && POPPLER_VERSION_MINOR > (minor)) || \ (POPPLER_VERSION_MAJOR == (major) && POPPLER_VERSION_MINOR == (minor) && POPPLER_VERSION_MICRO >= (micro))) -#endif namespace pdfi { diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx index 3b9488565d56..fc6437b946d3 100644 --- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx @@ -25,33 +25,12 @@ FILE* g_binary_out=stderr; -#ifndef SYSTEM_POPPLER -static char ownerPassword[33] = "\001"; -static char userPassword[33] = "\001"; -static char outputFile[256] = "\001"; - -static ArgDesc argDesc[] = { - {(char*)"-f", argString, outputFile, sizeof(outputFile), - (char*)"output file for binary streams"}, - {(char*)"-opw", argString, ownerPassword, sizeof(ownerPassword), - (char*)"owner password (for encrypted files)"}, - {(char*)"-upw", argString, userPassword, sizeof(userPassword), - (char*)"user password (for encrypted files)"}, - {NULL, argString, NULL, 0, NULL } -}; -#else static const char *ownerPassword = "\001"; static const char *userPassword = "\001"; static const char *outputFile = "\001"; -#endif int main(int argc, char **argv) { -#ifndef SYSTEM_POPPLER - // parse args; initialize to defaults - if( !parseArgs(argDesc, &argc, argv) ) - return 1; -#else int k = 0; while (k < argc) { @@ -78,19 +57,15 @@ int main(int argc, char **argv) } ++k; } -#endif if( argc < 2 ) return 1; // read config file globalParams = new GlobalParams( -#ifndef SYSTEM_POPPLER - (char*)"" -#endif ); globalParams->setErrQuiet(gTrue); -#if !defined(SYSTEM_POPPLER) || defined(_MSC_VER) +#if _MSC_VER globalParams->setupBaseFonts(NULL); #endif -- cgit