Kaydet (Commit) 64b3c5d3 authored tarafından Pedro Giffuni's avatar Pedro Giffuni

Cleanup some defines since Poppler can only come from the system.

We don't carry Poppler (PDF rendering library) within AOO,
due to the restrictive licensing, so we can only use it
if it's provided through the system.

For the pdf-import extension we can therefore assume it is
the only option and cleanup the code accordingly.
üst 87635e13
...@@ -42,7 +42,7 @@ CFLAGS+=-DSYSTEM_ZLIB ...@@ -42,7 +42,7 @@ CFLAGS+=-DSYSTEM_ZLIB
@echo "PDF Import extension disabled." @echo "PDF Import extension disabled."
.ENDIF .ENDIF
CFLAGS += $(POPPLER_CFLAGS) -DSYSTEM_POPPLER CFLAGS += $(POPPLER_CFLAGS)
# --- Files -------------------------------------------------------- # --- Files --------------------------------------------------------
UWINAPILIB:= UWINAPILIB:=
......
...@@ -37,9 +37,6 @@ ...@@ -37,9 +37,6 @@
#include "Object.h" #include "Object.h"
#include "OutputDev.h" #include "OutputDev.h"
#include "Stream.h" #include "Stream.h"
#ifndef SYSTEM_POPPLER
# include "parseargs.h"
#endif
#include "GlobalParams.h" #include "GlobalParams.h"
#include "PDFDoc.h" #include "PDFDoc.h"
...@@ -55,9 +52,6 @@ ...@@ -55,9 +52,6 @@
class GfxPath; class GfxPath;
class GfxFont; class GfxFont;
class PDFDoc; class PDFDoc;
#ifndef SYSTEM_POPPLER
typedef GString GooString;
#endif
namespace pdfi namespace pdfi
{ {
......
...@@ -28,33 +28,12 @@ ...@@ -28,33 +28,12 @@
FILE* g_binary_out=stderr; 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 *ownerPassword = "\001";
static const char *userPassword = "\001"; static const char *userPassword = "\001";
static const char *outputFile = "\001"; static const char *outputFile = "\001";
#endif
int main(int argc, char **argv) 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; int k = 0;
while (k < argc) while (k < argc)
{ {
...@@ -81,19 +60,15 @@ int main(int argc, char **argv) ...@@ -81,19 +60,15 @@ int main(int argc, char **argv)
} }
++k; ++k;
} }
#endif
if( argc < 2 ) if( argc < 2 )
return 1; return 1;
// read config file // read config file
globalParams = new GlobalParams( globalParams = new GlobalParams(
#ifndef SYSTEM_POPPLER
(char*)""
#endif
); );
globalParams->setErrQuiet(gTrue); globalParams->setErrQuiet(gTrue);
#if !defined(SYSTEM_POPPLER) || defined(_MSC_VER) #ifdef _MSC_VER
globalParams->setupBaseFonts(NULL); globalParams->setupBaseFonts(NULL);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment