#include <algorithm>
#include <iostream>
-#include "LString.h"
+//#include "LString.h"
#include FORMS_H_LOCATION
#include "lyx.h"
#include "layout_forms.h"
#include "lyxrc.h"
#include "lyxtext.h"
#include "CutAndPaste.h"
+#include "exporter.h"
using std::ifstream;
using std::copy;
void ShowMessage(Buffer * buf,
string const & msg1,
- string const & msg2 = string(),
- string const & msg3 = string(), int delay = 6)
+ string const & msg2,
+ string const & msg3, int delay)
{
if (lyxrc.use_gui) {
buf->getUser()->owner()->getMiniBuffer()->Set(msg1, msg2,
return true;
}
-
+#ifndef NEW_EXPORT
int MenuRunLaTeX(Buffer * buffer)
{
int ret = 0;
}
return ret;
}
-
+#endif
int MenuBuildProg(Buffer * buffer)
{
return ret;
}
-
+#ifndef NEW_EXPORT
int MakeLaTeXOutput(Buffer * buffer)
{
// Who cares?
AllowInput(current_view);
return ret;
}
-
+#endif
void MenuFax(Buffer * buffer)
{
//if (!bv->text)
// return;
+#ifdef NEW_EXPORT
+ // Generate postscript file
+ if (!Exporter::Export(buffer, "ps", true))
+ return;
+
+ // Send fax
+ string ps = OnlyFilename(ChangeExtension (buffer->fileName(),
+ ".ps"));
+#else
// Generate postscript file
if (!CreatePostscript(buffer, true)) {
return;
// Send fax
string ps = OnlyFilename(ChangeExtension (buffer->fileName(),
".ps_tmp"));
+#endif
string path = OnlyPath (buffer->fileName());
if (lyxrc.use_tempdir || (IsDirWriteable(path) < 1)) {
path = buffer->tmppath;
}
+#ifndef NEW_EXPORT
// Returns false if we fail
bool PreviewDVI(Buffer * buffer)
{
ShowMessage(buffer, _("Unknown export type: ") + extyp);
}
}
+#endif
void QuitLyX()
tmp.c_str());
}
-
+#ifndef NEW_EXPORT
/*
* SGML Linuxdoc support:
* (flag == 0) make TeX output
current_view->buffer()->redraw();
return errorcode;
}
-
+#endif
void MenuLayoutCharacter()
{