]> git.lyx.org Git - features.git/blobdiff - src/importer.C
take several functions out of BufferList, and split functionality
[features.git] / src / importer.C
index d79ed4be5f1826344a142e5107c934f11c44fa83..d5b6a60f028b8cad2f044621dd12b3e98188e840 100644 (file)
@@ -18,6 +18,7 @@
 #include "funcrequest.h"
 
 #include "bufferlist.h"
+#include "buffer_funcs.h"
 #include "support/filetools.h"
 #include "frontends/Alert.h"
 #include "gettext.h"
@@ -65,11 +66,9 @@ bool Importer::Import(LyXView * lv, string const & filename,
 
 
        if (loader_format == "lyx") {
-               Buffer * buffer = bufferlist.loadLyXFile(lyxfile);
-               if (buffer)
-                       lv->view()->buffer(buffer);
+               lv->view()->loadLyXFile(lyxfile);
        } else {
-               lv->view()->buffer(bufferlist.newFile(lyxfile, string(), true));
+               lv->view()->buffer(newFile(lyxfile, string(), true));
                bool as_paragraphs = loader_format == "textparagraph";
                string filename2 = (loader_format == format) ? filename
                        : ChangeExtension(filename,