Logo Search packages:      
Sourcecode: djvulibre version File versions

bool DjVuDocEditor::can_be_saved ( void   )  const

Returns TRUE# if the document can be "saved" (sometimes the only possibility is to do a "save as"). The reason why we have this function is that DjVuDocEditor# can save documents in new formats only (BUNDLED# and INDIRECT#). At the same time it recognizes all DjVu formats (OLD_BUNDLED#, OLD_INDEXED#, BUNDLED#, and INDIRECT#).

OLD_BUNDLED# and BUNDLED# documents occupy only one file, so in this case "saving" involves the automatic conversion to BUNDLED# format and storing data into the same file.

OLD_INDEXED# documents, on the other hand, occupy more than one file. They could be converted to INDIRECT# format if these two formats had the same set of files. Unfortunately, these formats are too different, and the best thing to do is to use "save as" capability.

Definition at line 2153 of file DjVuDocEditor.cpp.

References DjVuDocument::needs_compression(), and DjVuDocument::needs_rename().

Referenced by save().

{
   return !(needs_rename()||needs_compression()||orig_doc_type==UNKNOWN_TYPE ||
          orig_doc_type==OLD_INDEXED);
}


Generated by  Doxygen 1.6.0   Back to index