]> git.lyx.org Git - lyx.git/blobdiff - src/Trans.cpp
Allow using \binom without amsmath and add support for \brace and \brack
[lyx.git] / src / Trans.cpp
index f2dc6680db3098cbbe238a5dc7c43b3aa8e2359d..241a9c958e232064977a86365acb6c4b6084fd0a 100644 (file)
 #include "BufferView.h"
 #include "Cursor.h"
 #include "CutAndPaste.h"
-#include "support/debug.h"
 #include "Lexer.h"
 #include "LyXRC.h"
 #include "Text.h"
 
-#include "support/filetools.h"
-#include "support/lstrings.h"
 #include "support/convert.h"
+#include "support/debug.h"
 #include "support/docstream.h"
+#include "support/FileName.h"
+#include "support/filetools.h"
+#include "support/lstrings.h"
 
-namespace lyx {
-
-using support::split;
-using support::contains;
-using support::libFileSearch;
-
-using std::endl;
-using std::string;
-using std::pair;
-using std::map;
+using namespace std;
+using namespace lyx::support;
 
+namespace lyx {
 
 /////////////////////////////////////////////////////////////////////
 //
@@ -73,7 +67,7 @@ using std::map;
    |                  | semivoiced_sound |                  |
    |                  |                  |LFUN_ACCENT_SPECIAL_CARON| special caron
    */
-static tex_accent_struct lyx_accent_table[] = {
+static TeXAccent lyx_accent_table[] = {
        {TEX_NOACCENT,   0,      "",                LFUN_NOACTION},
        {TEX_ACUTE,      0x0301, "acute",           LFUN_ACCENT_ACUTE},
        {TEX_GRAVE,      0x0300, "grave",           LFUN_ACCENT_GRAVE},
@@ -96,7 +90,7 @@ static tex_accent_struct lyx_accent_table[] = {
 };
 
 
-tex_accent_struct get_accent(kb_action action)
+TeXAccent get_accent(FuncCode action)
 {
        int i = 0;
        while (i <= TEX_MAX_ACCENT) {
@@ -104,8 +98,8 @@ tex_accent_struct get_accent(kb_action action)
                        return lyx_accent_table[i];
                ++i;
        }
-       struct tex_accent_struct temp = { static_cast<tex_accent>(0), 0,
-                                         0, static_cast<kb_action>(0)};
+       struct TeXAccent temp = { static_cast<tex_accent>(0), 0,
+                                         0, static_cast<FuncCode>(0)};
        return temp;
 }
 
@@ -121,7 +115,7 @@ static docstring const doAccent(docstring const & s, tex_accent accent)
        if (s.length() > 1) {
                if (accent != TEX_TIE || s.length() > 2)
                        lyxerr << "Warning: Too many characters given for accent "
-                              << lyx_accent_table[accent].name << '.' << std::endl;
+                              << lyx_accent_table[accent].name << '.' << endl;
                os << s.substr(1);
        }
        return normalize_c(os.str());
@@ -393,7 +387,7 @@ docstring const Trans::process(char_type c, TransManager & k)
 
 int Trans::load(string const & language)
 {
-       support::FileName const filename = libFileSearch("kbd", language, "kmap");
+       FileName const filename = libFileSearch("kbd", language, "kmap");
        if (filename.empty())
                return -1;