Logo Search packages:      
Sourcecode: djvulibre version File versions

int DjVuDocEditor::get_thumbnails_num ( void   )  const

Returns the number of thumbnails stored inside this document.

It may be ZERO#, which means, that there are no thumbnails at all.

It may be equal to the number of pages, which is what should normally be.

Finally, it may be greater than ZERO# and less than the number of pages, in which case thumbnails should be regenerated before the document can be saved.

Definition at line 1514 of file DjVuDocEditor.cpp.

References GMapTemplate< KTYPE, VTYPE, TI >::contains(), DjVuDocument::get_pages_num(), and page_to_id().

Referenced by save_as(), and write().

   GCriticalSectionLock lock((GCriticalSection *) &thumb_lock);

   int cnt=0;
   int pages_num=get_pages_num();
   for(int page_num=0;page_num<pages_num;page_num++)
     if (thumb_map.contains(page_to_id(page_num)))
   return cnt;

Generated by  Doxygen 1.6.0   Back to index