]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_support.C
Fix math cursor positioning bug
[lyx.git] / src / mathed / math_support.C
index 148d33e54e870624a84c5f232618872533293583..da3250fd404e60a11aa07ea702aaedd2fbe1d422 100644 (file)
@@ -24,9 +24,8 @@
 #include "frontends/font_metrics.h"
 #include "frontends/lyx_gui.h"
 
-#include "support/std_sstream.h"
-
 #include <map>
+#include <sstream>
 
 
 using std::string;
@@ -336,7 +335,8 @@ named_deco_struct deco_table[] = {
 std::map<string, deco_struct> deco_list;
 
 // sort the table on startup
-struct init_deco_table {
+class init_deco_table {
+public:
        init_deco_table() {
                unsigned const n = sizeof(deco_table) / sizeof(deco_table[0]);
                for (named_deco_struct * p = deco_table; p != deco_table + n; ++p) {
@@ -458,7 +458,7 @@ void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
                                int(x + xx + 0.5), int(y + yy + 0.5),
                                int(x + x2 + 0.5), int(y + y2 + 0.5),
                                LColor::math);
-               }       else {
+               } else {
                        int xp[32];
                        int yp[32];
                        int const n = int(d[i++]);
@@ -554,19 +554,19 @@ fontinfo fontinfos[] = {
        {"mathit",        inh_family, inh_series,
                          LyXFont::ITALIC_SHAPE, LColor::math},
        {"cmex",          LyXFont::CMEX_FAMILY, inh_series,
-                         inh_shape, LColor::none},
+                         inh_shape, LColor::math},
        {"cmm",           LyXFont::CMM_FAMILY, inh_series,
-                         inh_shape, LColor::none},
+                         inh_shape, LColor::math},
        {"cmr",           LyXFont::CMR_FAMILY, inh_series,
-                         inh_shape, LColor::none},
+                         inh_shape, LColor::math},
        {"cmsy",          LyXFont::CMSY_FAMILY, inh_series,
-                         inh_shape, LColor::none},
+                         inh_shape, LColor::math},
        {"eufrak",        LyXFont::EUFRAK_FAMILY, inh_series,
-                         inh_shape, LColor::none},
+                         inh_shape, LColor::math},
        {"msa",           LyXFont::MSA_FAMILY, inh_series,
-                         inh_shape, LColor::none},
+                         inh_shape, LColor::math},
        {"msb",           LyXFont::MSB_FAMILY, inh_series,
-                         inh_shape, LColor::none},
+                         inh_shape, LColor::math},
        {"wasy",          LyXFont::WASY_FAMILY, inh_series,
                          inh_shape, LColor::none},
 
@@ -582,7 +582,7 @@ fontinfo fontinfos[] = {
        {"textnormal",    inh_family, inh_series,
                          LyXFont::UP_SHAPE, LColor::foreground},
        {"textrm",        LyXFont::ROMAN_FAMILY,
-                         inh_series,LyXFont::UP_SHAPE,LColor::foreground},
+                         inh_series, LyXFont::UP_SHAPE,LColor::foreground},
        {"textsc",        inh_family, inh_series,
                          LyXFont::SMALLCAPS_SHAPE, LColor::foreground},
        {"textsf",        LyXFont::SANS_FAMILY, inh_series,
@@ -608,9 +608,9 @@ fontinfo fontinfos[] = {
        {"lyxboldsymbol", LyXFont::SYMBOL_FAMILY, LyXFont::BOLD_SERIES,
                          inh_shape, LColor::math},
        {"lyxblacktext",  LyXFont::ROMAN_FAMILY, LyXFont::MEDIUM_SERIES,
-                    LyXFont::UP_SHAPE, LColor::foreground},
+                         LyXFont::UP_SHAPE, LColor::foreground},
        {"lyxnochange",   inh_family, inh_series,
-                    inh_shape, LColor::foreground},
+                         inh_shape, LColor::foreground},
        {"lyxfakebb",     LyXFont::TYPEWRITER_FAMILY, LyXFont::BOLD_SERIES,
                          LyXFont::UP_SHAPE, LColor::math},
        {"lyxfakecal",    LyXFont::SANS_FAMILY, LyXFont::MEDIUM_SERIES,