diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-11-13 10:27:21 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-11-13 10:28:15 +0200 |
commit | 97d8b882210c5a7f3bf6b3d53bfef1fb9a487acf (patch) | |
tree | 9ca1404bdfc4fb13339d57ff3db39e369b7c9f9d /sdext/source/pdfimport | |
parent | 39f9eb0d856293a974e2f024b29dca20068af073 (diff) |
Revert "fdo#38878 upgrade xpdf to poppler"
Also revert my two minor follow-up popper commits.
Poppler doesn't build on Mac OS X. It uses fontconfig, and we don't
depend on that on the Mac.
There is a patch from 2009
http://lists.freedesktop.org/archives/poppler/2009-July/004932.html
(actual patch at
http://lists.freedesktop.org/archives/poppler/attachments/20090712/f3b154d0/attachment-0001.obj
) that makes poppler not use fontconfig on the Mac, but it was never
upstreamed.
And that patch uses the obsolete ATSUI API, which we want to stop
using in LO code, not introduce new uses of.
This reverts commit 39f9eb0d856293a974e2f024b29dca20068af073.
This reverts commit 0941c211858416f6117548e093b428b64785f98a.
This reverts commit a6e9bb4c7bad649cb44efaeef67fa18090348c53.
Diffstat (limited to 'sdext/source/pdfimport')
-rw-r--r-- | sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 8 | ||||
-rw-r--r-- | sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 27 |
2 files changed, 34 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx index 5d537e1e3fef..e5e48fc8a1a0 100644 --- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx @@ -34,6 +34,9 @@ #include "Link.h" #include "Object.h" #include "OutputDev.h" +#ifndef SYSTEM_POPPLER +# include "parseargs.h" +#endif #include "GlobalParams.h" #include "PDFDoc.h" @@ -49,11 +52,16 @@ 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 fc6437b946d3..3b9488565d56 100644 --- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx @@ -25,12 +25,33 @@ 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) { @@ -57,15 +78,19 @@ 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 _MSC_VER +#if !defined(SYSTEM_POPPLER) || defined(_MSC_VER) globalParams->setupBaseFonts(NULL); #endif |