From 02eb16fef45712a91e24f6471b9e2f31249c888e Mon Sep 17 00:00:00 2001 From: Kristian Høgsberg Date: Tue, 01 Mar 2005 22:24:10 +0000 Subject: Use poppler instead of including xpdf source code. Poppler is a fork of 2005-03-01 Kristian Høgsberg Use poppler instead of including xpdf source code. Poppler is a fork of xpdf to build it as a shared library. See http://freedesktop.org/wiki/Software/poppler. * pdf/xpdf/*, pdf/goo/*, pdf/splash/*, pdf/fofi/*: Remove included xpdf fork. * pdf/Makefile.am: Build libpdfdocument.a here. * pdf/GDKSplashOutputDev.cc: * pdf/GDKSplashOutputDev.h: * pdf/GnomeVFSStream.cc: * pdf/GnomeVFSStream.h: * pdf-document.cc: * pdf-document.h: * test-gdk-output-dev.cc * Thumb.cc: * Thumb.h: Pull these files out of pdf/xpdf and adjust to compile against poppler. --- (limited to 'pdf/xpdf/CMap.h') diff --git a/pdf/xpdf/CMap.h b/pdf/xpdf/CMap.h deleted file mode 100644 index eff2a81..0000000 --- a/pdf/xpdf/CMap.h +++ /dev/null @@ -1,102 +0,0 @@ -//======================================================================== -// -// CMap.h -// -// Copyright 2001-2003 Glyph & Cog, LLC -// -//======================================================================== - -#ifndef CMAP_H -#define CMAP_H - -#include - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "gtypes.h" -#include "CharTypes.h" - -#if MULTITHREADED -#include "GMutex.h" -#endif - -class GString; -struct CMapVectorEntry; -class CMapCache; - -//------------------------------------------------------------------------ - -class CMap { -public: - - // Create the CMap specified by and . Sets - // the initial reference count to 1. Returns NULL on failure. - static CMap *parse(CMapCache *cache, GString *collectionA, - GString *cMapNameA); - - ~CMap(); - - void incRefCnt(); - void decRefCnt(); - - // Return collection name (-). - GString *getCollection() { return collection; } - - // Return true if this CMap matches the specified , and - // . - GBool match(GString *collectionA, GString *cMapNameA); - - // Return the CID corresponding to the character code starting at - // , which contains bytes. Sets * to the number of - // bytes used by the char code. - CID getCID(char *s, int len, int *nUsed); - - // Return the writing mode (0=horizontal, 1=vertical). - int getWMode() { return wMode; } - -private: - - CMap(GString *collectionA, GString *cMapNameA); - CMap(GString *collectionA, GString *cMapNameA, int wModeA); - void useCMap(CMapCache *cache, char *useName); - void copyVector(CMapVectorEntry *dest, CMapVectorEntry *src); - void addCodeSpace(CMapVectorEntry *vec, Guint start, Guint end, - Guint nBytes); - void addCIDs(Guint start, Guint end, Guint nBytes, CID firstCID); - void freeCMapVector(CMapVectorEntry *vec); - - GString *collection; - GString *cMapName; - int wMode; // writing mode (0=horizontal, 1=vertical) - CMapVectorEntry *vector; // vector for first byte (NULL for - // identity CMap) - int refCnt; -#ifdef MULTITHREADED - GMutex mutex; -#endif -}; - -//------------------------------------------------------------------------ - -#define cMapCacheSize 4 - -class CMapCache { -public: - - CMapCache(); - ~CMapCache(); - - // Get the CMap for the specified character collection. - // Increments its reference count; there will be one reference for - // the cache plus one for the caller of this function. Returns NULL - // on failure. - CMap *getCMap(GString *collection, GString *cMapName); - -private: - - CMap *cache[cMapCacheSize]; -}; - -#endif -- cgit v0.9.1