namespace {
-static unsigned int const LYXRC_FILEFORMAT = 2;
+static unsigned int const LYXRC_FILEFORMAT = 3;
// when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = {
LYXERR0 ("Unable to convert " << filename.absFileName() <<
" to format " << LYXRC_FILEFORMAT);
return false;
+ } else {
+ // Keep this in the else branch, such that lexrc2 goes out
+ // of scope and releases the lock on tempfile before we
+ // attempt to remove it. This matters on Windows.
+ Lexer lexrc2(lyxrcTags);
+ lexrc2.setFile(tempfile);
+ LYXERR(Debug::LYXRC, "Reading '" << tempfile << "'...");
+ retval = read(lexrc2, check_format);
}
- Lexer lexrc2(lyxrcTags);
- lexrc2.setFile(tempfile);
- LYXERR(Debug::LYXRC, "Reading '" << tempfile << "'...");
- retval = read(lexrc2, check_format);
tempfile.removeFile();
return retval == ReadOK;
}
flgs |= Format::document;
else if (flag == "vector")
flgs |= Format::vector;
+ else if (flag == "zipped=native")
+ flgs |= Format::zipped_native;
else if (flag == "menu=export")
flgs |= Format::export_menu;
else
flags.push_back("document");
if (cit->vectorFormat())
flags.push_back("vector");
+ if (cit->zippedNative())
+ flags.push_back("zipped=native");
if (cit->inExportMenu())
flags.push_back("menu=export");