[poppler] poppler/qt4/src: poppler-qt4.h, 1.3,
1.4 poppler-document.cc, 1.3, 1.4
Albert Astals Cid
aacid at freedesktop.org
Tue Jul 5 14:15:51 PDT 2005
Update of /cvs/poppler/poppler/qt4/src
In directory gabe:/tmp/cvs-serv13999/qt4/src
Modified Files:
poppler-qt4.h poppler-document.cc
Log Message:
Don't crash with files that have fonts with no name
Index: poppler-qt4.h
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-qt4.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- poppler-qt4.h 5 Jul 2005 12:25:11 -0000 1.3
+++ poppler-qt4.h 5 Jul 2005 21:15:49 -0000 1.4
@@ -67,7 +67,7 @@
{};
/**
- The name of the font
+ The name of the font. Can be QString::null if the font has no name
*/
QString name() const
{ return m_fontName; }
Index: poppler-document.cc
===================================================================
RCS file: /cvs/poppler/poppler/qt4/src/poppler-document.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- poppler-document.cc 5 Jul 2005 12:25:11 -0000 1.3
+++ poppler-document.cc 5 Jul 2005 21:15:49 -0000 1.4
@@ -130,13 +130,20 @@
return false;
for ( int i = 0; i < items->getLength(); ++i ) {
- FontInfo thisFont(((::FontInfo*)items->get(i))->getName()->getCString(),
+ if (((::FontInfo*)items->get(i))->getName())
+ fontList->append(FontInfo(((::FontInfo*)items->get(i))->getName()->getCString(),
((::FontInfo*)items->get(i))->getEmbedded(),
((::FontInfo*)items->get(i))->getSubset(),
((::FontInfo*)items->get(i))->getToUnicode(),
(Poppler::FontInfo::Type)((::FontInfo*)items->get(i))->getType()
- );
- fontList->append(thisFont);
+ ));
+ else
+ fontList->append(FontInfo(QString::null,
+ ((::FontInfo*)items->get(i))->getEmbedded(),
+ ((::FontInfo*)items->get(i))->getSubset(),
+ ((::FontInfo*)items->get(i))->getToUnicode(),
+ (Poppler::FontInfo::Type)((::FontInfo*)items->get(i))->getType()
+ ));
}
return true;
}
More information about the poppler
mailing list