]> git.lyx.org Git - lyx.git/blobdiff - src/Language.cpp
PlainLayout -> Plain Layout
[lyx.git] / src / Language.cpp
index 6a517d09856ba4dcbda24825b68213369ff18bd8..59694b9c508c678b51be40f548c0fdc74260c4b1 100644 (file)
 
 #include "Language.h"
 
-#include "debug.h"
 #include "Encoding.h"
 #include "Lexer.h"
 #include "LyXRC.h"
 
+#include "support/debug.h"
 #include "support/FileName.h"
 
-using std::endl;
-using std::string;
+#include <ostream>
 
+using namespace std;
+using namespace lyx::support;
 
 namespace lyx {
 
@@ -33,15 +34,15 @@ Language const * english_language;
 Language const * default_language;
 Language ignore_lang("ignore", "ignore", "Ignore", false, "", 0, "ignore", "");
 Language const * ignore_language = &ignore_lang;
-Language latex_lang("latex", "latex", "Latex", false, "", 0, "latex", "");
+Language latex_lang("latex", "", "Latex", false, "", 0, "latex", "");
 Language const * latex_language = &latex_lang;
 
 
-void Languages::read(support::FileName const & filename)
+void Languages::read(FileName const & filename)
 {
        // We need to set the encoding of latex_lang
-       latex_lang = Language("latex", "latex", "Latex", false, "iso8859-1",
-                             encodings.getFromLyXName("iso8859-1"),
+       latex_lang = Language("latex", "", "Latex", false, "iso8859-1",
+                             encodings.fromLyXName("iso8859-1"),
                              "latex", "");
 
        Lexer lex(0, 0);
@@ -59,7 +60,7 @@ void Languages::read(support::FileName const & filename)
                        lang = lex.getString();
                else
                        break;
-               LYXERR(Debug::INFO) << "Reading language " << lang << endl;
+               LYXERR(Debug::INFO, "Reading language " << lang);
 
                if (lex.next())
                        babel = lex.getString();
@@ -74,9 +75,9 @@ void Languages::read(support::FileName const & filename)
                if (lex.next())
                        latex_options = lex.getString();
 
-               Encoding const * encoding = encodings.getFromLyXName(encoding_str);
+               Encoding const * encoding = encodings.fromLyXName(encoding_str);
                if (!encoding) {
-                       encoding = encodings.getFromLyXName("iso8859-1");
+                       encoding = encodings.fromLyXName("iso8859-1");
                        lyxerr << "Unknown encoding " << encoding_str << endl;
                }