]> git.lyx.org Git - lyx.git/blobdiff - src/importer.C
last Friday's text*.C -> text_func shuffle
[lyx.git] / src / importer.C
index d79ed4be5f1826344a142e5107c934f11c44fa83..3e6ccf69e09c3aa9f1ef4dafb818e27504864371 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * \file exporter.C
+ * \file importer.C
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
@@ -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"
@@ -25,6 +26,8 @@
 
 #include <algorithm>
 
+using namespace lyx::support;
+
 using std::vector;
 using std::find;
 
@@ -65,11 +68,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,