Logo Search packages:      
Sourcecode: djvulibre version File versions

void DjVuFile::change_text ( GP< DjVuTXT txt,
const bool  do_reset = false 
)

Changes the value of the hiddentext.

Definition at line 2774 of file DjVuFile.cpp.

References contains_text(), ByteStream::create(), get_text(), reset(), and text.

{
  DEBUG_MSG("DjVuFile::change_text()\n");
  GP<DjVuText> gtext_c=DjVuText::create();
  DjVuText &text_c=*gtext_c;
  if(contains_text())
  {
    const GP<ByteStream> file_text(get_text());
    if(file_text)
    {
      text_c.decode(file_text);
    }
  }
  GCriticalSectionLock lock(&text_lock);
  // Mark this as modified
  set_modified(true);
  if(do_reset)
    reset();
  text_c.txt = txt;
  text=ByteStream::create();
  text_c.encode(text);
}


Generated by  Doxygen 1.6.0   Back to index