]> git.lyx.org Git - features.git/blobdiff - src/EmbeddedFiles.cpp
Remove the manifest section of the .lyx file
[features.git] / src / EmbeddedFiles.cpp
index 590ecddf8325d2f29d65ddbdb8b67cab14c8d370..4255a3023e7abc3573ffc7600a9bfd5e98c0244e 100644 (file)
@@ -410,78 +410,6 @@ string const EmbeddedFiles::getInzipName(string const & abs_filename, string con
 }
 
 
-bool EmbeddedFiles::readManifest(Lexer & lex, ErrorList & errorList)
-{
-       int line = -1;
-       int begin_manifest_line = -1;
-
-       file_list_.clear();
-       string filename;
-       string inzipName;
-       bool embedded = false;
-
-       while (lex.isOK()) {
-               lex.next();
-               string const token = lex.getString();
-
-               if (token.empty())
-                       continue;
-
-               if (token == "\\end_manifest")
-                       break;
-
-               ++line;
-               if (token == "\\begin_manifest") {
-                       begin_manifest_line = line;
-                       continue;
-               }
-               
-               LYXERR(Debug::PARSER) << "Handling document manifest token: `"
-                                     << token << '\'' << endl;
-
-               if (token == "\\filename")
-                       lex >> filename;
-               else if (token == "\\inzipName")
-                       lex >> inzipName;
-               else if (token == "\\embed") {
-                       lex >> embedded;
-                       registerFile(filename, embedded, NULL, inzipName);
-                       filename = "";
-                       inzipName = "";
-               } else {
-                       docstring const s = _("\\begin_file is missing");
-                       errorList.push_back(ErrorItem(_("Manifest error"),
-                               s, -1, 0, 0));
-               }
-       }
-       if (begin_manifest_line) {
-               docstring const s = _("\\begin_manifest is missing");
-               errorList.push_back(ErrorItem(_("Manifest error"),
-                       s, -1, 0, 0));
-       }
-       return true;
-}
-
-
-void EmbeddedFiles::writeManifest(ostream & os) const
-{
-       EmbeddedFiles::EmbeddedFileList::const_iterator it = begin();
-       EmbeddedFiles::EmbeddedFileList::const_iterator it_end = end();
-       for (; it != it_end; ++it) {
-               // only saved 'extra' files. Other embedded files are saved
-               // with insets.
-               if (!it->valid() || it->refCount() > 0)
-                       continue;
-               // save the relative path
-               os << "\\filename "
-                       << to_utf8(makeRelPath(from_utf8(it->absFilename()),
-                               from_utf8(buffer_->filePath()))) << '\n'
-                       << "\\inzipName " << it->inzipName() << '\n'
-                       << "\\embed " << (it->embedded() ? "true" : "false") << '\n';
-       }
-}
-
-
 void EmbeddedFiles::updateInsets() const
 {
        EmbeddedFiles::EmbeddedFileList::const_iterator it = begin();