#include "lyx_gui_misc.h" // WarnReadonly()
#include "frontends/Dialogs.h"
#include "encoding.h"
+#include "exporter.h"
using std::ostream;
using std::ofstream;
// all these externs should eventually be removed.
extern BufferList bufferlist;
+#ifndef NEW_EXPORT
extern void MenuExport(Buffer *, string const &);
+#endif
extern LyXAction lyxaction;
-static const float LYX_FORMAT = 2.16;
+static const float LYX_FORMAT = 2.17;
extern int tex_code_break_column;
} else if (tmptok == "GRAPHICS") {
Inset * inset = new InsetGraphics;
inset->Read(this, lex);
- ++pos;
par->InsertInset(pos, inset, font);
+ ++pos;
} else if (tmptok == "LatexCommand") {
InsetCommandParams inscmd;
inscmd.Read(lex);
|| inscmd.getCmdName() == "prettyref") {
if (!inscmd.getOptions().empty()
|| !inscmd.getContents().empty()) {
- inset = new InsetRef(inscmd, this);
+ inset = new InsetRef(inscmd);
}
} else if (inscmd.getCmdName() == "tableofcontents"
|| inscmd.getCmdName() == "listofalgorithms"
format = lex.GetFloat();
if (format > 1) {
if (LYX_FORMAT - format > 0.05) {
+
printf(_("Warning: need lyxformat %.2f but found %.2f\n"),
LYX_FORMAT, format);
}
if (writeFile(fileName(), false)) {
markLyxClean();
-
- // now delete the autosavefile
- string a = OnlyPath(fileName());
- a += '#';
- a += OnlyFilename(fileName());
- a += '#';
- FileInfo fileinfo(a);
- if (fileinfo.exist()) {
- if (::remove(a.c_str()) != 0) {
- WriteFSAlert(_("Could not delete "
- "auto-save file!"), a);
- }
- }
+ removeAutosaveFile(fileName());
} else {
// Saving failed, so backup is not backup
if (lyxrc.make_backup) {
int Buffer::runLaTeX()
{
+#ifndef NEW_EXPORT
+
if (!users->text) return 0;
ProhibitInput(users);
AllowInput(users);
return latex.getNumErrors();
+#else
+ return 0;
+#endif
}
bool dispatched = true;
switch (action) {
case LFUN_EXPORT:
+#ifdef NEW_EXPORT
+ Exporter::Export(this, argument, false);
+#else
MenuExport(this, argument);
+#endif
break;
default: