]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
citation patch from Angus
[lyx.git] / src / buffer.C
index 536f3c165a798b491265dcdc40729696a97421b5..82d8255cf675beb996882ae77a1decab3281231e 100644 (file)
@@ -87,6 +87,7 @@
 #include "lyx_gui_misc.h"      // WarnReadonly()
 #include "frontends/Dialogs.h"
 #include "encoding.h"
+#include "exporter.h"
 
 using std::ostream;
 using std::ofstream;
@@ -106,7 +107,9 @@ using std::istringstream;
 // all these externs should eventually be removed.
 extern BufferList bufferlist;
 
+#ifndef NEW_EXPORT
 extern void MenuExport(Buffer *, string const &);
+#endif
 extern LyXAction lyxaction;
 
 
@@ -3318,6 +3321,8 @@ void Buffer::SimpleDocBookOnePar(ostream & os, string & extra,
 
 int Buffer::runLaTeX()
 {
+#ifndef NEW_EXPORT
+
        if (!users->text) return 0;
 
        ProhibitInput(users);
@@ -3376,6 +3381,9 @@ int Buffer::runLaTeX()
         AllowInput(users);
  
         return latex.getNumErrors();
+#else
+       return 0;
+#endif
 }
 
 
@@ -3839,7 +3847,11 @@ bool Buffer::Dispatch(int action, string const & argument)
        bool dispatched = true;
        switch (action) {
                case LFUN_EXPORT: 
+#ifdef NEW_EXPORT
+                       Exporter::Export(this, argument, false);
+#else
                        MenuExport(this, argument);
+#endif
                        break;
 
                default: