Commit 1aab311b authored by Pino Toscano's avatar Pino Toscano

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
parent 79006833
......@@ -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;
......
......@@ -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 );
......
......@@ -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 )
......
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