summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-08 14:01:17 +0200
committerFridrich Strba <fridrich@documentfoundation.org>2013-07-08 16:25:32 +0000
commiteb276d11a652601f743d69ada7a38016bd97d73e (patch)
tree6cbbf7c8705bf7fd29ab2d3bed373977d657c7e2 /sdext
parent39f42b0b03489459540404dd218c38709853c021 (diff)
fdo#38878: Upgrading internal xpdf -> poppler
Change-Id: I00aafb3fd275e6be3b5d0eb370320e5325110da5 Reviewed-on: https://gerrit.libreoffice.org/4770 Tested-by: Fridrich Strba <fridrich@documentfoundation.org> Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/Executable_xpdfimport.mk6
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx8
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx30
3 files changed, 8 insertions, 36 deletions
diff --git a/sdext/Executable_xpdfimport.mk b/sdext/Executable_xpdfimport.mk
index 39f4228616af..af993e827b68 100644
--- a/sdext/Executable_xpdfimport.mk
+++ b/sdext/Executable_xpdfimport.mk
@@ -12,9 +12,15 @@ $(eval $(call gb_Executable_Executable,xpdfimport))
$(eval $(call gb_Executable_use_externals,xpdfimport,\
boost_headers \
poppler \
+ $(if $(filter-out WNT,$(OS)),fontconfig) \
zlib \
))
+$(eval $(call gb_Executable_use_libraries,xpdimport,\
+ sal \
+ $(gb_UWINAPI) \
+))
+
$(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 2daa5b896d29..db80221cb66a 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -36,9 +36,6 @@
#include "Link.h"
#include "Object.h"
#include "OutputDev.h"
-#ifndef SYSTEM_POPPLER
-# include "parseargs.h"
-#endif
#include "GlobalParams.h"
#include "PDFDoc.h"
@@ -54,16 +51,11 @@
class GfxPath;
class GfxFont;
class PDFDoc;
-#ifndef SYSTEM_POPPLER
-#define POPPLER_CHECK_VERSION(major,minor,micro) (0)
-typedef GString GooString;
-#else
#include <cpp/poppler-version.h>
#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 afaec25d9dcf..94171b03f1df 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,14 @@ int main(int argc, char **argv)
}
++k;
}
-#endif
if( argc != 3 )
return 1;
// read config file
- globalParams = new GlobalParams(
-#ifndef SYSTEM_POPPLER
- (char*)""
-#endif
- );
+ globalParams = new GlobalParams();
globalParams->setErrQuiet(gTrue);
-#if !defined(SYSTEM_POPPLER) || defined(_MSC_VER)
+#if defined(_MSC_VER)
globalParams->setupBaseFonts(NULL);
#endif