Kaydet (Commit) eb276d11 authored tarafından Fridrich Štrba's avatar Fridrich Štrba Kaydeden (comit) Fridrich Strba

fdo#38878: Upgrading internal xpdf -> poppler

Change-Id: I00aafb3fd275e6be3b5d0eb370320e5325110da5
Reviewed-on: https://gerrit.libreoffice.org/4770Tested-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
Reviewed-by: 's avatarFridrich Strba <fridrich@documentfoundation.org>
üst 39f42b0b
......@@ -148,6 +148,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,ORCUS,$(ORCUS_TARBALL)) \
$(call fetch_Optional,CAIRO,$(PIXMAN_TARBALL)) \
$(call fetch_Optional,LIBPNG,$(PNG_TARBALL)) \
$(call fetch_Optional,POPPLER,$(POPPLER_TARBALL)) \
$(call fetch_Optional,POSTGRESQL,$(POSTGRESQL_TARBALL)) \
$(call fetch_Optional,PYTHON,$(PYTHON_TARBALL)) \
$(call fetch_Optional,REDLAND,$(RAPTOR_TARBALL)) \
......@@ -161,7 +162,6 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
$(call fetch_Optional,WPD,$(WPD_TARBALL)) \
$(call fetch_Optional,WPG,$(WPG_TARBALL)) \
$(call fetch_Optional,WPS,$(WPS_TARBALL)) \
$(call fetch_Optional,XPDF,$(XPDF_TARBALL)) \
$(call fetch_Optional,XSLTML,$(XSLTML_TARBALL)) \
$(call fetch_Optional,ZLIB,$(ZLIB_TARBALL)) \
,$(call fetch_Download_item,http://dev-www.libreoffice.org/src,$(item)))
......
......@@ -1898,10 +1898,6 @@ endif # ENABLE_VALGRIND
ifeq ($(SYSTEM_POPPLER),YES)
define gb_LinkTarget__use_poppler
$(call gb_LinkTarget_add_defs,$(1),\
-DSYSTEM_POPPLER \
)
$(call gb_LinkTarget_set_include,$(1),\
$(POPPLER_CFLAGS) \
$$(INCLUDE) \
......@@ -1916,19 +1912,19 @@ endef
else # !SYSTEM_POPPLER
define gb_LinkTarget__use_poppler
$(call gb_LinkTarget_use_package,$(1),xpdf)
$(call gb_LinkTarget_use_package,$(1),poppler)
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,xpdf) \
-I$(call gb_UnpackedTarball_get_dir,xpdf)/xpdf \
-I$(call gb_UnpackedTarball_get_dir,xpdf)/goo \
-I$(call gb_UnpackedTarball_get_dir,poppler) \
-I$(call gb_UnpackedTarball_get_dir,poppler)/poppler \
-I$(call gb_UnpackedTarball_get_dir,poppler)/goo \
$$(INCLUDE) \
)
$(call gb_LinkTarget_use_static_libraries,$(1),\
fofi \
Goo \
xpdf \
goo \
poppler \
)
ifeq ($(OS),MACOSX)
......
......@@ -135,6 +135,7 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
$(call gb_Helper_optional,OPENSSL,openssl) \
package \
padmin \
$(call gb_Helper_optional,POPPLER,poppler) \
$(call gb_Helper_optional,POSTGRESQL,postgresql) \
postprocess \
psprint_config \
......@@ -207,7 +208,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
xmerge \
$(call gb_Helper_optional,DESKTOP,xmlhelp) \
xmloff \
$(call gb_Helper_optional,XPDF,xpdf) \
xmlreader \
xmlscript \
xmlsecurity \
......
......@@ -9899,7 +9899,7 @@ if test "$_os" != Android -a "$_os" != iOS -a "$ENABLE_PDFIMPORT" != FALSE; then
else
AC_MSG_RESULT([internal])
SYSTEM_POPPLER=NO
BUILD_TYPE="$BUILD_TYPE XPDF"
BUILD_TYPE="$BUILD_TYPE POPPLER"
fi
else
AC_MSG_RESULT([no])
......
......@@ -74,6 +74,7 @@ export OPENSSL_TARBALL := 51a40a81b3b7abe8a5c33670bd3da0ce-openssl-0.9.8v.tar.gz
export ORCUS_TARBALL := ea2acaf140ae40a87a952caa75184f4d-liborcus-0.5.1.tar.bz2
export PIXMAN_TARBALL := c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2
export PNG_TARBALL := 9e5d864bce8f06751bbd99962ecf4aad-libpng-1.5.10.tar.gz
export POPPLER_TARBALL := 1cd27460f7e3379d1eb109cfd7bcdb39-poppler-0.22.5.tar.gz
export POSTGRESQL_TARBALL := c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2
export PYTHON_TARBALL := b3b2524f72409d919a4137826a870a8f-Python-3.3.0.tar.bz2
export RAPTOR_TARBALL := 4ceb9316488b0ea01acf011023cf7fff-raptor2-2.0.9.tar.gz
......@@ -87,7 +88,6 @@ export VIGRA_TARBALL := d62650a6f908e85643e557a236ea989c-vigra1.6.0.tar.gz
export WPD_TARBALL := 972afb8fdf02d9e7517e258b7fa7f0eb-libwpd-0.9.8.tar.bz2
export WPG_TARBALL := b85436266b2ac91d351ab5684b181151-libwpg-0.2.2.tar.bz2
export WPS_TARBALL := 46eb0e7f213ad61bd5dee0c494132cb0-libwps-0.2.9.tar.bz2
export XPDF_TARBALL := 599dc4cc65a07ee868cf92a667a913d2-xpdf-3.02.tar.gz
export XSLTML_TARBALL := a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
export ZLIB_TARBALL := 2ab442d169156f34c379c968f3f482dd-zlib-1.2.7.tar.bz2
......
......@@ -7,18 +7,18 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_ExternalPackage_ExternalPackage,xpdf,xpdf))
$(eval $(call gb_ExternalPackage_ExternalPackage,poppler,poppler))
$(eval $(call gb_ExternalPackage_use_external_project,xpdf,xpdf))
$(eval $(call gb_ExternalPackage_use_external_project,poppler,poppler))
ifeq ($(COM),MSC)
$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/fofi.lib,fofi/fofi.lib))
$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/Goo.lib,goo/Goo.lib))
$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/xpdf.lib,xpdf/xpdf.lib))
ifeq ($(OS)$(COM),WNTMSC)
$(eval $(call gb_ExternalPackage_add_file,poppler,lib/poppler.lib,poppler/.libs/libpoppler.lib))
$(eval $(call gb_ExternalPackage_add_file,poppler,lib/fofi.lib,fofi/.libs/libfofi.lib))
$(eval $(call gb_ExternalPackage_add_file,poppler,lib/goo.lib,goo/.libs/libgoo.lib))
else
$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/libfofi.a,fofi/libfofi.a))
$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/libGoo.a,goo/libGoo.a))
$(eval $(call gb_ExternalPackage_add_file,xpdf,lib/libxpdf.a,xpdf/libxpdf.a))
$(eval $(call gb_ExternalPackage_add_file,poppler,lib/libpoppler.a,poppler/.libs/libpoppler.a))
$(eval $(call gb_ExternalPackage_add_file,poppler,lib/libfofi.a,fofi/.libs/libfofi.a))
$(eval $(call gb_ExternalPackage_add_file,poppler,lib/libgoo.a,goo/.libs/libgoo.a))
endif
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_ExternalProject_ExternalProject,poppler))
$(eval $(call gb_ExternalProject_use_autoconf,poppler,build))
$(eval $(call gb_ExternalProject_register_targets,poppler,\
build \
))
$(call gb_ExternalProject_get_state_target,poppler,build) :
$(call gb_ExternalProject_run,build,\
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),CFLAGS="$(CFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)" CXXFLAGS="$(CXXFLAGS) $(gb_VISIBILITY_FLAGS) $(gb_COMPILEROPTFLAGS)") \
./configure \
--with-pic \
--enable-static \
--disable-shared \
--enable-xpdf-headers \
--disable-poppler-cpp \
--disable-libopenjpeg \
--disable-libtiff \
--disable-libjpeg \
--disable-libpng \
--disable-zlib \
--disable-libcurl \
--disable-splash-output \
--disable-cairo-output \
--disable-poppler-glib \
--disable-poppler-qt4 \
--disable-gtk-test \
--disable-utils \
--disable-cms \
$(if $(filter WNT,$(OS)),--with-font-configuration=win32,--with-font-configuration=fontconfig) \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
&& $(MAKE) \
)
# vim: set noet sw=4 ts=4:
......@@ -7,14 +7,14 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Module_Module,xpdf))
$(eval $(call gb_Module_Module,poppler))
ifeq ($(SYSTEM_POPPLER),NO)
ifeq ($(SYSTEM_WPD),NO)
$(eval $(call gb_Module_add_targets,xpdf,\
UnpackedTarball_xpdf \
ExternalPackage_xpdf \
ExternalProject_xpdf \
$(eval $(call gb_Module_add_targets,poppler,\
ExternalProject_poppler \
ExternalPackage_poppler \
UnpackedTarball_poppler \
))
endif
......
From [http://poppler.freedesktop.org/]. Not modified. PDF rendering library based on the xpdf-3.0 code base.
......@@ -7,19 +7,13 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_UnpackedTarball_UnpackedTarball,xpdf))
$(eval $(call gb_UnpackedTarball_UnpackedTarball,poppler))
$(eval $(call gb_UnpackedTarball_set_tarball,xpdf,$(XPDF_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_tarball,poppler,$(POPPLER_TARBALL)))
$(eval $(call gb_UnpackedTarball_fix_end_of_line,xpdf,\
ms_make.bat \
))
$(eval $(call gb_UnpackedTarball_add_patches,xpdf,\
xpdf/xpdf-3.02.patch \
xpdf/xpdf-3.02-ooopwd.patch \
xpdf/xpdf-3.02-gfxColorMaxComps.patch \
xpdf/xpdf-no-writable-literals.patch \
$(eval $(call gb_UnpackedTarball_add_patches,poppler,\
poppler/poppler-notests.patch.1 \
poppler/poppler-snprintf.patch.1 \
))
# vim: set noet sw=4 ts=4:
--- poppler-0.22.5/Makefile.in 2013-06-16 18:24:09.000000000 +0200
+++ poppler-0.22.5/Makefile.in 2013-07-08 17:10:53.382213184 +0200
@@ -456,7 +456,7 @@
@BUILD_POPPLER_CPP_TRUE@cpp_subdir = cpp
@BUILD_POPPLER_CPP_TRUE@cpp_pc_file = poppler-cpp.pc
@BUILD_UTILS_TRUE@utils_subdir = utils
-SUBDIRS = goo fofi $(splash_subdir) poppler $(utils_subdir) $(glib_subdir) test $(qt4_subdir) $(cpp_subdir)
+SUBDIRS = goo fofi $(splash_subdir) poppler $(utils_subdir) $(glib_subdir) $(qt4_subdir) $(cpp_subdir)
# Add CMake buildsystem files here so they get added on make dist
EXTRA_DIST = README-XPDF poppler.pc.in poppler-uninstalled.pc.in \
--- poppler-0.22.5/poppler/Catalog.cc 2013-06-09 12:16:12.000000000 +0200
+++ poppler-0.22.5/poppler/Catalog.cc 2013-07-08 16:54:30.712095880 +0200
@@ -40,6 +40,14 @@
#include <stddef.h>
#include <stdlib.h>
+#ifdef _WIN32
+# ifdef __MINGW32__
+# define _SNPRINTF_DLLIMPORT
+# endif
+# ifdef _MSC_VER
+# include <systools/win32/snprintf.h>
+# endif
+#endif
#include "goo/gmem.h"
#include "Object.h"
#include "PDFDoc.h"
--- poppler-0.22.5/poppler/GlobalParams.cc 2013-03-25 22:48:34.000000000 +0100
+++ poppler-0.22.5/poppler/GlobalParams.cc 2013-07-08 16:55:04.753303654 +0200
@@ -57,6 +57,12 @@
#ifdef _WIN32
# include <shlobj.h>
# include <mbstring.h>
+# ifdef __MINGW32__
+# define _SNPRINTF_DLLIMPORT
+# endif
+# ifdef _MSC_VER
+# include <systools/win32/snprintf.h>
+# endif
#endif
#include "goo/gmem.h"
#include "goo/GooString.h"
--- poppler-0.22.5/poppler/PageLabelInfo.cc 2013-03-25 22:48:34.000000000 +0100
+++ poppler-0.22.5/poppler/PageLabelInfo.cc 2013-07-08 16:56:47.977901129 +0200
@@ -17,6 +17,14 @@
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
+#ifdef _WIN32
+# ifdef __MINGW32__
+# define _SNPRINTF_DLLIMPORT
+# endif
+# ifdef _MSC_VER
+# include <systools/win32/snprintf.h>
+# endif
+#endif
#include "PageLabelInfo.h"
Only in poppler-0.22.5: poppler-snprintf.patch.1
......@@ -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 \
......
......@@ -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
{
......
......@@ -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
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_ExternalProject_ExternalProject,xpdf))
$(eval $(call gb_ExternalProject_register_targets,xpdf,\
build \
))
ifeq ($(OS),WNT)
ifeq ($(COM),GCC)
$(call gb_ExternalProject_get_state_target,xpdf,build):
$(call gb_ExternalProject_run,build,\
./configure --without-x --enable-multithreaded --enable-exceptions \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
LDFLAGS="-Wl$(COMMA)--enable-runtime-pseudo-reloc-v2" \
LIBS="-lgdi32" \
&& MAKEFLAGS="$(subst r,,$(MAKEFLAGS))" $(MAKE) \
)
else # COM=MSC
$(call gb_ExternalProject_get_state_target,xpdf,build):
$(call gb_ExternalProject_run,build,\
LIB="$(ILIB)" cmd.exe /d /c ms_make.bat \
)
endif
else # OS!=WNT
$(call gb_ExternalProject_get_state_target,xpdf,build):
$(call gb_ExternalProject_run,build,\
./configure --without-x --without-libpaper-library --without-t1-library --enable-multithreaded --enable-exceptions \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
$(if $(SYSBASE),CFLAGS="-I$(SYSBASE)/usr/include") \
$(if $(PTHREAD_LIBS),$(if $(filter GCC,$(COM)),LDFLAGS=$(PTHREAD_LIBS))) \
&& MAKEFLAGS="$(subst r,,$(MAKEFLAGS))" $(MAKE) \
)
endif
# vim: set noet sw=4 ts=4:
PDF viewer library from [http://www.foolabs.com/xpdf/].
This code is -used by [[sdext/source/pdfimport]] to implement the PDF
import functionality, that allows PDFs to be edited.
--- misc/xpdf-3.02/xpdf/GfxState.cc 2007-02-27 23:05:52.000000000 +0100
+++ misc/build/xpdf-3.02/xpdf/GfxState.cc 2011-05-18 20:08:45.003807128 +0200
@@ -2678,7 +2678,7 @@
double x[16], y[16];
Guint xi, yi;
GfxColorComp c[4][gfxColorMaxComps];
- Guint ci[4];
+ Guint ci[gfxColorMaxComps];
GfxShadingBitBuf *bitBuf;
Object obj1, obj2;
int i, j;
--- misc/xpdf-3.02/xpdf/GfxState.h 2007-02-27 23:05:52.000000000 +0100
+++ misc/build/xpdf-3.02/xpdf/GfxState.h 2011-05-18 20:13:26.973936566 +0200
@@ -393,8 +393,8 @@
int nComps; // number of color components (1, 3, or 4)
GfxColorSpace *alt; // alternate color space
- double rangeMin[4]; // min values for each component
- double rangeMax[4]; // max values for each component
+ double rangeMin[gfxColorMaxComps]; // min values for each component
+ double rangeMax[gfxColorMaxComps]; // max values for each component
Ref iccProfileStream; // the ICC profile
};
--- misc/xpdf-3.02/xpdf/SecurityHandler.cc 2007-02-27 23:05:52.000000000 +0100
+++ misc/build/xpdf-3.02/xpdf/SecurityHandler.cc 2011-02-03 16:41:49.000000000 +0100
@@ -40,7 +40,7 @@
encryptDictA->dictLookup("Filter", &filterObj);
if (filterObj.isName("Standard")) {
- secHdlr = new StandardSecurityHandler(docA, encryptDictA);
+ secHdlr = new OOoImportSecurityhandler(docA, encryptDictA);
} else if (filterObj.isName()) {
#ifdef ENABLE_PLUGINS
if ((xsh = globalParams->getSecurityHandler(filterObj.getName()))) {
@@ -310,6 +310,60 @@
return gTrue;
}
+//------------------------------------------------------------------------
+// OOoImportSecurityhandler
+//------------------------------------------------------------------------
+
+OOoImportSecurityhandler::~OOoImportSecurityhandler()
+{
+}
+
+inline Guchar toNum( Guchar digit )
+{
+ return (digit >= '0') && digit <= '9'
+ ? digit - '0'
+ : (digit >= 'A' && digit <= 'F')
+ ? digit - 'A' + 10
+ : (digit >= 'a' && digit <= 'f')
+ ? digit - 'a' + 10
+ : Guchar(0xff);
+}
+
+GBool OOoImportSecurityhandler::authorize(void* authData)
+{
+ if( !ok )
+ return gFalse;
+ if( authData )
+ {
+ GString* ownerPassword = ((StandardAuthData *)authData)->ownerPassword;
+ if( ownerPassword )
+ {
+ const char* pStr = ownerPassword->getCString();
+ if( strncmp( pStr, "_OOO_pdfi_Credentials_", 22 ) == 0 )
+ {
+ // a hex encoded byte sequence should follow until end of string
+ // the length must match fileKeyLength
+ // if this is the case we can assume that the password checked out
+ // and the file key is valid
+ // max len is 16 (the size of the fileKey array)
+ pStr += 22;
+ size_t i = 0;
+ while( pStr[0] && pStr[1] && i < sizeof( fileKey ) )
+ {
+ fileKey[i++] = (toNum( *pStr++ ) << 4)
+ | (toNum( *pStr++ ));
+ }
+ if( i == size_t(fileKeyLength) )
+ {
+ ownerPasswordOk = gTrue;
+ return gTrue;
+ }
+ }
+ }
+ }
+ return StandardSecurityHandler::authorize( authData );
+}
+
#ifdef ENABLE_PLUGINS
//------------------------------------------------------------------------
--- misc/xpdf-3.02/xpdf/SecurityHandler.h 2007-02-27 23:05:52.000000000 +0100
+++ misc/build/xpdf-3.02/xpdf/SecurityHandler.h 2011-02-03 16:26:17.000000000 +0100
@@ -103,7 +103,7 @@
virtual int getEncVersion() { return encVersion; }
virtual CryptAlgorithm getEncAlgorithm() { return encAlgorithm; }
-private:
+protected:
int permFlags;
GBool ownerPasswordOk;
@@ -119,6 +119,17 @@
GBool ok;
};
+class OOoImportSecurityhandler : public StandardSecurityHandler
+{
+public:
+ OOoImportSecurityhandler( PDFDoc* docA, Object* encryptDictA )
+ : StandardSecurityHandler( docA, encryptDictA )
+ {}
+ virtual ~OOoImportSecurityhandler();
+
+ virtual GBool authorize(void* authData);
+};
+
#ifdef ENABLE_PLUGINS
//------------------------------------------------------------------------
// ExternalSecurityHandler
This diff is collapsed.
--- misc/xpdf-3.02/xpdf/Error.h.sav 2007-02-27 23:05:52.000000000 +0100
+++ misc/xpdf-3.02/xpdf/Error.h 2012-10-09 23:24:12.002455791 +0200
@@ -18,6 +18,6 @@
#include <stdio.h>
#include "config.h"
-extern void CDECL error(int pos, char *msg, ...);
+extern void CDECL error(int pos, const char *msg, ...);
#endif
--- build/xpdf-3.02/xpdf/Error.cc.sav 2007-02-27 23:05:52.000000000 +0100
+++ build/xpdf-3.02/xpdf/Error.cc 2012-10-09 23:24:27.813569809 +0200
@@ -18,7 +18,7 @@
#include "GlobalParams.h"
#include "Error.h"
-void CDECL error(int pos, char *msg, ...) {
+void CDECL error(int pos, const char *msg, ...) {
va_list args;
// NB: this can be called before the globalParams object is created
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