Logo Search packages:      
Sourcecode: djvulibre version File versions

void DjVuDocEditor::init ( void   )  [protected]

Initialization function. Initializes an empty document.

{ Note}: You must call either of the two available {init}() function before you start doing anything else with the DjVuDocEditor#.

Definition at line 145 of file DjVuDocEditor.cpp.

References DataPool::create(), ByteStream::create(), DjVmDoc::create(), and DjVuDocument::init().

Referenced by create_wait().

{
   DEBUG_MSG("DjVuDocEditor::init() called\n");
   DEBUG_MAKE_INDENT(3);

      // If you remove this check be sure to delete thumb_map
   if (initialized) G_THROW( ERR_MSG("DjVuDocEditor.init") );

   doc_url=GURL::Filename::UTF8("noname.djvu");

   const GP<DjVmDoc> doc(DjVmDoc::create());
   const GP<ByteStream> gstr(ByteStream::create());
   doc->write(gstr);
   gstr->seek(0, SEEK_SET);
   doc_pool=DataPool::create(gstr);

   orig_doc_type=UNKNOWN_TYPE;
   orig_doc_pages=0;

   initialized=true;

   DjVuDocument::init(doc_url, this);
}


Generated by  Doxygen 1.6.0   Back to index