poppler/SecurityHandler.cc | 4 ++-- poppler/SecurityHandler.h | 16 ++++++++++++++++ poppler/XpdfPluginAPI.cc | 35 +---------------------------------- poppler/XpdfPluginAPI.h | 34 +++++++++++++++------------------- 4 files changed, 34 insertions(+), 55 deletions(-)
New commits: commit 753f6ab9347f972223ec21b7ed4b4f7ebed3d420 Author: Albert Astals Cid <[email protected]> Date: Thu May 3 15:29:57 2012 -0700 Compile with ENABLE_PLUGINS defined diff --git a/poppler/SecurityHandler.cc b/poppler/SecurityHandler.cc index 3426df3..00c4ae1 100644 --- a/poppler/SecurityHandler.cc +++ b/poppler/SecurityHandler.cc @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2010 Albert Astals Cid <[email protected]> +// Copyright (C) 2010, 2012 Albert Astals Cid <[email protected]> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -436,7 +436,7 @@ GBool ExternalSecurityHandler::authorize(void *authData) { if (!(permFlags & xpdfPermissionOpen)) { return gFalse; } - if (!(*xsh->getKey)(xsh->handlerData, docData, &key, &length, &encVersion)) { + if (!(*xsh->getKey)(xsh->handlerData, docData, &key, &length, &encVersion, &encRevision)) { return gFalse; } if ((fileKeyLength = length) > 16) { diff --git a/poppler/SecurityHandler.h b/poppler/SecurityHandler.h index 57cb2d2..c2991c8 100644 --- a/poppler/SecurityHandler.h +++ b/poppler/SecurityHandler.h @@ -6,6 +6,20 @@ // //======================================================================== +//======================================================================== +// +// Modified under the Poppler project - http://poppler.freedesktop.org +// +// All changes made under the Poppler project to this file are licensed +// under GPL version 2 or later +// +// Copyright (C) 2012 Albert Astals Cid <[email protected]> +// +// To see a description of the changes please see the Changelog file that +// came with your tarball or type make ChangeLog if you are building from git +// +//======================================================================== + #ifndef SECURITYHANDLER_H #define SECURITYHANDLER_H @@ -148,6 +162,7 @@ public: virtual Guchar *getFileKey() { return fileKey; } virtual int getFileKeyLength() { return fileKeyLength; } virtual int getEncVersion() { return encVersion; } + virtual int getEncRevision() { return encRevision; } virtual CryptAlgorithm getEncAlgorithm() { return encAlgorithm; } private: @@ -159,6 +174,7 @@ private: Guchar fileKey[16]; int fileKeyLength; int encVersion; + int encRevision; CryptAlgorithm encAlgorithm; GBool ok; }; diff --git a/poppler/XpdfPluginAPI.cc b/poppler/XpdfPluginAPI.cc index a4e0f0e..834c681 100644 --- a/poppler/XpdfPluginAPI.cc +++ b/poppler/XpdfPluginAPI.cc @@ -14,6 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2009 Kovid Goyal <[email protected]> +// Copyright (C) 2012 Albert Astals Cid <[email protected]> // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -28,11 +29,6 @@ #include "GlobalParams.h" #include "Object.h" #include "PDFDoc.h" -#ifdef _WIN32 -#include "WinPDFCore.h" -#else -#include "XPDFCore.h" -#endif #include "XpdfPluginAPI.h" //------------------------------------------------------------------------ @@ -60,30 +56,6 @@ XpdfObject _xpdfGetCatalog(XpdfDoc doc) { return (XpdfObject)((PDFDoc *)doc)->getXRef()->getCatalog(obj); } -#ifdef _WIN32 - -HWND _xpdfWin32GetWindow(XpdfDoc doc) { - WinPDFCore *core; - - if (!(core = (WinPDFCore *)((PDFDoc *)doc)->getGUIData())) { - return NULL; - } - return core->getDrawFrame(); -} - -#else - -Widget _xpdfXGetWindow(XpdfDoc doc) { - XPDFCore *core; - - if (!(core = (XPDFCore *)((PDFDoc *)doc)->getGUIData())) { - return NULL; - } - return core->getWidget(); -} - -#endif - //------------------------------------------------------------------------ // Object access functions. //------------------------------------------------------------------------ @@ -242,11 +214,6 @@ XpdfPluginVecTable xpdfPluginVecTable = { xpdfPluginAPIVersion, &_xpdfGetInfoDict, &_xpdfGetCatalog, -#ifdef _WIN32 - &_xpdfWin32GetWindow, -#else - &_xpdfXGetWindow, -#endif &_xpdfObjIsBool, &_xpdfObjIsInt, &_xpdfObjIsReal, diff --git a/poppler/XpdfPluginAPI.h b/poppler/XpdfPluginAPI.h index 22540f7..b0165c0 100644 --- a/poppler/XpdfPluginAPI.h +++ b/poppler/XpdfPluginAPI.h @@ -4,6 +4,20 @@ * Copyright 2004 Glyph & Cog, LLC */ +//======================================================================== +// +// Modified under the Poppler project - http://poppler.freedesktop.org +// +// All changes made under the Poppler project to this file are licensed +// under GPL version 2 or later +// +// Copyright (C) 2012 Albert Astals Cid <[email protected]> +// +// To see a description of the changes please see the Changelog file that +// came with your tarball or type make ChangeLog if you are building from git +// +//======================================================================== + #ifndef XPDFPLUGINAPI_H #define XPDFPLUGINAPI_H @@ -173,7 +187,7 @@ typedef struct { * document. Returns non-zero if successful. */ XpdfBool (*getKey)(void *handlerData, void *docData, - char **key, int *keyLen, int *cryptVersion); + char **key, int *keyLen, int *cryptVersion, int *cryptRevision); /* * Free the data allocated by getKey. @@ -208,24 +222,6 @@ XpdfObject (*_xpdfGetInfoDict)(XpdfDoc doc); */ XpdfObject (*_xpdfGetCatalog)(XpdfDoc doc); -#ifdef _WIN32 - -/* - * Get the handle for the viewer window associated with the specified - * document. [Win32 only] - */ -HWND (*_xpdfWin32GetWindow)(XpdfDoc doc); - -#else - -/* - * Get the Motif widget for the viewer window associated with the - * specified document. [X only] - */ -Widget (*_xpdfXGetWindow)(XpdfDoc doc); - -#endif - /*------------------------------------------------------------------------ * Object access functions *------------------------------------------------------------------------*/ _______________________________________________ poppler mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/poppler
