X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fimporter.C;h=672edcdc6e1e7713bde9654d3239a5dc83bb81b2;hb=37e82a546392d43f787826b85481a11f2a27af15;hp=d79ed4be5f1826344a142e5107c934f11c44fa83;hpb=d31244b5e2c29b5c03f38272e6a1ff51a1197b5c;p=lyx.git diff --git a/src/importer.C b/src/importer.C index d79ed4be5f..672edcdc6e 100644 --- a/src/importer.C +++ b/src/importer.C @@ -1,14 +1,15 @@ /** - * \file exporter.C + * \file importer.C * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * * \author unknown + * \author Lars Gullik Bjønnes + * \author Jean-Marc Lasgouttes * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ - #include #include "importer.h" @@ -23,10 +24,13 @@ #include "gettext.h" #include "BufferView.h" -#include +using lyx::support::bformat; +using lyx::support::ChangeExtension; +using lyx::support::MakeDisplayPath; -using std::vector; using std::find; +using std::string; +using std::vector; extern BufferList bufferlist; @@ -65,11 +69,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()->newFile(lyxfile, string(), true); bool as_paragraphs = loader_format == "textparagraph"; string filename2 = (loader_format == format) ? filename : ChangeExtension(filename,