X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=inline;f=pdf%2Fxpdf%2FCatalog.h;h=8ab7c61c5b9aa6dd0f36ea31fd9017fc62b395c0;hb=a2f683fe644fded868c536909907282555b1b777;hp=72ff0a305d60dfb94b8e263268055ab83c8aa14c;hpb=d9f9a6449f377b4c933b75d57541b19c6d088994;p=evince.git diff --git a/pdf/xpdf/Catalog.h b/pdf/xpdf/Catalog.h index 72ff0a30..8ab7c61c 100644 --- a/pdf/xpdf/Catalog.h +++ b/pdf/xpdf/Catalog.h @@ -2,17 +2,20 @@ // // Catalog.h // -// Copyright 1996 Derek B. Noonburg +// Copyright 1996-2003 Glyph & Cog, LLC // //======================================================================== #ifndef CATALOG_H #define CATALOG_H -#ifdef __GNUC__ +#include + +#ifdef USE_GCC_PRAGMAS #pragma interface #endif +class XRef; class Object; class Page; class PageAttrs; @@ -27,7 +30,7 @@ class Catalog { public: // Constructor. - Catalog(Object *catDict); + Catalog(XRef *xrefA); // Destructor. ~Catalog(); @@ -41,6 +44,19 @@ public: // Get a page. Page *getPage(int i) { return pages[i-1]; } + // Get the reference for a page object. + Ref *getPageRef(int i) { return &pageRefs[i-1]; } + + // Return base URI, or NULL if none. + GString *getBaseURI() { return baseURI; } + + // Return the contents of the metadata stream, or NULL if there is + // no metadata. + GString *readMetadata(); + + // Return the structure tree root object. + Object *getStructTreeRoot() { return &structTreeRoot; } + // Find a page, given its object ID. Returns page number, or 0 if // not found. int findPage(int num, int gen); @@ -49,13 +65,21 @@ public: // NULL if is not a destination. LinkDest *findDest(GString *name); + Object *getOutline() { return &outline; } + private: + XRef *xref; // the xref table for this PDF file Page **pages; // array of pages Ref *pageRefs; // object ID for each page int numPages; // number of pages + int pagesSize; // size of pages array Object dests; // named destination dictionary Object nameTree; // name tree + GString *baseURI; // base URI for URI-type links + Object metadata; // metadata stream + Object structTreeRoot; // structure tree root dictionary + Object outline; // outline dictionary GBool ok; // true if catalog is valid int readPageTree(Dict *pages, PageAttrs *attrs, int start);