]> git.lyx.org Git - lyx.git/blobdiff - src/importer.C
* Painter.h:
[lyx.git] / src / importer.C
index d363a74ebe725c06229659f224397f7180e3bfed..d00b05c4c8295504266ef29c42bad545ce70e9a6 100644 (file)
 #include "funcrequest.h"
 #include "lyx_cb.h"
 
-#include "bufferlist.h"
 #include "support/filetools.h"
+
 #include "frontends/Alert.h"
+
 #include "gettext.h"
 #include "BufferView.h"
 #include "buffer_funcs.h"
 
-using lyx::docstring;
-using lyx::support::bformat;
-using lyx::support::changeExtension;
-using lyx::support::makeDisplayPath;
+
+namespace lyx {
+
+using support::bformat;
+using support::changeExtension;
+using support::makeDisplayPath;
 
 using std::find;
 using std::string;
 using std::vector;
 
 
-extern BufferList bufferlist;
-
-
 bool Importer::Import(LyXView * lv, string const & filename,
                      string const & format, ErrorList & errorList)
 {
@@ -61,13 +61,14 @@ bool Importer::Import(LyXView * lv, string const & filename,
                        }
                }
                if (loader_format.empty()) {
-                       Alert::error(_("Couldn't import file"),
+                       frontend::Alert::error(_("Couldn't import file"),
                                     bformat(_("No information for importing the format %1$s."),
                                         formats.prettyName(format)));
                        return false;
                }
-       } else
+       } else {
                loader_format = format;
+       }
 
 
        if (loader_format == "lyx") {
@@ -115,3 +116,6 @@ vector<string> const Importer::Loaders()
        v.push_back("textparagraph");
        return v;
 }
+
+
+} // namespace lyx