From 50e9d31c05e9ca11ad43cc570556094782c1b956 Mon Sep 17 00:00:00 2001 From: Arturo Espinosa Date: Fri, 06 Aug 1999 00:14:27 +0000 Subject: Painful merge. Painful merge. I merged the latest release into the CVS. This version supports the regular xpdf or gpdf if the GNOME libraries are found. Miguel. --- (limited to 'pdf/xpdf/Catalog.cc') diff --git a/pdf/xpdf/Catalog.cc b/pdf/xpdf/Catalog.cc index fded0be..ea968ee 100644 --- a/pdf/xpdf/Catalog.cc +++ b/pdf/xpdf/Catalog.cc @@ -26,7 +26,7 @@ Catalog::Catalog(Object *catDict) { Object pagesDict; - Object obj; + Object obj, obj2; int i; ok = gTrue; @@ -74,6 +74,16 @@ Catalog::Catalog(Object *catDict) { nameTree.initNull(); obj.free(); + // read base URI + baseURI = NULL; + if (catDict->dictLookup("URI", &obj)->isDict()) { + if (obj.dictLookup("Base", &obj2)->isString()) { + baseURI = obj2.getString()->copy(); + } + obj2.free(); + } + obj.free(); + return; err3: @@ -99,6 +109,9 @@ Catalog::~Catalog() { } dests.free(); nameTree.free(); + if (baseURI) { + delete baseURI; + } } int Catalog::readPageTree(Dict *pagesDict, PageAttrs *attrs, int start) { -- cgit v0.9.1