Slightly change the indexes used to query the generator for fonts:

- 0..n-1 are the page indexes again
- -1 is for the fonts not reall belonging to a single page (or when no selective page extraction can be done)

svn path=/trunk/KDE/kdegraphics/okular/; revision=753866
This commit is contained in:
Pino Toscano 2007-12-28 17:06:43 +00:00
parent 79006833de
commit 1aab311b5c
3 changed files with 3 additions and 3 deletions

View file

@ -638,7 +638,7 @@ void DocumentPrivate::fontReadingProgress( int page )
{
emit m_parent->fontReadingProgress( page );
if ( page == (int)m_parent->pages() )
if ( page >= (int)m_parent->pages() - 1 )
{
emit m_parent->fontReadingEnded();
m_fontThread = 0;

View file

@ -282,7 +282,7 @@ class OKULAR_EXPORT Generator : public QObject
* Returns the 'list of embedded fonts' object of the specified \page
* of the document.
*
* \param page a page of the document, starting from 1 - 0 indicates all
* \param page a page of the document, starting from 0 - -1 indicates all
* the other fonts
*/
virtual FontInfo::List fontsForPage( int page );

View file

@ -114,7 +114,7 @@ void FontExtractionThread::stopExtraction()
void FontExtractionThread::run()
{
for ( int i = 1; i <= mNumOfPages && mGoOn; ++i )
for ( int i = -1; i < mNumOfPages && mGoOn; ++i )
{
FontInfo::List list = mGenerator->fontsForPage( i );
foreach ( const FontInfo& fi, list )