]> git.lyx.org Git - lyx.git/blobdiff - src/exporter.C
I reactivate the code to resize the InsetText on a resize event of the main
[lyx.git] / src / exporter.C
index d98fb37dbee4d9c855457a1711863c42d1694b9d..bb3b05a2dc37c5c01957fbe3dcafbecb40740237 100644 (file)
@@ -22,7 +22,7 @@
 #include "support/filetools.h"
 #include "lyxrc.h"
 #include "converter.h"
-#include "lyx_gui_misc.h" //WriteAlert
+#include "frontends/Alert.h"
 #include "gettext.h"
 
 using std::vector;
@@ -45,7 +45,7 @@ bool Exporter::Export(Buffer * buffer, string const & format,
                        }
                }
                if (backend_format.empty()) {
-                       WriteAlert(_("Can not export file"),
+                       Alert::alert(_("Cannot export file"),
                                   _("No information for exporting to ")
                                   + formats.prettyName(format));
                        return false;
@@ -64,19 +64,19 @@ bool Exporter::Export(Buffer * buffer, string const & format,
                buffer->writeFileAscii(filename, lyxrc.ascii_linelen);
        // Linuxdoc backend
        else if (buffer->isLinuxDoc())
-               buffer->makeLinuxDocFile(filename, true);
+               buffer->makeLinuxDocFile(filename, !put_in_tempdir);
        // Docbook backend
        else if (buffer->isDocBook())
-               buffer->makeDocBookFile(filename, true);
+               buffer->makeDocBookFile(filename, !put_in_tempdir);
        // LaTeX backend
        else if (backend_format == format)
                buffer->makeLaTeXFile(filename, string(), true);
-       else if (contains(buffer->filepath, ' ')) {
-               WriteAlert(_("Cannot run latex."),
+       else if (contains(buffer->filePath(), ' ')) {
+               Alert::alert(_("Cannot run latex."),
                           _("The path to the lyx file cannot contain spaces."));
                return false;
        } else
-               buffer->makeLaTeXFile(filename, buffer->filepath, false);
+               buffer->makeLaTeXFile(filename, buffer->filePath(), false);
 
        string outfile_base = (put_in_tempdir)
                ? filename : buffer->getLatexName(false);