Commit 8389099d authored by Albert Astals Cid's avatar Albert Astals Cid

* poppler/FontInfo.cc: Fix the FontInfoScanner::scan method to

        actually scan the number of requested pages
parent 9ced4442
2007-07-13 Pino Toscano <pino@kde.org>
reviewed by: Albert Astals Cid <aacid@kde.org>
* poppler/FontInfo.cc: Fix the FontInfoScanner::scan method to
actually scan the number of requested pages
2007-07-13 Albert Astals Cid <aacid@kde.org>
* poppler/GlobalParams.cc: Remove dead unused code from Win32 ifdef
......
......@@ -30,7 +30,7 @@ GooList *FontInfoScanner::scan(int nPages) {
Dict *resDict;
Annots *annots;
Object obj1, obj2;
int pg, i, lastPage;
int lastPage;
if (currentPage > doc->getNumPages()) {
return NULL;
......@@ -39,18 +39,18 @@ GooList *FontInfoScanner::scan(int nPages) {
result = new GooList();
lastPage = currentPage + nPages;
if (lastPage > doc->getNumPages()) {
lastPage = doc->getNumPages();
if (lastPage > doc->getNumPages() + 1) {
lastPage = doc->getNumPages() + 1;
}
for (pg = currentPage; pg <= lastPage; ++pg) {
for (int pg = currentPage; pg < lastPage; ++pg) {
page = doc->getCatalog()->getPage(pg);
if ((resDict = page->getResourceDict())) {
scanFonts(resDict, result);
}
annots = new Annots(doc->getXRef(), doc->getCatalog(), page->getAnnots(&obj1));
obj1.free();
for (i = 0; i < annots->getNumAnnots(); ++i) {
for (int i = 0; i < annots->getNumAnnots(); ++i) {
if (annots->getAnnot(i)->getAppearance(&obj1)->isStream()) {
obj1.streamGetDict()->lookup("Resources", &obj2);
if (obj2.isDict()) {
......@@ -63,7 +63,7 @@ GooList *FontInfoScanner::scan(int nPages) {
delete annots;
}
currentPage = lastPage + 1;
currentPage = lastPage;
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment