X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=pdf%2Fxpdf%2FCatalog.cc;h=ea968ee82c9b4e8f5733000c522bd2226fea8d7b;hb=e4328aef245464741c6d742bfc5aef4ee579ef23;hp=fded0bef9a1286a238b5055486f892f105e9aa8a;hpb=d9f9a6449f377b4c933b75d57541b19c6d088994;p=evince.git diff --git a/pdf/xpdf/Catalog.cc b/pdf/xpdf/Catalog.cc index fded0bef..ea968ee8 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) {